diff options
author | Vince Harron <vharron@google.com> | 2015-02-04 19:25:21 +0000 |
---|---|---|
committer | Vince Harron <vharron@google.com> | 2015-02-04 19:25:21 +0000 |
commit | c46945149c76fb0dbfb3eb3be8a0618b5c39f9d1 (patch) | |
tree | 837cf57dcac62671a2fa987299760a2ce62115cd /lldb/test/python_api/target/TestTargetAPI.py | |
parent | cb5386cbfc6bc80ee0bfd37e27bcf238edcd9836 (diff) | |
download | bcm5719-llvm-c46945149c76fb0dbfb3eb3be8a0618b5c39f9d1.tar.gz bcm5719-llvm-c46945149c76fb0dbfb3eb3be8a0618b5c39f9d1.zip |
Fix TestTargetAPI.py when run against remote host.
In tests where stdio is redirected to a file, the file must be copied
back from the remote host for analysis by the test.
llvm-svn: 228175
Diffstat (limited to 'lldb/test/python_api/target/TestTargetAPI.py')
-rw-r--r-- | lldb/test/python_api/target/TestTargetAPI.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lldb/test/python_api/target/TestTargetAPI.py b/lldb/test/python_api/target/TestTargetAPI.py index 1699786b8d1..37c019228f1 100644 --- a/lldb/test/python_api/target/TestTargetAPI.py +++ b/lldb/test/python_api/target/TestTargetAPI.py @@ -373,10 +373,18 @@ class TargetAPITestCase(TestBase): # Now launch the process, do not stop at entry point, and redirect stdout to "stdout.txt" file. # The inferior should run to completion after "process.Continue()" call. + local_path = "stdout.txt"; + if lldb.remote_platform: + stdout_path = os.path.join(lldb.remote_platform.GetWorkingDirectory(), "lldb-stdout-redirect.txt") + else: + stdout_path = local_path error = lldb.SBError() - process = target.Launch (self.dbg.GetListener(), None, None, None, "stdout.txt", None, None, 0, False, error) + process = target.Launch (self.dbg.GetListener(), None, None, None, stdout_path, None, None, 0, False, error) process.Continue() #self.runCmd("process status") + if lldb.remote_platform: + # copy output file to host + lldb.remote_platform.Get(lldb.SBFileSpec(stdout_path), lldb.SBFileSpec(local_path)) # The 'stdout.txt' file should now exist. self.assertTrue(os.path.isfile("stdout.txt"), |