From 324355b9a11130931a988e310c14deee7cca1cf1 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Mon, 30 Aug 2010 23:44:39 +0000 Subject: [PATCH] Added doc strings to the array_types test cases. And terminate the current process being debugged in the TestBase.tearDown() instead of letting it continue and finish. llvm-svn: 112556 --- lldb/test/array_types/TestArrayTypes.py | 8 ++++++++ lldb/test/lldbtest.py | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lldb/test/array_types/TestArrayTypes.py b/lldb/test/array_types/TestArrayTypes.py index 3afa0f90a404..5f24d8dbe6f8 100644 --- a/lldb/test/array_types/TestArrayTypes.py +++ b/lldb/test/array_types/TestArrayTypes.py @@ -11,19 +11,23 @@ class TestArrayTypes(TestBase): @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") def test_with_dsym_and_run_command(self): + """Test 'variable list var_name' on some variables with array types.""" self.buildDsym() self.array_types() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") def test_with_dsym_and_python_api(self): + """Use Python APIs to inspect variables with array types.""" self.buildDsym() self.array_types_python() def test_with_dwarf_and_run_command(self): + """Test 'variable list var_name' on some variables with array types.""" self.buildDwarf() self.array_types() def test_with_dwarf_and_python_api(self): + """Use Python APIs to inspect variables with array types.""" self.buildDwarf() self.array_types_python() @@ -134,6 +138,10 @@ class TestArrayTypes(TestBase): self.assertTrue(long(child5.GetValue(frame)) == 6, "long_6[5] == 6") + # Now kill the process, and we are done. + rc = target.GetProcess().Kill() + self.assertTrue(rc.Success()) + if __name__ == '__main__': import atexit diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index 6afe64fa0c93..757752fc32a7 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -270,9 +270,9 @@ class TestBase(unittest2.TestCase): self.res = lldb.SBCommandReturnObject() def tearDown(self): - # Finish the inferior process, if it was "run" previously. + # Terminate the current process being debugged. if self.runStarted: - self.ci.HandleCommand("continue", self.res) + self.ci.HandleCommand("process kill", self.res) del self.dbg -- GitLab