Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
dc6ee0e3
Commit
dc6ee0e3
authored
Jul 29, 2008
by
shiqian
Browse files
Makes death tests create temporary files in /tmp instead of the current folder.
parent
d88da49d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/gtest-port.cc
src/gtest-port.cc
+4
-1
No files found.
src/gtest-port.cc
View file @
dc6ee0e3
...
...
@@ -96,7 +96,10 @@ class CapturedStderr {
CapturedStderr
()
{
uncaptured_fd_
=
dup
(
STDERR_FILENO
);
char
name_template
[]
=
"captured_stderr.XXXXXX"
;
// There's no guarantee that a test has write access to the
// current directory, so we create the temporary file in the /tmp
// directory instead.
char
name_template
[]
=
"/tmp/captured_stderr.XXXXXX"
;
const
int
captured_fd
=
mkstemp
(
name_template
);
filename_
=
name_template
;
fflush
(
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment