aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-09-10 10:32:29 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2012-09-10 10:32:29 +0000
commit4fbaa509eb1b9fe8121dc65dea83522a5c844d95 (patch)
treeb3082ac055cae684deece452ce1d059fe1d5194e /utils
parent8cc14949053ea4fcba34afc68b30137eff408d66 (diff)
GTest on Android needs a custom tmpdir path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/unittest/googletest/gtest-port.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/unittest/googletest/gtest-port.cc b/utils/unittest/googletest/gtest-port.cc
index 07e5bb3c0d..3c32ff1ac1 100644
--- a/utils/unittest/googletest/gtest-port.cc
+++ b/utils/unittest/googletest/gtest-port.cc
@@ -505,6 +505,10 @@ class CapturedStream {
GTEST_CHECK_(captured_fd != -1) << "Unable to open temporary file "
<< temp_file_path;
filename_ = temp_file_path;
+#elif GTEST_OS_LINUX_ANDROID
+ char name_template[] = "/sdcard/captured_stderr.XXXXXX";
+ const int captured_fd = mkstemp(name_template);
+ filename_ = name_template;
# else
// There's no guarantee that a test has write access to the
// current directory, so we create the temporary file in the /tmp