diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-09-10 10:32:29 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-09-10 10:32:29 +0000 |
commit | c9cdb9618854d55c7907e5d1aaffa4f774adb6b6 (patch) | |
tree | e0bc53fcef41cfe69aa067a2e4e677164523b535 /llvm/utils/unittest | |
parent | c9cde48f3a22572d292f6bbe47b52c2521244b59 (diff) | |
download | bcm5719-llvm-c9cdb9618854d55c7907e5d1aaffa4f774adb6b6.tar.gz bcm5719-llvm-c9cdb9618854d55c7907e5d1aaffa4f774adb6b6.zip |
GTest on Android needs a custom tmpdir path.
llvm-svn: 163501
Diffstat (limited to 'llvm/utils/unittest')
-rw-r--r-- | llvm/utils/unittest/googletest/gtest-port.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/utils/unittest/googletest/gtest-port.cc b/llvm/utils/unittest/googletest/gtest-port.cc index 07e5bb3c0d6..3c32ff1ac1e 100644 --- a/llvm/utils/unittest/googletest/gtest-port.cc +++ b/llvm/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 |