[PATCH] D16654: using /system/bin/sh on android in tests.

Mike Aizatsky via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 16:02:36 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL259001: using /system/bin/sh on android in tests. (authored by aizatsky).

Changed prior to commit:
  http://reviews.llvm.org/D16654?vs=46190&id=46192#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D16654

Files:
  compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc

Index: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc
@@ -266,9 +266,14 @@
 TEST(SanitizerCommon, StartSubprocessTest) {
   int pipe_fds[2];
   ASSERT_EQ(0, pipe(pipe_fds));
-  const char *argv[] = {"/bin/sh", "-c", "echo -n 'hello'"};
-  int pid = StartSubprocess("/bin/sh", const_cast<char **>(&argv[0]),
-                            kInvalidFd /* stdin */, pipe_fds[1] /* stdout */);
+#if SANITIZER_ANDROID
+  const char *shell = "/system/bin/sh";
+#else
+  const char *shell = "/bin/sh";
+#endif
+  const char *argv[] = {shell, "-c", "echo -n 'hello'"};
+  int pid = StartSubprocess(shell, argv,
+                            /* stdin */ kInvalidFd, /* stdout */ pipe_fds[1]);
   ASSERT_GT(pid, 0);
 
   // wait for process to finish.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16654.46192.patch
Type: text/x-patch
Size: 974 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160128/ef4c22a7/attachment.bin>


More information about the llvm-commits mailing list