forked from OSchip/llvm-project
Converted TestArrayTypes.py to Dsym/Dwarf combination, and added verbose output
of os command to lldbtest.TestBase.system() method. llvm-svn: 112547
This commit is contained in:
parent
48043d0173
commit
a33a93cbde
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue