[Lldb-commits] [lldb] r144958 - /lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py

Johnny Chen johnny.chen at apple.com
Thu Nov 17 16:58:29 PST 2011


Author: johnny
Date: Thu Nov 17 18:58:29 2011
New Revision: 144958

URL: http://llvm.org/viewvc/llvm-project?rev=144958&view=rev
Log:
Redirect the stderr output into a file so as to not pollute the terminal.

Modified:
    lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py

Modified: lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py?rev=144958&r1=144957&r2=144958&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py (original)
+++ lldb/trunk/test/functionalities/process_launch/TestProcessLaunch.py Thu Nov 17 18:58:29 2011
@@ -122,18 +122,22 @@
 
         mywd = 'my_working_dir'
         out_file_name = "my_working_dir_test.out"
+        err_file_name = "my_working_dir_test.err"
 
         my_working_dir_path = os.path.join(os.getcwd(), mywd)
         out_file_path = os.path.join(my_working_dir_path, out_file_name)
+        err_file_path = os.path.join(my_working_dir_path, err_file_name)
 
         # Make sure the output files do not exist before launching the process
         try:
             os.remove (out_file_path)
+            os.remove (err_file_path)
         except OSError:
             pass
 
-        launch_command = "process launch -w %s -o %s" % (my_working_dir_path,
-                                                         out_file_path)
+        launch_command = "process launch -w %s -o %s -e %sl" % (my_working_dir_path,
+                                                                out_file_path,
+                                                                err_file_path)
 
         self.expect(launch_command,
                     patterns = [ "Process .* launched: .*a.out" ])
@@ -157,9 +161,10 @@
                 err_msg = err_msg + "The current working directory was not set correctly.\n"
                 out_f.close();
             
-        # Try to delete the 'stdout' file
+        # Try to delete the 'stdout' and 'stderr' files
         try:
             os.remove(out_file_path)
+            os.remove(err_file_path)
             pass
         except OSError:
             pass





More information about the lldb-commits mailing list