summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2015-03-09 13:11:42 +0000
committerTamas Berghammer <tberghammer@google.com>2015-03-09 13:11:42 +0000
commit05b098d250bc23c27b4a2f8289e3f3e2c8e26b8f (patch)
tree1157e66934983b59d4739aa5d5d88399a4d8e54f
parent1b677dbd44edd045359fc62abb64eb703d88fee4 (diff)
downloadbcm5719-llvm-05b098d250bc23c27b4a2f8289e3f3e2c8e26b8f.tar.gz
bcm5719-llvm-05b098d250bc23c27b4a2f8289e3f3e2c8e26b8f.zip
Fix AttachDeniedTestCase on android
Failure caused by a missing mkfifo command in the android OS. This fix replace mkfifo with "mknode p" command on android. llvm-svn: 231651
-rw-r--r--lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py b/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
index c7f010ab0a9..e963ed11e8d 100644
--- a/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
+++ b/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
@@ -31,7 +31,12 @@ class AttachDeniedTestCase(TestBase):
pid_pipe_path = os.path.join(self.get_process_working_directory(),
"pid_pipe_%d" % (int(time.time())))
- err, _ = self.run_platform_command("mkfifo %s" % (pid_pipe_path))
+ triple = self.dbg.GetSelectedPlatform().GetTriple()
+ if re.match(".*-.*-.*-android", triple):
+ err, _ = self.run_platform_command("mknod %s p" % (pid_pipe_path))
+ else:
+ err, _ = self.run_platform_command("mkfifo %s" % (pid_pipe_path))
+
self.assertTrue(err.Success(), "Failed to create FIFO %s: %s" % (pid_pipe_path, err.GetCString()))
self.addTearDownHook(lambda: self.run_platform_command("rm %s" % (pid_pipe_path)))
OpenPOWER on IntegriCloud