From f0b86fc3b0f625e1db84f3632cb37bd9eae6ae19 Mon Sep 17 00:00:00 2001 From: jgm Date: Fri, 9 Mar 2012 17:12:39 +0000 Subject: Misc small updates to some debug death code, and to messages streaming to macros --- src/gtest-port.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gtest-port.cc b/src/gtest-port.cc index 9648eee8..a0e2d7c7 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 -- cgit v1.2.3