summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjgm@google.com <jgm@google.com@861a406c-534a-0410-8894-cb66d6ee9925>2012-03-09 17:12:39 +0000
committerjgm@google.com <jgm@google.com@861a406c-534a-0410-8894-cb66d6ee9925>2012-03-09 17:12:39 +0000
commit7a574c99ea1d474f8ec5f040deba54169120f063 (patch)
treedea331f222e639cfc37f481766bbc88ce20dc7cb /src
parent62576d5b3fb1173e4ad1b7fbc98f9d58323dfc64 (diff)
downloadgtest-7a574c99ea1d474f8ec5f040deba54169120f063.tar.gz
gtest-7a574c99ea1d474f8ec5f040deba54169120f063.tar.bz2
gtest-7a574c99ea1d474f8ec5f040deba54169120f063.tar.xz
Misc small updates to some debug death code, and to messages streaming to macros
git-svn-id: http://googletest.googlecode.com/svn/trunk@612 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src')
-rw-r--r--src/gtest-port.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gtest-port.cc b/src/gtest-port.cc
index 9648eee..a0e2d7c 100644
--- a/src/gtest-port.cc
+++ b/src/gtest-port.cc
@@ -530,10 +530,15 @@ class CapturedStream {
<< temp_file_path;
filename_ = temp_file_path;
# else
- // 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.
+ // 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.
+ // We use /tmp on most systems, and /mnt/sdcard on Android. That's because
+ // Android doesn't have /tmp.
+# if GTEST_OS_LINUX_ANDROID
+ char name_template[] = "/mnt/sdcard/gtest_captured_stream.XXXXXX";
+# else
char name_template[] = "/tmp/captured_stream.XXXXXX";
+# endif // GTEST_OS_LINUX_ANDROID
const int captured_fd = mkstemp(name_template);
filename_ = name_template;
# endif // GTEST_OS_WINDOWS