[Lldb-commits] [lldb] r228175 - Fix TestTargetAPI.py when run against remote host.
Vince Harron
vharron at google.com
Wed Feb 4 11:25:21 PST 2015
Author: vharron
Date: Wed Feb 4 13:25:21 2015
New Revision: 228175
URL: http://llvm.org/viewvc/llvm-project?rev=228175&view=rev
Log:
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.
Modified:
lldb/trunk/test/python_api/target/TestTargetAPI.py
Modified: lldb/trunk/test/python_api/target/TestTargetAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/target/TestTargetAPI.py?rev=228175&r1=228174&r2=228175&view=diff
==============================================================================
--- lldb/trunk/test/python_api/target/TestTargetAPI.py (original)
+++ lldb/trunk/test/python_api/target/TestTargetAPI.py Wed Feb 4 13:25:21 2015
@@ -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"),
More information about the lldb-commits
mailing list