[Lldb-commits] [PATCH] Fixed TestProcessLaunch.py for remote targets

Vince Harron vharron at google.com
Sun Feb 15 08:32:32 PST 2015


Hi clayborg,

Just needed to copy stdio redirect files to/from target

http://reviews.llvm.org/D7654

Files:
  test/functionalities/process_launch/TestProcessLaunch.py

Index: test/functionalities/process_launch/TestProcessLaunch.py
===================================================================
--- test/functionalities/process_launch/TestProcessLaunch.py
+++ test/functionalities/process_launch/TestProcessLaunch.py
@@ -38,11 +38,9 @@
         self.expect("file " + exe,
                     patterns = [ "Current executable set to .*a.out" ])
 
-
-        in_file = os.path.join (os.getcwd(), "input-file.txt")
-        out_file = os.path.join (os.getcwd(), "output-test.out")
-        err_file = os.path.join (os.getcwd(), "output-test.err")
-
+        in_file = "input-file.txt"
+        out_file = "output-test.out"
+        err_file = "output-test.err"
 
         # Make sure the output files do not exist before launching the process
         try:
@@ -57,9 +55,18 @@
 
         launch_command = "process launch -i " + in_file + " -o " + out_file + " -e " + err_file
 
+        if lldb.remote_platform:
+            self.runCmd('platform put-file "{local}" "{remote}"'.format(
+                local=in_file, remote=in_file))
+
         self.expect (launch_command,
                      patterns = [ "Process .* launched: .*a.out" ])
 
+        if lldb.remote_platform:
+            self.runCmd('platform get-file "{remote}" "{local}"'.format(
+                remote=out_file, local=out_file))
+            self.runCmd('platform get-file "{remote}" "{local}"'.format(
+                remote=err_file, local=err_file))
 
         success = True
         err_msg = ""

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7654.19985.patch
Type: text/x-patch
Size: 1512 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150215/db35fdf3/attachment.bin>


More information about the lldb-commits mailing list