[Lldb-commits] [lldb] r158737 - in /lldb/trunk/test/functionalities: completion/TestCompletion.py single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py

Johnny Chen johnny.chen at apple.com
Tue Jun 19 13:29:50 PDT 2012


Author: johnny
Date: Tue Jun 19 15:29:50 2012
New Revision: 158737

URL: http://llvm.org/viewvc/llvm-project?rev=158737&view=rev
Log:
Test suite cleanup: use Python API to remove files as part of cleanup instead of running OS commands.

Modified:
    lldb/trunk/test/functionalities/completion/TestCompletion.py
    lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py

Modified: lldb/trunk/test/functionalities/completion/TestCompletion.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/completion/TestCompletion.py?rev=158737&r1=158736&r2=158737&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/completion/TestCompletion.py (original)
+++ lldb/trunk/test/functionalities/completion/TestCompletion.py Tue Jun 19 15:29:50 2012
@@ -15,8 +15,8 @@
     @classmethod
     def classCleanup(cls):
         """Cleanup the test byproducts."""
-        system(["/bin/sh", "-c", "rm -f child_send.txt"])
-        system(["/bin/sh", "-c", "rm -f child_read.txt"])
+        os.remove("child_send.txt")
+        os.remove("child_read.txt")
 
     def test_process_attach_dash_dash_con(self):
         """Test that 'process attach --con' completes to 'process attach --continue '."""

Modified: lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py?rev=158737&r1=158736&r2=158737&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py (original)
+++ lldb/trunk/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py Tue Jun 19 15:29:50 2012
@@ -16,9 +16,9 @@
     @classmethod
     def classCleanup(cls):
         """Cleanup the test byproducts."""
-        system(["/bin/sh", "-c", "rm -f child_send.txt"])
-        system(["/bin/sh", "-c", "rm -f child_read.txt"])
-        system(["/bin/sh", "-c", "rm -f \"%s\"" % cls.myexe])
+        os.remove("child_send.txt")
+        os.remove("child_read.txt")
+        os.remove(cls.myexe)
 
     def test_lldb_invocation_with_single_quote_in_filename(self):
         """Test that 'lldb my_file_name' works where my_file_name is a string with a single quote char in it."""





More information about the lldb-commits mailing list