mirror of
https://github.com/google/googletest.git
synced 2024-12-29 20:23:34 +08:00
Adds Solaris support to test scripts.
This commit is contained in:
parent
cfcbc298cd
commit
9d965bbeef
@ -460,8 +460,15 @@ class CapturedStream {
|
||||
char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT
|
||||
|
||||
::GetTempPathA(sizeof(temp_dir_path), temp_dir_path);
|
||||
::GetTempFileNameA(temp_dir_path, "gtest_redir", 0, temp_file_path);
|
||||
const UINT success = ::GetTempFileNameA(temp_dir_path,
|
||||
"gtest_redir",
|
||||
0, // Generate unique file name.
|
||||
temp_file_path);
|
||||
GTEST_CHECK_(success != 0)
|
||||
<< "Unable to create a temporary file in " << temp_dir_path;
|
||||
const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE);
|
||||
GTEST_CHECK_(captured_fd != -1) << "Unable to open temporary file "
|
||||
<< temp_file_path;
|
||||
filename_ = temp_file_path;
|
||||
#else
|
||||
// There's no guarantee that a test has write access to the
|
||||
|
Loading…
x
Reference in New Issue
Block a user