diff --git a/lldb/test/array_types/TestArrayTypes.py b/lldb/test/array_types/TestArrayTypes.py index abdf05b7f772..3afa0f90a404 100644 --- a/lldb/test/array_types/TestArrayTypes.py +++ b/lldb/test/array_types/TestArrayTypes.py @@ -9,7 +9,25 @@ class TestArrayTypes(TestBase): mydir = "array_types" - def test_array_types(self): + @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + def test_with_dsym_and_run_command(self): + self.buildDsym() + self.array_types() + + @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + def test_with_dsym_and_python_api(self): + self.buildDsym() + self.array_types_python() + + def test_with_dwarf_and_run_command(self): + self.buildDwarf() + self.array_types() + + def test_with_dwarf_and_python_api(self): + self.buildDwarf() + self.array_types_python() + + def array_types(self): """Test 'variable list var_name' on some variables with array types.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -52,7 +70,7 @@ class TestArrayTypes(TestBase): self.expect("variable list long_6", VARIABLES_DISPLAYED_CORRECTLY, startstr = '(long [6])') - def test_array_types_python(self): + def array_types_python(self): """Use Python APIs to inspect variables with array types.""" exe = os.path.join(os.getcwd(), "a.out") diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index 5b5530743f27..6afe64fa0c93 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -108,6 +108,7 @@ $ import os, sys from subprocess import * import time +import types import unittest2 import lldb @@ -392,7 +393,12 @@ class TestBase(unittest2.TestCase): retcode = process.poll() if self.traceAlways: + if isinstance(popenargs, types.StringTypes): + args = [popenargs] + else: + args = list(popenargs) print >> sys.stderr + print >> sys.stderr, "os command:", args print >> sys.stderr, "output:", output print >> sys.stderr, "error:", unused_err print >> sys.stderr, "retcode:", retcode