Modify the test cases (there are a bunch of them) under test/types so that they

employ different executable names when creating the target for lldb to debug.
Comparing the log files for the same test case with success/failure results show
that the failed one was setting the breakpoint on some different address than the
succeeded one, leading us to suspect that the file system maybe think it knows better
and caches the wrong executable file (they were all named 'a.out' before) which lldb
subsequently reads from.

Now './dotest.py -v types' passes without specifying the '-w' option.

rdar://problem/9644488
rdar://problem/9649573

llvm-svn: 133649
This commit is contained in:
Johnny Chen 2011-06-22 21:15:10 +00:00
parent 5dc6b794b1
commit bfae99cf29
6 changed files with 152 additions and 163 deletions

View File

@ -20,23 +20,12 @@ class GenericTester(TestBase):
# Assert message.
DATA_TYPE_GROKKED = "Data type from expr parser output is parsed correctly"
# FIXME: Remove this method when/if we find out the cause of the failures
# if no delays are inserted between test cases.
# def setUp(self):
# # Call super's setUp().
# TestBase.setUp(self)
# # Insert some delay for running test cases under test/types if not
# # already so by the TestBase.setUp().
# if "LLDB_WAIT_BETWEEN_TEST_CASES" not in os.environ:
# #print "some delay, please ...."
# time.sleep(1.0)
def generic_type_tester(self, atoms, quotedDisplay=False):
def generic_type_tester(self, exe_name, atoms, quotedDisplay=False):
"""Test that variables with basic types are displayed correctly."""
# First, capture the golden output emitted by the oracle, i.e., the
# series of printf statements.
go = system("./a.out", sender=self)[0]
go = system("./%s" % exe_name, sender=self)[0]
# This golden list contains a list of (variable, value) pairs extracted
# from the golden output.
gl = []
@ -54,7 +43,7 @@ class GenericTester(TestBase):
# Bring the program to the point where we can issue a series of
# 'frame variable -T' command.
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
self.runCmd("file %s" % exe_name, CURRENT_EXECUTABLE_SET)
puts_line = line_number ("basic_type.cpp", "// Here is the line we will break on to check variables")
self.expect("breakpoint set -f basic_type.cpp -l %d" % puts_line,
BREAKPOINT_CREATED,
@ -98,12 +87,12 @@ class GenericTester(TestBase):
self.expect(output, Msg(var, val, True), exe=False,
substrs = [nv])
def generic_type_expr_tester(self, atoms, quotedDisplay=False):
def generic_type_expr_tester(self, exe_name, atoms, quotedDisplay=False):
"""Test that variable expressions with basic types are evaluated correctly."""
# First, capture the golden output emitted by the oracle, i.e., the
# series of printf statements.
go = system("./a.out", sender=self)[0]
go = system("./%s" % exe_name, sender=self)[0]
# This golden list contains a list of (variable, value) pairs extracted
# from the golden output.
gl = []
@ -121,7 +110,7 @@ class GenericTester(TestBase):
# Bring the program to the point where we can issue a series of
# 'expr' command.
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
self.runCmd("file %s" % exe_name, CURRENT_EXECUTABLE_SET)
puts_line = line_number ("basic_type.cpp", "// Here is the line we will break on to check variables.")
self.expect("breakpoint set -f basic_type.cpp -l %d" % puts_line,
BREAKPOINT_CREATED,

View File

@ -12,42 +12,42 @@ class FloatTypesTestCase(AbstractBase.GenericTester):
mydir = "types"
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_float_types_with_dsym(self):
def test_float_type_with_dsym(self):
"""Test that float-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'float.cpp'}
d = {'CXX_SOURCES': 'float.cpp', 'EXE': 'float_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.float_type()
self.float_type('float_type_dsym')
def test_float_type_with_dwarf(self):
"""Test that float-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'float.cpp'}
d = {'CXX_SOURCES': 'float.cpp', 'EXE': 'float_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.float_type()
self.float_type('float_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_double_type_with_dsym(self):
"""Test that double-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'double.cpp'}
d = {'CXX_SOURCES': 'double.cpp', 'EXE': 'double_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.double_type()
self.double_type('double_type_dsym')
def test_double_type_with_dwarf(self):
"""Test that double-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'double.cpp'}
d = {'CXX_SOURCES': 'double.cpp', 'EXE': 'double_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.double_type()
self.double_type('double_type_dwarf')
def float_type(self):
def float_type(self, exe_name):
"""Test that float-type variables are displayed correctly."""
self.generic_type_tester(set(['float']))
self.generic_type_tester(exe_name, set(['float']))
def double_type(self):
def double_type(self, exe_name):
"""Test that double-type variables are displayed correctly."""
self.generic_type_tester(set(['double']))
self.generic_type_tester(exe_name, set(['double']))
if __name__ == '__main__':

View File

@ -15,42 +15,42 @@ class FloatTypesExprTestCase(AbstractBase.GenericTester):
# test/types failures for Test*TypesExpr.py: element offset computed wrong and sign error?
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_float_types_with_dsym(self):
def test_float_type_with_dsym(self):
"""Test that float-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'float.cpp'}
d = {'CXX_SOURCES': 'float.cpp', 'EXE': 'float_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.float_type_expr()
self.float_type_expr('float_type_dsym')
def test_float_type_with_dwarf(self):
"""Test that float-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'float.cpp'}
d = {'CXX_SOURCES': 'float.cpp', 'EXE': 'float_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.float_type_expr()
self.float_type_expr('float_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_double_type_with_dsym(self):
"""Test that double-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'double.cpp'}
d = {'CXX_SOURCES': 'double.cpp', 'EXE': 'double_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.double_type_expr()
self.double_type_expr('double_type_dsym')
def test_double_type_with_dwarf(self):
"""Test that double-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'double.cpp'}
d = {'CXX_SOURCES': 'double.cpp', 'EXE': 'double_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.double_type_expr()
self.double_type_expr('double_type_dwarf')
def float_type_expr(self):
def float_type_expr(self, exe_name):
"""Test that float-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['float']))
self.generic_type_expr_tester(exe_name, set(['float']))
def double_type_expr(self):
def double_type_expr(self, exe_name):
"""Test that double-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['double']))
self.generic_type_expr_tester(exe_name, set(['double']))
if __name__ == '__main__':

View File

@ -14,122 +14,122 @@ class IntegerTypesTestCase(AbstractBase.GenericTester):
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_char_type_with_dsym(self):
"""Test that char-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'char.cpp'}
d = {'CXX_SOURCES': 'char.cpp', 'EXE': 'char_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.char_type()
self.char_type('char_type_dsym')
def test_char_type_with_dwarf(self):
"""Test that char-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'char.cpp'}
d = {'CXX_SOURCES': 'char.cpp', 'EXE': 'char_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.char_type()
self.char_type('char_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_unsigned_char_type_with_dsym(self):
"""Test that 'unsigned_char'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'unsigned_char.cpp'}
d = {'CXX_SOURCES': 'unsigned_char.cpp', 'EXE': 'unsigned_char_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_char_type()
self.unsigned_char_type('unsigned_char_type_dsym')
def test_unsigned_char_type_with_dwarf(self):
"""Test that 'unsigned char'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'unsigned_char.cpp'}
d = {'CXX_SOURCES': 'unsigned_char.cpp', 'EXE': 'unsigned_char_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_char_type()
self.unsigned_char_type('unsigned_char_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_short_type_with_dsym(self):
"""Test that short-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'short.cpp'}
d = {'CXX_SOURCES': 'short.cpp', 'EXE': 'short_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.short_type()
self.short_type('short_type_dsym')
def test_short_type_with_dwarf(self):
"""Test that short-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'short.cpp'}
d = {'CXX_SOURCES': 'short.cpp', 'EXE': 'short_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.short_type()
self.short_type('short_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_unsigned_short_type_with_dsym(self):
"""Test that 'unsigned_short'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'unsigned_short.cpp'}
d = {'CXX_SOURCES': 'unsigned_short.cpp', 'EXE': 'unsigned_short_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_short_type()
self.unsigned_short_type('unsigned_short_type_dsym')
def test_unsigned_short_type_with_dwarf(self):
"""Test that 'unsigned short'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'unsigned_short.cpp'}
d = {'CXX_SOURCES': 'unsigned_short.cpp', 'EXE': 'unsigned_short_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_short_type()
self.unsigned_short_type('unsigned_short_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_int_type_with_dsym(self):
"""Test that int-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'int.cpp'}
d = {'CXX_SOURCES': 'int.cpp', 'EXE': 'int_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.int_type()
self.int_type('int_type_dsym')
def test_int_type_with_dwarf(self):
"""Test that int-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'int.cpp'}
d = {'CXX_SOURCES': 'int.cpp', 'EXE': 'int_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.int_type()
self.int_type('int_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_unsigned_int_type_with_dsym(self):
"""Test that 'unsigned_int'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'unsigned_int.cpp'}
d = {'CXX_SOURCES': 'unsigned_int.cpp', 'EXE': 'unsigned_int_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_int_type()
self.unsigned_int_type('unsigned_int_type_dsym')
def test_unsigned_int_type_with_dwarf(self):
"""Test that 'unsigned int'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'unsigned_int.cpp'}
d = {'CXX_SOURCES': 'unsigned_int.cpp', 'EXE': 'unsigned_int_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_int_type()
self.unsigned_int_type('unsigned_int_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_long_type_with_dsym(self):
"""Test that long-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'long.cpp'}
d = {'CXX_SOURCES': 'long.cpp', 'EXE': 'long_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.long_type()
self.long_type('long_type_dsym')
def test_long_type_with_dwarf(self):
"""Test that long-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'long.cpp'}
d = {'CXX_SOURCES': 'long.cpp', 'EXE': 'long_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.long_type()
self.long_type('long_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_unsigned_long_type_with_dsym(self):
"""Test that 'unsigned long'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'unsigned_long.cpp'}
d = {'CXX_SOURCES': 'unsigned_long.cpp', 'EXE': 'unsigned_long_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_long_type()
self.unsigned_long_type('unsigned_long_type_dsym')
def test_unsigned_long_type_with_dwarf(self):
"""Test that 'unsigned long'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'unsigned_long.cpp'}
d = {'CXX_SOURCES': 'unsigned_long.cpp', 'EXE': 'unsigned_long_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_long_type()
self.unsigned_long_type('unsigned_long_type_dwarf')
# rdar://problem/8482903
# test suite failure for types dir -- "long long" and "unsigned long long"
@ -137,72 +137,72 @@ class IntegerTypesTestCase(AbstractBase.GenericTester):
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_long_long_type_with_dsym(self):
"""Test that 'long long'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'long_long.cpp'}
d = {'CXX_SOURCES': 'long_long.cpp', 'EXE': 'long_long_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.long_long_type()
self.long_long_type('long_long_type_dsym')
def test_long_long_type_with_dwarf(self):
"""Test that 'long long'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'long_long.cpp'}
d = {'CXX_SOURCES': 'long_long.cpp', 'EXE': 'long_long_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.long_long_type()
self.long_long_type('long_long_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_unsigned_long_long_type_with_dsym(self):
"""Test that 'unsigned long long'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'unsigned_long_long.cpp'}
d = {'CXX_SOURCES': 'unsigned_long_long.cpp', 'EXE': 'unsigned_long_long_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_long_long_type()
self.unsigned_long_long_type('unsigned_long_long_type_dsym')
def test_unsigned_long_long_type_with_dwarf(self):
"""Test that 'unsigned long long'-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'unsigned_long_long.cpp'}
d = {'CXX_SOURCES': 'unsigned_long_long.cpp', 'EXE': 'unsigned_long_long_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_long_long_type()
self.unsigned_long_long_type('unsigned_long_long_type_dwarf')
def char_type(self):
def char_type(self, exe_name):
"""Test that char-type variables are displayed correctly."""
self.generic_type_tester(set(['char']), quotedDisplay=True)
self.generic_type_tester(exe_name, set(['char']), quotedDisplay=True)
def unsigned_char_type(self):
def unsigned_char_type(self, exe_name):
"""Test that 'unsigned char'-type variables are displayed correctly."""
self.generic_type_tester(set(['unsigned', 'char']), quotedDisplay=True)
self.generic_type_tester(exe_name, set(['unsigned', 'char']), quotedDisplay=True)
def short_type(self):
def short_type(self, exe_name):
"""Test that short-type variables are displayed correctly."""
self.generic_type_tester(set(['short']))
self.generic_type_tester(exe_name, set(['short']))
def unsigned_short_type(self):
def unsigned_short_type(self, exe_name):
"""Test that 'unsigned short'-type variables are displayed correctly."""
self.generic_type_tester(set(['unsigned', 'short']))
self.generic_type_tester(exe_name, set(['unsigned', 'short']))
def int_type(self):
def int_type(self, exe_name):
"""Test that int-type variables are displayed correctly."""
self.generic_type_tester(set(['int']))
self.generic_type_tester(exe_name, set(['int']))
def unsigned_int_type(self):
def unsigned_int_type(self, exe_name):
"""Test that 'unsigned int'-type variables are displayed correctly."""
self.generic_type_tester(set(['unsigned', 'int']))
self.generic_type_tester(exe_name, set(['unsigned', 'int']))
def long_type(self):
def long_type(self, exe_name):
"""Test that long-type variables are displayed correctly."""
self.generic_type_tester(set(['long']))
self.generic_type_tester(exe_name, set(['long']))
def unsigned_long_type(self):
def unsigned_long_type(self, exe_name):
"""Test that 'unsigned long'-type variables are displayed correctly."""
self.generic_type_tester(set(['unsigned', 'long']))
self.generic_type_tester(exe_name, set(['unsigned', 'long']))
def long_long_type(self):
def long_long_type(self, exe_name):
"""Test that long long-type variables are displayed correctly."""
self.generic_type_tester(set(['long long']))
self.generic_type_tester(exe_name, set(['long long']))
def unsigned_long_long_type(self):
def unsigned_long_long_type(self, exe_name):
"""Test that 'unsigned long long'-type variables are displayed correctly."""
self.generic_type_tester(set(['unsigned', 'long long']))
self.generic_type_tester(exe_name, set(['unsigned', 'long long']))
if __name__ == '__main__':

View File

@ -14,122 +14,122 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester):
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_char_type_with_dsym(self):
"""Test that char-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'char.cpp'}
d = {'CXX_SOURCES': 'char.cpp', 'EXE': 'char_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.char_type_expr()
self.char_type_expr('char_type_dsym')
def test_char_type_with_dwarf(self):
"""Test that char-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'char.cpp'}
d = {'CXX_SOURCES': 'char.cpp', 'EXE': 'char_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.char_type_expr()
self.char_type_expr('char_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_unsigned_char_type_with_dsym(self):
"""Test that 'unsigned_char'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'unsigned_char.cpp'}
d = {'CXX_SOURCES': 'unsigned_char.cpp', 'EXE': 'unsigned_char_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_char_type_expr()
self.unsigned_char_type_expr('unsigned_char_type_dsym')
def test_unsigned_char_type_with_dwarf(self):
"""Test that 'unsigned char'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'unsigned_char.cpp'}
d = {'CXX_SOURCES': 'unsigned_char.cpp', 'EXE': 'unsigned_char_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_char_type_expr()
self.unsigned_char_type_expr('unsigned_char_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_short_type_with_dsym(self):
"""Test that short-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'short.cpp'}
d = {'CXX_SOURCES': 'short.cpp', 'EXE': 'short_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.short_type_expr()
self.short_type_expr('short_type_dsym')
def test_short_type_with_dwarf(self):
"""Test that short-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'short.cpp'}
d = {'CXX_SOURCES': 'short.cpp', 'EXE': 'short_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.short_type_expr()
self.short_type_expr('short_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_unsigned_short_type_with_dsym(self):
"""Test that 'unsigned_short'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'unsigned_short.cpp'}
d = {'CXX_SOURCES': 'unsigned_short.cpp', 'EXE': 'unsigned_short_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_short_type_expr()
self.unsigned_short_type_expr('unsigned_short_type_dsym')
def test_unsigned_short_type_with_dwarf(self):
"""Test that 'unsigned short'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'unsigned_short.cpp'}
d = {'CXX_SOURCES': 'unsigned_short.cpp', 'EXE': 'unsigned_short_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_short_type_expr()
self.unsigned_short_type_expr('unsigned_short_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_int_type_with_dsym(self):
"""Test that int-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'int.cpp'}
d = {'CXX_SOURCES': 'int.cpp', 'EXE': 'int_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.int_type_expr()
self.int_type_expr('int_type_dsym')
def test_int_type_with_dwarf(self):
"""Test that int-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'int.cpp'}
d = {'CXX_SOURCES': 'int.cpp', 'EXE': 'int_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.int_type_expr()
self.int_type_expr('int_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_unsigned_int_type_with_dsym(self):
"""Test that 'unsigned_int'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'unsigned_int.cpp'}
d = {'CXX_SOURCES': 'unsigned_int.cpp', 'EXE': 'unsigned_int_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_int_type_expr()
self.unsigned_int_type_expr('unsigned_int_type_dsym')
def test_unsigned_int_type_with_dwarf(self):
"""Test that 'unsigned int'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'unsigned_int.cpp'}
d = {'CXX_SOURCES': 'unsigned_int.cpp', 'EXE': 'unsigned_int_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_int_type_expr()
self.unsigned_int_type_expr('unsigned_int_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_long_type_with_dsym(self):
"""Test that long-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'long.cpp'}
d = {'CXX_SOURCES': 'long.cpp', 'EXE': 'long_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.long_type_expr()
self.long_type_expr('long_type_dsym')
def test_long_type_with_dwarf(self):
"""Test that long-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'long.cpp'}
d = {'CXX_SOURCES': 'long.cpp', 'EXE': 'long_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.long_type_expr()
self.long_type_expr('long_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_unsigned_long_type_with_dsym(self):
"""Test that 'unsigned long'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'unsigned_long.cpp'}
d = {'CXX_SOURCES': 'unsigned_long.cpp', 'EXE': 'unsigned_long_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_long_type_expr()
self.unsigned_long_type_expr('unsigned_long_type_dsym')
def test_unsigned_long_type_with_dwarf(self):
"""Test that 'unsigned long'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'unsigned_long.cpp'}
d = {'CXX_SOURCES': 'unsigned_long.cpp', 'EXE': 'unsigned_long_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_long_type_expr()
self.unsigned_long_type_expr('unsigned_long_type_dwarf')
# rdar://problem/8482903
# test suite failure for types dir -- "long long" and "unsigned long long"
@ -137,72 +137,72 @@ class IntegerTypesExprTestCase(AbstractBase.GenericTester):
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_long_long_type_with_dsym(self):
"""Test that 'long long'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'long_long.cpp'}
d = {'CXX_SOURCES': 'long_long.cpp', 'EXE': 'long_long_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.long_long_type_expr()
self.long_long_type_expr('long_long_type_dsym')
def test_long_long_type_with_dwarf(self):
"""Test that 'long long'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'long_long.cpp'}
d = {'CXX_SOURCES': 'long_long.cpp', 'EXE': 'long_long_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.long_long_type_expr()
self.long_long_type_expr('long_long_type_dwarf')
@unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
def test_unsigned_long_long_type_with_dsym(self):
"""Test that 'unsigned long long'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'unsigned_long_long.cpp'}
d = {'CXX_SOURCES': 'unsigned_long_long.cpp', 'EXE': 'unsigned_long_long_type_dsym'}
self.buildDsym(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_long_long_type_expr()
self.unsigned_long_long_type_expr('unsigned_long_long_type_dsym')
def test_unsigned_long_long_type_with_dwarf(self):
"""Test that 'unsigned long long'-type variable expressions are evaluated correctly."""
d = {'CXX_SOURCES': 'unsigned_long_long.cpp'}
d = {'CXX_SOURCES': 'unsigned_long_long.cpp', 'EXE': 'unsigned_long_long_type_dwarf'}
self.buildDwarf(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.unsigned_long_long_type_expr()
self.unsigned_long_long_type_expr('unsigned_long_long_type_dwarf')
def char_type_expr(self):
def char_type_expr(self, exe_name):
"""Test that char-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['char']), quotedDisplay=True)
self.generic_type_expr_tester(exe_name, set(['char']), quotedDisplay=True)
def unsigned_char_type_expr(self):
def unsigned_char_type_expr(self, exe_name):
"""Test that 'unsigned char'-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['unsigned', 'char']), quotedDisplay=True)
self.generic_type_expr_tester(exe_name, set(['unsigned', 'char']), quotedDisplay=True)
def short_type_expr(self):
def short_type_expr(self, exe_name):
"""Test that short-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['short']))
self.generic_type_expr_tester(exe_name, set(['short']))
def unsigned_short_type_expr(self):
def unsigned_short_type_expr(self, exe_name):
"""Test that 'unsigned short'-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['unsigned', 'short']))
self.generic_type_expr_tester(exe_name, set(['unsigned', 'short']))
def int_type_expr(self):
def int_type_expr(self, exe_name):
"""Test that int-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['int']))
self.generic_type_expr_tester(exe_name, set(['int']))
def unsigned_int_type_expr(self):
def unsigned_int_type_expr(self, exe_name):
"""Test that 'unsigned int'-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['unsigned', 'int']))
self.generic_type_expr_tester(exe_name, set(['unsigned', 'int']))
def long_type_expr(self):
def long_type_expr(self, exe_name):
"""Test that long-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['long']))
self.generic_type_expr_tester(exe_name, set(['long']))
def unsigned_long_type_expr(self):
def unsigned_long_type_expr(self, exe_name):
"""Test that 'unsigned long'-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['unsigned', 'long']))
self.generic_type_expr_tester(exe_name, set(['unsigned', 'long']))
def long_long_type_expr(self):
def long_long_type_expr(self, exe_name):
"""Test that long long-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['long long']))
self.generic_type_expr_tester(exe_name, set(['long long']))
def unsigned_long_long_type_expr(self):
def unsigned_long_long_type_expr(self, exe_name):
"""Test that 'unsigned long long'-type variable expressions are evaluated correctly."""
self.generic_type_expr_tester(set(['unsigned', 'long long']))
self.generic_type_expr_tester(exe_name, set(['unsigned', 'long long']))
if __name__ == '__main__':