Test suite cleanup: use Python API to remove files as part of cleanup instead of running OS commands.

llvm-svn: 158737
This commit is contained in:
Johnny Chen 2012-06-19 20:29:50 +00:00
parent 00c31c888b
commit 59ceee7933
2 changed files with 5 additions and 5 deletions

View File

@ -15,8 +15,8 @@ class CommandLineCompletionTestCase(TestBase):
@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 '."""

View File

@ -16,9 +16,9 @@ class SingleQuoteInCommandLineTestCase(TestBase):
@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."""