Would you mind doing the temp file changes too? It wasn't your code that did it with hardcoded paths, but since you're in there anyway, maybe it's a quick fix?<br><div class="gmail_quote">On Wed, Jan 28, 2015 at 5:08 PM Vince Harron <<a href="mailto:vharron@google.com">vharron@google.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">refactored process_launch_o into separate function<br>
using os.path.join instead of string.format<br>
using assertIsNotNone(<br>
<br>
instead of assertNotEqual(None,<br>
<br>
using lldb.remote_platform.<u></u>GetWorkingDirectory()<br>
<br>
instead of using lldb.remote_platform_working_<u></u>dir<br>
<br>
<br>
<a href="http://reviews.llvm.org/D7221" target="_blank">http://reviews.llvm.org/D7221</a><br>
<br>
Files:<br>
source/Commands/<u></u>CommandObjectPlatform.cpp<br>
test/types/AbstractBase.py<br>
<br>
Index: source/Commands/<u></u>CommandObjectPlatform.cpp<br>
==============================<u></u>==============================<u></u>=======<br>
--- source/Commands/<u></u>CommandObjectPlatform.cpp<br>
+++ source/Commands/<u></u>CommandObjectPlatform.cpp<br>
@@ -2281,19 +2281,16 @@<br>
LoadSubCommand ("connect", CommandObjectSP (new CommandObjectPlatformConnect (interpreter)));<br>
LoadSubCommand ("disconnect", CommandObjectSP (new CommandObjectPlatformDisconnec<u></u>t (interpreter)));<br>
LoadSubCommand ("settings", CommandObjectSP (new CommandObjectPlatformSettings (interpreter)));<br>
-#ifdef LLDB_CONFIGURATION_DEBUG<br>
LoadSubCommand ("mkdir", CommandObjectSP (new CommandObjectPlatformMkDir (interpreter)));<br>
LoadSubCommand ("file", CommandObjectSP (new CommandObjectPlatformFile (interpreter)));<br>
LoadSubCommand ("get-file", CommandObjectSP (new CommandObjectPlatformGetFile (interpreter)));<br>
LoadSubCommand ("get-size", CommandObjectSP (new CommandObjectPlatformGetSize (interpreter)));<br>
LoadSubCommand ("put-file", CommandObjectSP (new CommandObjectPlatformPutFile (interpreter)));<br>
-#endif<br>
LoadSubCommand ("process", CommandObjectSP (new CommandObjectPlatformProcess (interpreter)));<br>
LoadSubCommand ("shell", CommandObjectSP (new CommandObjectPlatformShell (interpreter)));<br>
LoadSubCommand ("target-install", CommandObjectSP (new CommandObjectPlatformInstall (interpreter)));<br>
}<br>
<br>
-<br>
//----------------------------<u></u>------------------------------<u></u>------------<br>
// Destructor<br>
//----------------------------<u></u>------------------------------<u></u>------------<br>
Index: test/types/AbstractBase.py<br>
==============================<u></u>==============================<u></u>=======<br>
--- test/types/AbstractBase.py<br>
+++ test/types/AbstractBase.py<br>
@@ -50,7 +50,7 @@<br>
# True: build dSYM file #<br>
# False: build DWARF map #<br>
# bc -> blockCaptured (defaulted to False) #<br>
- # True: testing vars of various basic types from isnide a block #<br>
+ # True: testing vars of various basic types from inside a block #<br>
# False: testing vars of various basic types from a function #<br>
# qd -> quotedDisplay (defaulted to False) #<br>
# True: the output from 'frame var' or 'expr var' contains a pair #<br>
@@ -81,14 +81,29 @@<br>
else:<br>
self.generic_type_tester(self.<u></u>exe_name, atoms, blockCaptured=bc, quotedDisplay=qd)<br>
<br>
+ def process_launch_o(self, localPath):<br>
+ # process launch command output redirect always goes to host the process is running on<br>
+ if lldb.remote_platform:<br>
+ # process launch -o requires a path that is valid on the target<br>
+ self.assertIsNotNone(lldb.<u></u>remote_platform.<u></u>GetWorkingDirectory())<br>
+ remote_path = os.path.join(lldb.remote_<u></u>platform.GetWorkingDirectory()<u></u>, "lldb-stdout-redirect.txt")<br>
+ self.runCmd('process launch -o {remote}'.format(remote=<u></u>remote_path))<br>
+ # copy remote_path to local host<br>
+ self.runCmd('platform get-file {remote} "{local}"'.format(<br>
+ remote=remote_path, local=self.golden_filename))<br>
+ else:<br>
+ self.runCmd('process launch -o "{local}"'.format(local=self.<u></u>golden_filename))<br>
+<br>
def generic_type_tester(self, exe_name, atoms, quotedDisplay=False, blockCaptured=False):<br>
"""Test that variables with basic types are displayed correctly."""<br>
<br>
self.runCmd("file %s" % exe_name, CURRENT_EXECUTABLE_SET)<br>
<br>
# First, capture the golden output emitted by the oracle, i.e., the<br>
# series of printf statements.<br>
- self.runCmd('process launch -o "%s"'%(self.golden_filename))<br>
+<br>
+ self.process_launch_o(self.<u></u>golden_filename)<br>
+<br>
with open(self.golden_filename) as f:<br>
go = f.read()<br>
<br>
@@ -169,7 +184,9 @@<br>
<br>
# First, capture the golden output emitted by the oracle, i.e., the<br>
# series of printf statements.<br>
- self.runCmd('process launch -o "%s"'%(self.golden_filename))<br>
+<br>
+ self.process_launch_o(self.<u></u>golden_filename)<br>
+<br>
with open(self.golden_filename) as f:<br>
go = f.read()<br>
<br>
EMAIL PREFERENCES<br>
<a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/<u></u>settings/panel/<u></u>emailpreferences/</a><br>
</blockquote></div>