Merge dwarf and dsym tests
Currently most of the test files have a separate dwarf and a separate
dsym test with almost identical content (only the build step is
different). With adding dwo symbol file handling to the test suit it
would increase this to a 3-way duplication. The purpose of this change
is to eliminate this redundancy with generating 2 test case (one dwarf
and one dsym) for each test function specified (dwo handling will be
added at a later commit).
Main design goals:
* There should be no boilerplate code in each test file to support the
multiple debug info in most of the tests (custom scenarios are
acceptable in special cases) so adding a new test case is easier and
we can't miss one of the debug info type.
* In case of a test failure, the debug symbols used during the test run
have to be cleanly visible from the output of dotest.py to make
debugging easier both from build bot logs and from local test runs
* Each test case should have a unique, fully qualified name so we can
run exactly 1 test with "-f <test-case>.<test-function>" syntax
* Test output should be grouped based on test files the same way as it
happens now (displaying dwarf/dsym results separately isn't
preferable)
Proposed solution (main logic in lldbtest.py, rest of them are test
cases fixed up for the new style):
* Have only 1 test fuction in the test files what will run for all
debug info separately and this test function should call just
"self.build(...)" to build an inferior with the right debug info
* When a class is created by python (the class object, not the class
instance), we will generate a new test method for each debug info
format in the test class with the name "<test-function>_<debug-info>"
and remove the original test method. This way unittest2 see multiple
test methods (1 for each debug info, pretty much as of now) and will
handle the test selection and the failure reporting correctly (the
debug info will be visible from the end of the test name)
* Add new annotation @no_debug_info_test to disable the generation of
multiple tests for each debug info format when the test don't have an
inferior
Differential revision: http://reviews.llvm.org/D13028
llvm-svn: 248883
diff --git a/lldb/test/arm_emulation/TestEmulations.py b/lldb/test/arm_emulation/TestEmulations.py
index baf791c..0bd36f0 100644
--- a/lldb/test/arm_emulation/TestEmulations.py
+++ b/lldb/test/arm_emulation/TestEmulations.py
@@ -11,6 +11,7 @@
mydir = TestBase.compute_mydir(__file__)
+ @no_debug_info_test
def test_thumb_emulations (self):
current_dir = os.getcwd();
test_dir = os.path.join (current_dir, "new-test-files")
@@ -24,7 +25,7 @@
test_file = os.path.join (test_dir, f)
self.run_a_single_test (test_file)
-
+ @no_debug_info_test
def test_arm_emulations (self):
current_dir = os.getcwd();
test_dir = os.path.join (current_dir, "new-test-files")
diff --git a/lldb/test/benchmarks/continue/TestBenchmarkContinue.py b/lldb/test/benchmarks/continue/TestBenchmarkContinue.py
index fa18afb..c4d0de3 100644
--- a/lldb/test/benchmarks/continue/TestBenchmarkContinue.py
+++ b/lldb/test/benchmarks/continue/TestBenchmarkContinue.py
@@ -13,18 +13,9 @@
mydir = TestBase.compute_mydir(__file__)
@benchmarks_test
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
+ def test_run_command(self):
"""Benchmark different ways to continue a process"""
- self.buildDsym()
- self.data_formatter_commands()
-
- @benchmarks_test
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Benchmark different ways to continue a process"""
- self.buildDwarf()
+ self.build()
self.data_formatter_commands()
def setUp(self):
diff --git a/lldb/test/benchmarks/disassembly/TestDisassembly.py b/lldb/test/benchmarks/disassembly/TestDisassembly.py
index 9f9920d..83ed72e 100644
--- a/lldb/test/benchmarks/disassembly/TestDisassembly.py
+++ b/lldb/test/benchmarks/disassembly/TestDisassembly.py
@@ -37,6 +37,7 @@
self.count = 5
@benchmarks_test
+ @no_debug_info_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_run_lldb_then_gdb(self):
"""Test disassembly on a large function with lldb vs. gdb."""
@@ -52,6 +53,7 @@
print "lldb_avg/gdb_avg: %f" % (self.lldb_avg/self.gdb_avg)
@benchmarks_test
+ @no_debug_info_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_run_gdb_then_lldb(self):
"""Test disassembly on a large function with lldb vs. gdb."""
diff --git a/lldb/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py b/lldb/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py
index 0a5f51f..0f06497 100644
--- a/lldb/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py
+++ b/lldb/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py
@@ -22,6 +22,7 @@
self.count = 10
@benchmarks_test
+ @no_debug_info_test
def test_attach_then_disassembly(self):
"""Attach to a spawned lldb process then run disassembly benchmarks."""
print
diff --git a/lldb/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py b/lldb/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py
index aa37157..ff79866 100644
--- a/lldb/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py
+++ b/lldb/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py
@@ -22,6 +22,7 @@
self.count = 5
@benchmarks_test
+ @no_debug_info_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_run_41_then_42(self):
"""Test disassembly on a large function with 4.1 vs. 4.2's gdb."""
@@ -35,6 +36,7 @@
print "gdb_42_avg/gdb_41_avg: %f" % (self.gdb_42_avg/self.gdb_41_avg)
@benchmarks_test
+ @no_debug_info_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_run_42_then_41(self):
"""Test disassembly on a large function with 4.1 vs. 4.2's gdb."""
diff --git a/lldb/test/benchmarks/expression/TestExpressionCmd.py b/lldb/test/benchmarks/expression/TestExpressionCmd.py
index 46a8582..a9d2649 100644
--- a/lldb/test/benchmarks/expression/TestExpressionCmd.py
+++ b/lldb/test/benchmarks/expression/TestExpressionCmd.py
@@ -21,7 +21,7 @@
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_expr_cmd(self):
"""Test lldb's expression commands and collect statistics."""
- self.buildDefault()
+ self.build()
self.exe_name = 'a.out'
print
diff --git a/lldb/test/benchmarks/expression/TestRepeatedExprs.py b/lldb/test/benchmarks/expression/TestRepeatedExprs.py
index 21fe7b3..ad8f963 100644
--- a/lldb/test/benchmarks/expression/TestRepeatedExprs.py
+++ b/lldb/test/benchmarks/expression/TestRepeatedExprs.py
@@ -23,7 +23,7 @@
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_compare_lldb_to_gdb(self):
"""Test repeated expressions with lldb vs. gdb."""
- self.buildDefault()
+ self.build()
self.exe_name = 'a.out'
print
diff --git a/lldb/test/benchmarks/frame_variable/TestFrameVariableResponse.py b/lldb/test/benchmarks/frame_variable/TestFrameVariableResponse.py
index 7f738f1..b3eb7b6 100644
--- a/lldb/test/benchmarks/frame_variable/TestFrameVariableResponse.py
+++ b/lldb/test/benchmarks/frame_variable/TestFrameVariableResponse.py
@@ -25,6 +25,7 @@
self.count = 20
@benchmarks_test
+ @no_debug_info_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_startup_delay(self):
"""Test response time for the 'frame variable' command."""
diff --git a/lldb/test/benchmarks/startup/TestStartupDelays.py b/lldb/test/benchmarks/startup/TestStartupDelays.py
index f307a47..802a885 100644
--- a/lldb/test/benchmarks/startup/TestStartupDelays.py
+++ b/lldb/test/benchmarks/startup/TestStartupDelays.py
@@ -30,6 +30,7 @@
self.count = 30
@benchmarks_test
+ @no_debug_info_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_startup_delay(self):
"""Test start up delays creating a target, setting a breakpoint, and run to breakpoint stop."""
diff --git a/lldb/test/benchmarks/stepping/TestRunHooksThenSteppings.py b/lldb/test/benchmarks/stepping/TestRunHooksThenSteppings.py
index 234b96c..623e2c0 100644
--- a/lldb/test/benchmarks/stepping/TestRunHooksThenSteppings.py
+++ b/lldb/test/benchmarks/stepping/TestRunHooksThenSteppings.py
@@ -16,6 +16,7 @@
self.count = 50
@benchmarks_test
+ @no_debug_info_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_lldb_runhooks_then_steppings(self):
"""Test lldb steppings on a large executable."""
diff --git a/lldb/test/benchmarks/stepping/TestSteppingSpeed.py b/lldb/test/benchmarks/stepping/TestSteppingSpeed.py
index 23471da..7aa84c6 100644
--- a/lldb/test/benchmarks/stepping/TestSteppingSpeed.py
+++ b/lldb/test/benchmarks/stepping/TestSteppingSpeed.py
@@ -28,6 +28,7 @@
#print "self.break_spec=%s" % self.break_spec
@benchmarks_test
+ @no_debug_info_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_run_lldb_steppings(self):
"""Test lldb steppings on a large executable."""
diff --git a/lldb/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py b/lldb/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
index f7b6d4d..ab57a70 100644
--- a/lldb/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
+++ b/lldb/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
@@ -22,6 +22,7 @@
self.gdb_avg = None
@benchmarks_test
+ @no_debug_info_test
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_run_lldb_then_gdb(self):
"""Benchmark turnaround time with lldb vs. gdb."""
diff --git a/lldb/test/driver/batch_mode/TestBatchMode.py b/lldb/test/driver/batch_mode/TestBatchMode.py
index 964ff40..be285a5 100644
--- a/lldb/test/driver/batch_mode/TestBatchMode.py
+++ b/lldb/test/driver/batch_mode/TestBatchMode.py
@@ -15,21 +15,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
@skipIfRemote # test not remote-ready llvm.org/pr24813
- @dsym_test
- def test_driver_batch_mode_with_dsym(self):
- """Test that the lldb driver's batch mode works correctly."""
- self.buildDsym()
- self.setTearDownCleanup()
- self.batch_mode ()
-
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
- @skipIfRemote # test not remote-ready llvm.org/pr24813
- @dwarf_test
- def test_driver_batch_mode_with_dwarf(self):
+ def test_driver_batch_mode(self):
"""Test that the lldb driver's batch mode works correctly."""
- self.buildDwarf()
+ self.build()
self.setTearDownCleanup()
self.batch_mode()
@@ -48,7 +38,6 @@
except pexpect.TIMEOUT:
self.fail ("Timed out waiting for '%s'"%(string))
-
def batch_mode (self):
exe = os.path.join(os.getcwd(), "a.out")
prompt = "(lldb) "
@@ -95,11 +84,3 @@
index = self.child.expect([pexpect.EOF, pexpect.TIMEOUT])
self.assertTrue(index == 0, "lldb didn't close on successful batch completion.")
-
-
-
-
-
-
-
-
diff --git a/lldb/test/expression_command/call-function/TestCallStdStringFunction.py b/lldb/test/expression_command/call-function/TestCallStdStringFunction.py
index da26763..ca09285 100644
--- a/lldb/test/expression_command/call-function/TestCallStdStringFunction.py
+++ b/lldb/test/expression_command/call-function/TestCallStdStringFunction.py
@@ -18,24 +18,12 @@
self.line = line_number('main.cpp',
'// Please test these expressions while stopped at this line:')
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test calling std::String member function."""
- self.buildDsym()
- self.call_function()
-
- @dwarf_test
- @expectedFailureFreeBSD('llvm.org/pr17807') # Fails on FreeBSD buildbot
@expectedFailureIcc # llvm.org/pr14437, fails with ICC 13.1
+ @expectedFailureFreeBSD('llvm.org/pr17807') # Fails on FreeBSD buildbot
@expectedFailureWindows("llvm.org/pr21765")
- def test_with_dwarf(self):
+ def test_with(self):
"""Test calling std::String member function."""
- self.buildDwarf()
- self.call_function()
-
- def call_function(self):
- """Test calling std::String member function."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
# Some versions of GCC encode two locations for the 'return' statement in main.cpp
diff --git a/lldb/test/expression_command/call-function/TestCallStopAndContinue.py b/lldb/test/expression_command/call-function/TestCallStopAndContinue.py
index 1c50e73..1f34ad3 100644
--- a/lldb/test/expression_command/call-function/TestCallStopAndContinue.py
+++ b/lldb/test/expression_command/call-function/TestCallStopAndContinue.py
@@ -20,24 +20,11 @@
self.func_line = line_number ('main.cpp',
'{ 5, "five" }')
- @skipUnlessDarwin
- @dsym_test
- @expectedFlakeyDarwin("llvm.org/pr20274")
- def test_with_dsym(self):
- """Test gathering result from interrupted function call."""
- self.buildDsym()
- self.call_function()
-
- @dwarf_test
@expectedFlakeyDarwin("llvm.org/pr20274")
@expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
- def test_with_dwarf(self):
+ def test(self):
"""Test gathering result from interrupted function call."""
- self.buildDwarf()
- self.call_function()
-
- def call_function(self):
- """Test gathering result from interrupted function call."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
# Some versions of GCC encode two locations for the 'return' statement in main.cpp
diff --git a/lldb/test/expression_command/call-function/TestCallUserDefinedFunction.py b/lldb/test/expression_command/call-function/TestCallUserDefinedFunction.py
index e9764ef..d1a46b1e 100644
--- a/lldb/test/expression_command/call-function/TestCallUserDefinedFunction.py
+++ b/lldb/test/expression_command/call-function/TestCallUserDefinedFunction.py
@@ -22,23 +22,11 @@
# Find the line number to break for main.c.
self.line = line_number('main.cpp',
'// Please test these expressions while stopped at this line:')
- @skipUnlessDarwin
- @dsym_test
- @expectedFailureDarwin("llvm.org/pr20274") # intermittent failure on MacOSX
- def test_with_dsym(self):
- """Test return values of user defined function calls."""
- self.buildDsym()
- self.call_function()
-
- @dwarf_test
+ @expectedFailureDarwin("llvm.org/pr20274", debug_info=["dsym"]) # intermittent failure on MacOSX
@expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
- def test_with_dwarf(self):
+ def test(self):
"""Test return values of user defined function calls."""
- self.buildDwarf()
- self.call_functions()
-
- def call_functions(self):
- """Test return values of user defined function calls."""
+ self.build()
# Set breakpoint in main and run exe
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py b/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py
index e663609..289341e 100644
--- a/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py
+++ b/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py
@@ -18,22 +18,12 @@
self.main_source = "lotta-signals.c"
self.main_source_spec = lldb.SBFileSpec (self.main_source)
-
- @skipUnlessDarwin
- @dsym_test
- @skipIfDarwin # llvm.org/pr19246: intermittent failure
- def test_with_dsym(self):
- """Test calling std::String member function."""
- self.buildDsym()
- self.call_function()
-
- @dwarf_test
@skipIfFreeBSD # llvm.org/pr19246: intermittent failure
@skipIfDarwin # llvm.org/pr19246: intermittent failure
@skipIfWindows # Test relies on signals, unsupported on Windows
- def test_with_dwarf(self):
- """Test calling std::String member function."""
- self.buildDwarf()
+ def test(self):
+ """Test calling function that hits a signal and restarts."""
+ self.build()
self.call_function()
def check_after_call (self, num_sigchld):
@@ -45,9 +35,7 @@
frame = self.thread.GetFrameAtIndex(0)
self.assertTrue (self.orig_frame_pc == frame.GetPC(), "Restored the zeroth frame correctly")
-
def call_function(self):
- """Test calling function that hits a signal and restarts."""
exe_name = "a.out"
exe = os.path.join(os.getcwd(), exe_name)
diff --git a/lldb/test/expression_command/call-throws/TestCallThatThrows.py b/lldb/test/expression_command/call-throws/TestCallThatThrows.py
index 8d54e26..7d99d05 100644
--- a/lldb/test/expression_command/call-throws/TestCallThatThrows.py
+++ b/lldb/test/expression_command/call-throws/TestCallThatThrows.py
@@ -18,19 +18,10 @@
self.main_source = "call-throws.m"
self.main_source_spec = lldb.SBFileSpec (self.main_source)
-
@skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
+ def test(self):
"""Test calling a function that throws and ObjC exception."""
- self.buildDsym()
- self.call_function()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_with_dwarf(self):
- """Test calling a function that throws and ObjC exception."""
- self.buildDwarf()
+ self.build()
self.call_function()
def check_after_call (self):
diff --git a/lldb/test/expression_command/char/TestExprsChar.py b/lldb/test/expression_command/char/TestExprsChar.py
index 1f4a7a8..0a8319f 100644
--- a/lldb/test/expression_command/char/TestExprsChar.py
+++ b/lldb/test/expression_command/char/TestExprsChar.py
@@ -17,7 +17,7 @@
def do_test(self, dictionary=None):
"""These basic expression commands should work as expected."""
- self.buildDefault(dictionary = dictionary)
+ self.build(dictionary = dictionary)
target = self.dbg.CreateTarget(self.exe)
self.assertTrue(target)
diff --git a/lldb/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py b/lldb/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py
index be9832c..c8a97c7 100644
--- a/lldb/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py
+++ b/lldb/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py
@@ -11,16 +11,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_setpgid_with_dsym(self):
- self.buildDsym()
- self.expr_syscall()
-
- @dwarf_test
@expectedFailureWindows("llvm.org/pr21765") # Also getpid() is not a function on Windows anyway
- def test_setpgid_with_dwarf(self):
- self.buildDwarf()
+ def test_setpgid(self):
+ self.build()
self.expr_syscall()
def expr_syscall(self):
diff --git a/lldb/test/expression_command/formatters/TestFormatters.py b/lldb/test/expression_command/formatters/TestFormatters.py
index 721e588..12cf3e1 100644
--- a/lldb/test/expression_command/formatters/TestFormatters.py
+++ b/lldb/test/expression_command/formatters/TestFormatters.py
@@ -18,27 +18,16 @@
self.line = line_number('main.cpp',
'// Stop here')
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test expr + formatters for good interoperability."""
- self.buildDsym()
- self.do_my_test()
-
@skipIfFreeBSD # llvm.org/pr24691 skipping to avoid crashing the test runner
@expectedFailureFreeBSD('llvm.org/pr19011') # Newer Clang omits C1 complete object constructor
@expectedFailureFreeBSD('llvm.org/pr24691') # we hit an assertion in clang
@expectedFailureWindows("llvm.org/pr21765")
@skipIfTargetAndroid() # skipping to avoid crashing the test runner
@expectedFailureAndroid('llvm.org/pr24691') # we hit an assertion in clang
- @dwarf_test
- def test_with_dwarf(self):
+ def test(self):
"""Test expr + formatters for good interoperability."""
- self.buildDwarf()
- self.do_my_test()
+ self.build()
- def do_my_test(self):
-
# This is the function to remove the custom formats in order to have a
# clean slate for the next test case.
def cleanup():
diff --git a/lldb/test/expression_command/issue_11588/Test11588.py b/lldb/test/expression_command/issue_11588/Test11588.py
index c78ab5f..be631ed 100644
--- a/lldb/test/expression_command/issue_11588/Test11588.py
+++ b/lldb/test/expression_command/issue_11588/Test11588.py
@@ -26,7 +26,7 @@
self.addTearDownHook(cleanup)
"""valobj.AddressOf() should return correct values."""
- self.buildDefault()
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
diff --git a/lldb/test/expression_command/options/TestExprOptions.py b/lldb/test/expression_command/options/TestExprOptions.py
index 2dca246..ae9dcf6 100644
--- a/lldb/test/expression_command/options/TestExprOptions.py
+++ b/lldb/test/expression_command/options/TestExprOptions.py
@@ -28,7 +28,7 @@
def test_expr_options(self):
"""These expression command options should work as expected."""
- self.buildDefault()
+ self.build()
# Set debugger into synchronous mode
self.dbg.SetAsync(False)
diff --git a/lldb/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py b/lldb/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
index c1c5eb2..f58ccc1 100644
--- a/lldb/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
+++ b/lldb/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
@@ -18,26 +18,13 @@
self.line = line_number('main.m','// break here')
@skipUnlessDarwin
- @dsym_test
@expectedFailureAll(
bugnumber='http://llvm.org/pr23504',
oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
- def test_with_dsym(self):
+ def test_with(self):
"""Test that we can p *objcObject"""
- self.buildDsym()
- self.do_my_test()
+ self.build()
- @skipUnlessDarwin
- @dwarf_test
- @expectedFailureAll(
- bugnumber='http://llvm.org/pr23504',
- oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
- def test_with_dwarf(self):
- """Test that we can p *objcObject"""
- self.buildDwarf()
- self.do_my_test()
-
- def do_my_test(self):
def cleanup():
pass
diff --git a/lldb/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py b/lldb/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py
index af21086..6ea706a 100644
--- a/lldb/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py
+++ b/lldb/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py
@@ -15,21 +15,10 @@
# Call super's setUp().
TestBase.setUp(self)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
+ def test(self):
"""Test that we can have persistent pointer variables"""
- self.buildDsym()
- self.do_my_test()
+ self.build()
- @skipUnlessDarwin
- @dwarf_test
- def test_with_dwarf(self):
- """Test that we can have persistent pointer variables"""
- self.buildDwarf()
- self.do_my_test()
-
- def do_my_test(self):
def cleanup():
pass
diff --git a/lldb/test/expression_command/persistent_types/TestNestedPersistentTypes.py b/lldb/test/expression_command/persistent_types/TestNestedPersistentTypes.py
index 5802d49..b926905 100644
--- a/lldb/test/expression_command/persistent_types/TestNestedPersistentTypes.py
+++ b/lldb/test/expression_command/persistent_types/TestNestedPersistentTypes.py
@@ -14,7 +14,7 @@
@expectedFailureWindows("llvm.org/pr21765")
def test_persistent_types(self):
"""Test that nested persistent types work."""
- self.buildDefault()
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/expression_command/persistent_types/TestPersistentTypes.py b/lldb/test/expression_command/persistent_types/TestPersistentTypes.py
index 1f689b8..7f0eb64 100644
--- a/lldb/test/expression_command/persistent_types/TestPersistentTypes.py
+++ b/lldb/test/expression_command/persistent_types/TestPersistentTypes.py
@@ -14,7 +14,7 @@
@expectedFailureWindows("llvm.org/pr21765")
def test_persistent_types(self):
"""Test that lldb persistent types works correctly."""
- self.buildDefault()
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/expression_command/persistent_variables/TestPersistentVariables.py b/lldb/test/expression_command/persistent_variables/TestPersistentVariables.py
index 8e7af00..77d1c25 100644
--- a/lldb/test/expression_command/persistent_variables/TestPersistentVariables.py
+++ b/lldb/test/expression_command/persistent_variables/TestPersistentVariables.py
@@ -13,7 +13,7 @@
def test_persistent_variables(self):
"""Test that lldb persistent variables works correctly."""
- self.buildDefault()
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/expression_command/po_verbosity/TestPoVerbosity.py b/lldb/test/expression_command/po_verbosity/TestPoVerbosity.py
index dbb9daa..2a9ed7c 100644
--- a/lldb/test/expression_command/po_verbosity/TestPoVerbosity.py
+++ b/lldb/test/expression_command/po_verbosity/TestPoVerbosity.py
@@ -19,20 +19,9 @@
'// Stop here')
@skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
+ def test(self):
"""Test that the po command acts correctly."""
- self.buildDsym()
- self.do_my_test()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_with_dwarf(self):
- """Test that the po command acts correctly."""
- self.buildDwarf()
- self.do_my_test()
-
- def do_my_test(self):
+ self.build()
# This is the function to remove the custom formats in order to have a
# clean slate for the next test case.
diff --git a/lldb/test/expression_command/radar_8638051/Test8638051.py b/lldb/test/expression_command/radar_8638051/Test8638051.py
index 823c8e1..fa1f175 100644
--- a/lldb/test/expression_command/radar_8638051/Test8638051.py
+++ b/lldb/test/expression_command/radar_8638051/Test8638051.py
@@ -13,7 +13,7 @@
def test_expr_commands(self):
"""The following expression commands should not crash."""
- self.buildDefault()
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/expression_command/radar_9531204/TestPrintfAfterUp.py b/lldb/test/expression_command/radar_9531204/TestPrintfAfterUp.py
index 827fddb..0a1a9b8 100644
--- a/lldb/test/expression_command/radar_9531204/TestPrintfAfterUp.py
+++ b/lldb/test/expression_command/radar_9531204/TestPrintfAfterUp.py
@@ -16,7 +16,7 @@
@expectedFailureWindows("llvm.org/pr21765")
def test_expr_commands(self):
"""The evaluating printf(...) after break stop and then up a stack frame."""
- self.buildDefault()
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/expression_command/radar_9673664/TestExprHelpExamples.py b/lldb/test/expression_command/radar_9673664/TestExprHelpExamples.py
index 71c0852..58f0455 100644
--- a/lldb/test/expression_command/radar_9673664/TestExprHelpExamples.py
+++ b/lldb/test/expression_command/radar_9673664/TestExprHelpExamples.py
@@ -22,7 +22,7 @@
@expectedFailureWindows("llvm.org/pr21765")
def test_expr_commands(self):
"""The following expression commands should just work."""
- self.buildDefault()
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/expression_command/test/TestExprs.py b/lldb/test/expression_command/test/TestExprs.py
index 4d718aa..3545e34 100644
--- a/lldb/test/expression_command/test/TestExprs.py
+++ b/lldb/test/expression_command/test/TestExprs.py
@@ -35,7 +35,7 @@
def build_and_run(self):
"""These basic expression commands should work as expected."""
- self.buildDefault()
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
@@ -98,7 +98,7 @@
@expectedFailureWindows # Test crashes
def test_evaluate_expression_python(self):
"""Test SBFrame.EvaluateExpression() API for evaluating an expression."""
- self.buildDefault()
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
@@ -198,7 +198,7 @@
@expectedFailureWindows("llvm.org/pr21765")
def test_expr_commands_can_handle_quotes(self):
"""Throw some expression commands with quotes at lldb."""
- self.buildDefault()
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/expression_command/test/TestExprs2.py b/lldb/test/expression_command/test/TestExprs2.py
index 9395d31..5e52c5e 100644
--- a/lldb/test/expression_command/test/TestExprs2.py
+++ b/lldb/test/expression_command/test/TestExprs2.py
@@ -22,7 +22,7 @@
@expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
def test_more_expr_commands(self):
"""Test some more expression commands."""
- self.buildDefault()
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/expression_command/timeout/TestCallWithTimeout.py b/lldb/test/expression_command/timeout/TestCallWithTimeout.py
index c5b4e06..f59cd756 100644
--- a/lldb/test/expression_command/timeout/TestCallWithTimeout.py
+++ b/lldb/test/expression_command/timeout/TestCallWithTimeout.py
@@ -19,24 +19,13 @@
self.main_source_spec = lldb.SBFileSpec (self.main_source)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test calling std::String member function."""
- self.buildDsym()
- self.call_function()
-
@expectedFlakeyFreeBSD("llvm.org/pr19605")
@expectedFlakeyLinux("llvm.org/pr20275")
@expectedFailureWindows("llvm.org/pr21765")
- @dwarf_test
- def test_with_dwarf(self):
+ def test(self):
"""Test calling std::String member function."""
- self.buildDwarf()
- self.call_function()
+ self.build()
- def call_function(self):
- """Test calling function with timeout."""
exe_name = "a.out"
exe = os.path.join(os.getcwd(), exe_name)
diff --git a/lldb/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py b/lldb/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
index 9f3a18d..8279a756 100644
--- a/lldb/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
+++ b/lldb/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
@@ -21,21 +21,9 @@
"// Set breakpoint here, then do 'expr (NSArray*)array_token'.")
@skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
+ def test(self):
"""The expression parser's type search should be wider than the current compilation unit."""
- self.buildDsym()
- self.type_query_from_other_cu()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_with_dwarf(self):
- """The expression parser's type search should be wider than the current compilation unit."""
- self.buildDwarf()
- self.type_query_from_other_cu()
-
- def type_query_from_other_cu(self):
- """The expression parser's type search should be wider than the current compilation unit."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/abbreviation/TestAbbreviations.py b/lldb/test/functionalities/abbreviation/TestAbbreviations.py
index 6920847..d0bbd15 100644
--- a/lldb/test/functionalities/abbreviation/TestAbbreviations.py
+++ b/lldb/test/functionalities/abbreviation/TestAbbreviations.py
@@ -13,6 +13,7 @@
mydir = TestBase.compute_mydir(__file__)
@expectedFlakeyFreeBSD("llvm.org/pr22611 thread race condition breaks prompt setting")
+ @no_debug_info_test
def test_command_abbreviations_and_aliases (self):
command_interpreter = self.dbg.GetCommandInterpreter()
self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER)
diff --git a/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py b/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py
index c01a031..5f7e84d 100644
--- a/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py
+++ b/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py
@@ -13,6 +13,7 @@
mydir = TestBase.compute_mydir(__file__)
+ @no_debug_info_test
def test_abbrevs2 (self):
command_interpreter = self.dbg.GetCommandInterpreter()
self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER)
diff --git a/lldb/test/functionalities/archives/TestBSDArchives.py b/lldb/test/functionalities/archives/TestBSDArchives.py
index b04a905..0404e25 100644
--- a/lldb/test/functionalities/archives/TestBSDArchives.py
+++ b/lldb/test/functionalities/archives/TestBSDArchives.py
@@ -10,20 +10,17 @@
mydir = TestBase.compute_mydir(__file__)
- @expectedFailureWindows("llvm.org/pr24527") # Makefile.rules doesn't know how to build static libs on Windows.
- def test_with_dwarf(self):
- """Break inside a() and b() defined within libfoo.a."""
- self.buildDwarf()
- self.break_inside_bsd_archives()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number in a(int) to break at.
self.line = line_number('a.c', '// Set file and line breakpoint inside a().')
- def break_inside_bsd_archives(self):
+ @expectedFailureWindows("llvm.org/pr24527") # Makefile.rules doesn't know how to build static libs on Windows.
+ def test(self):
"""Break inside a() and b() defined within libfoo.a."""
+ self.build()
+
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/asan/TestMemoryHistory.py b/lldb/test/functionalities/asan/TestMemoryHistory.py
index 9c5c3e7..541c1c5 100644
--- a/lldb/test/functionalities/asan/TestMemoryHistory.py
+++ b/lldb/test/functionalities/asan/TestMemoryHistory.py
@@ -16,23 +16,13 @@
# may not have the debugging API which was recently added, so we're calling
# self.useBuiltClang() to use clang from the llvm-build directory instead
- @dsym_test
- @skipIfRemote
- @skipUnlessCompilerRt
- @skipUnlessDarwin
- def test_with_dsym (self):
- compiler = self.findBuiltClang ()
- self.buildDsym (None, compiler)
- self.asan_tests ()
-
- @dwarf_test
@expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07)
@skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
@skipIfRemote
@skipUnlessCompilerRt
- def test_with_dwarf (self):
+ def test (self):
compiler = self.findBuiltClang ()
- self.buildDwarf (None, compiler)
+ self.build (None, compiler)
self.asan_tests ()
def setUp(self):
diff --git a/lldb/test/functionalities/asan/TestReportData.py b/lldb/test/functionalities/asan/TestReportData.py
index 235ba03..cfa0141 100644
--- a/lldb/test/functionalities/asan/TestReportData.py
+++ b/lldb/test/functionalities/asan/TestReportData.py
@@ -17,23 +17,13 @@
# may not have the debugging API which was recently added, so we're calling
# self.useBuiltClang() to use clang from the llvm-build directory instead
- @dsym_test
- @skipIfRemote
- @skipUnlessCompilerRt
- @skipUnlessDarwin
- def test_with_dsym (self):
- compiler = self.findBuiltClang ()
- self.buildDsym (None, compiler)
- self.asan_tests ()
-
- @dwarf_test
@expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07)
@skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
@skipIfRemote
@skipUnlessCompilerRt
- def test_with_dwarf (self):
+ def test(self):
compiler = self.findBuiltClang ()
- self.buildDwarf (None, compiler)
+ self.build (None, compiler)
self.asan_tests ()
def setUp(self):
diff --git a/lldb/test/functionalities/attach_resume/TestAttachResume.py b/lldb/test/functionalities/attach_resume/TestAttachResume.py
index ec6e626..88df25b 100644
--- a/lldb/test/functionalities/attach_resume/TestAttachResume.py
+++ b/lldb/test/functionalities/attach_resume/TestAttachResume.py
@@ -14,17 +14,15 @@
mydir = TestBase.compute_mydir(__file__)
+ @skipIfRemote
@expectedFailureFreeBSD('llvm.org/pr19310')
@expectedFlakeyLinux('llvm.org/pr19310')
@expectedFailureWindows("llvm.org/pr24778")
- @skipIfRemote
- @dwarf_test
def test_attach_continue_interrupt_detach(self):
"""Test attach/continue/interrupt/detach"""
- self.buildDwarf()
+ self.build()
self.process_attach_continue_interrupt_detach()
- @skipIfRemote
def process_attach_continue_interrupt_detach(self):
"""Test attach/continue/interrupt/detach"""
diff --git a/lldb/test/functionalities/avoids-fd-leak/TestFdLeak.py b/lldb/test/functionalities/avoids-fd-leak/TestFdLeak.py
index c56c1ad..c28221a 100644
--- a/lldb/test/functionalities/avoids-fd-leak/TestFdLeak.py
+++ b/lldb/test/functionalities/avoids-fd-leak/TestFdLeak.py
@@ -32,7 +32,7 @@
self.do_test(["log enable -f '/dev/null' lldb commands"])
def do_test (self, commands):
- self.buildDefault()
+ self.build()
exe = os.path.join (os.getcwd(), "a.out")
for c in commands:
@@ -52,7 +52,7 @@
@skipIfWindows # The check for descriptor leakage needs to be implemented differently here.
@skipIfTargetAndroid() # Android have some other file descriptors open by the shell
def test_fd_leak_multitarget (self):
- self.buildDefault()
+ self.build()
exe = os.path.join (os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/functionalities/backticks/TestBackticksWithoutATarget.py b/lldb/test/functionalities/backticks/TestBackticksWithoutATarget.py
index 7c8cf86..7d9be67 100644
--- a/lldb/test/functionalities/backticks/TestBackticksWithoutATarget.py
+++ b/lldb/test/functionalities/backticks/TestBackticksWithoutATarget.py
@@ -11,6 +11,7 @@
mydir = TestBase.compute_mydir(__file__)
+ @no_debug_info_test
def test_backticks_no_target(self):
"""A simple test of backticks without a target."""
self.expect("print `1+2-3`",
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
index 80bf487..d6a9f70 100644
--- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
+++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
@@ -18,19 +18,10 @@
cls.RemoveTempFile("output.txt")
cls.RemoveTempFile("output2.txt")
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test a sequence of breakpoint command add, list, and delete."""
- self.buildDsym()
- self.breakpoint_command_sequence()
- self.breakpoint_command_script_parameters ()
-
- @dwarf_test
@expectedFailureWindows("llvm.org/pr24528")
- def test_with_dwarf(self):
+ def test(self):
"""Test a sequence of breakpoint command add, list, and delete."""
- self.buildDwarf()
+ self.build()
self.breakpoint_command_sequence()
self.breakpoint_command_script_parameters ()
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
index 7fab045..c7bc773 100644
--- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
+++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
@@ -14,19 +14,10 @@
mydir = TestBase.compute_mydir(__file__)
my_var = 10
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_step_out_with_dsym_python(self):
+ def test_step_out_python(self):
"""Test stepping out using avoid-no-debug with dsyms."""
- self.buildDsym()
- self.do_set_python_command_from_python()
-
- @python_api_test
- @dwarf_test
- def test_step_out_with_dwarf_python(self):
- """Test stepping out using avoid-no-debug with dsyms."""
- self.buildDwarf()
+ self.build()
self.do_set_python_command_from_python ()
def setUp (self):
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py
index ca95f36..e5fda67 100644
--- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py
+++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py
@@ -12,17 +12,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
+ def test(self):
"""Test _regexp-break command."""
- self.buildDsym()
- self.regexp_break_command()
-
- @dwarf_test
- def test_with_dwarf(self):
- """Test _regexp-break command."""
- self.buildDwarf()
+ self.build()
self.regexp_break_command()
def setUp(self):
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py b/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
index a60a917..1aa0154 100644
--- a/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
+++ b/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
@@ -12,48 +12,23 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_breakpoint_condition_with_dsym_and_run_command(self):
+ @skipIfWindows # Requires EE to support COFF on Windows (http://llvm.org/pr22232)
+ def test_breakpoint_condition_and_run_command(self):
"""Exercise breakpoint condition with 'breakpoint modify -c <expr> id'."""
- self.buildDsym()
+ self.build()
self.breakpoint_conditions()
- @skipUnlessDarwin
- @dsym_test
- def test_breakpoint_condition_inline_with_dsym_and_run_command(self):
+ @skipIfWindows # Requires EE to support COFF on Windows (http://llvm.org/pr22232)
+ def test_breakpoint_condition_inline_and_run_command(self):
"""Exercise breakpoint condition inline with 'breakpoint set'."""
- self.buildDsym()
+ self.build()
self.breakpoint_conditions(inline=True)
- @skipUnlessDarwin
+ @skipIfWindows # Requires EE to support COFF on Windows (http://llvm.org/pr22232)
@python_api_test
- @dsym_test
- def test_breakpoint_condition_with_dsym_and_python_api(self):
+ def test_breakpoint_condition_and_python_api(self):
"""Use Python APIs to set breakpoint conditions."""
- self.buildDsym()
- self.breakpoint_conditions_python()
-
- @dwarf_test
- @skipIfWindows # Requires EE to support COFF on Windows (http://llvm.org/pr22232)
- def test_breakpoint_condition_with_dwarf_and_run_command(self):
- """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'."""
- self.buildDwarf()
- self.breakpoint_conditions()
-
- @dwarf_test
- @skipIfWindows # Requires EE to support COFF on Windows (http://llvm.org/pr22232)
- def test_breakpoint_condition_inline_with_dwarf_and_run_command(self):
- """Exercise breakpoint condition inline with 'breakpoint set'."""
- self.buildDwarf()
- self.breakpoint_conditions(inline=True)
-
- @python_api_test
- @dwarf_test
- @skipIfWindows # Requires EE to support COFF on Windows (http://llvm.org/pr22232)
- def test_breakpoint_condition_with_dwarf_and_python_api(self):
- """Use Python APIs to set breakpoint conditions."""
- self.buildDwarf()
+ self.build()
self.breakpoint_conditions_python()
def setUp(self):
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py b/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py
index 23d7e8a..efab6fb 100644
--- a/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py
+++ b/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py
@@ -12,18 +12,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym (self):
- self.buildDsym ()
- self.breakpoint_id_tests ()
+ def test (self):
+ self.build()
- @dwarf_test
- def test_with_dwarf (self):
- self.buildDwarf ()
- self.breakpoint_id_tests ()
-
- def breakpoint_id_tests (self):
exe = os.path.join (os.getcwd(), "a.out")
self.expect("file " + exe,
patterns = [ "Current executable set to .*a.out" ])
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py b/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
index 7655af3..6daa68d 100644
--- a/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
+++ b/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
@@ -12,32 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
+ def test_with_run_command(self):
"""Exercise breakpoint ignore count with 'breakpoint set -i <count>'."""
- self.buildDsym()
- self.breakpoint_ignore_count()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Use Python APIs to set breakpoint ignore count."""
- self.buildDsym()
- self.breakpoint_ignore_count_python()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Exercise breakpoint ignore count with 'breakpoint set -i <count>'."""
- self.buildDwarf()
+ self.build()
self.breakpoint_ignore_count()
@python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
+ def test_with_python_api(self):
"""Use Python APIs to set breakpoint ignore count."""
- self.buildDwarf()
+ self.build()
self.breakpoint_ignore_count_python()
def setUp(self):
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py b/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
index 27d91ad..4e95711 100644
--- a/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
+++ b/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
@@ -12,18 +12,10 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test breakpoint enable/disable for a breakpoint ID with multiple locations."""
- self.buildDsym()
- self.breakpoint_locations_test()
-
- @dwarf_test
@expectedFailureWindows("llvm.org/pr24528")
- def test_with_dwarf(self):
+ def test(self):
"""Test breakpoint enable/disable for a breakpoint ID with multiple locations."""
- self.buildDwarf()
+ self.build()
self.breakpoint_locations_test()
def setUp(self):
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py b/lldb/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
index 2efa53a..b71fbab 100644
--- a/lldb/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
+++ b/lldb/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
@@ -12,17 +12,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
+ def test(self):
"""Test breakpoint command for different options."""
- self.buildDsym()
- self.breakpoint_options_test()
-
- @dwarf_test
- def test_with_dwarf(self):
- """Test breakpoint command for different options."""
- self.buildDwarf()
+ self.build()
self.breakpoint_options_test()
def setUp(self):
diff --git a/lldb/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py b/lldb/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
index 67a29a4..d67c43f 100644
--- a/lldb/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
+++ b/lldb/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
@@ -24,27 +24,24 @@
self.line = line_number(_SRC_FILE, '// Set break point at this line.')
self.src_path = os.path.join(os.getcwd(), _SRC_FILE)
- @dwarf_test
@skipIfHostWindows
def test_symlink_paths_set(self):
pwd_symlink = self.create_src_symlink()
- self.build(pwd_symlink)
+ self.doBuild(pwd_symlink)
self.runCmd("settings set %s %s" % (_COMP_DIR_SYM_LINK_PROP, pwd_symlink))
lldbutil.run_break_set_by_file_and_line(self, self.src_path, self.line)
- @dwarf_test
@skipUnlessHostLinux
def test_symlink_paths_set_procselfcwd(self):
pwd_symlink = '/proc/self/cwd'
- self.build(pwd_symlink)
+ self.doBuild(pwd_symlink)
self.runCmd("settings set %s %s" % (_COMP_DIR_SYM_LINK_PROP, pwd_symlink))
lldbutil.run_break_set_by_file_and_line(self, self.src_path, self.line)
- @dwarf_test
@skipIfHostWindows
def test_symlink_paths_unset(self):
pwd_symlink = self.create_src_symlink()
- self.build(pwd_symlink)
+ self.doBuild(pwd_symlink)
self.runCmd('settings clear ' + _COMP_DIR_SYM_LINK_PROP)
self.assertRaises(AssertionError, lldbutil.run_break_set_by_file_and_line, self, self.src_path, self.line)
@@ -54,8 +51,8 @@
self.addTearDownHook(lambda: os.remove(pwd_symlink))
return pwd_symlink
- def build(self, pwd_symlink):
- self.buildDwarf(None, None, {'PWD': pwd_symlink}, True)
+ def doBuild(self, pwd_symlink):
+ self.build(None, None, {'PWD': pwd_symlink}, True)
exe = os.path.join(os.getcwd(), _EXE_NAME)
self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py b/lldb/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
index fe1459f..5f94352 100644
--- a/lldb/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
+++ b/lldb/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
@@ -10,17 +10,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
@unittest2.expectedFailure("llvm.org/pr23478")
- def test_with_dsym (self):
- self.buildDsym ()
- self.consecutive_breakpoints_tests()
-
- @dwarf_test
- @unittest2.expectedFailure("llvm.org/pr23478")
- def test_with_dwarf (self):
- self.buildDwarf ()
+ def test (self):
+ self.build ()
self.consecutive_breakpoints_tests()
def consecutive_breakpoints_tests(self):
diff --git a/lldb/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py b/lldb/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
index 8fcd08b..23ccbb5 100644
--- a/lldb/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
+++ b/lldb/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
@@ -12,16 +12,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym (self):
- self.buildDsym ()
- self.breakpoint_id_tests ()
-
- @dwarf_test
@expectedFailureWindows("llvm.org/pr24764")
- def test_with_dwarf (self):
- self.buildDwarf ()
+ def test (self):
+ self.build ()
self.breakpoint_id_tests ()
def verify_breakpoint_locations(self, target, bp_dict):
diff --git a/lldb/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py b/lldb/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
index 5078fcd..aa52a2c 100644
--- a/lldb/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
+++ b/lldb/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
@@ -14,20 +14,11 @@
mydir = TestBase.compute_mydir(__file__)
my_var = 10
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_cpp_exception_breakpoint (self):
- """Test setting and hitting the C++ exception breakpoint."""
- self.buildDsym()
- self.do_cpp_exception_bkpt ()
-
@python_api_test
@expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support throw or catch
- @dwarf_test
- def test_cpp_exception_breakpoint_with_dwarf(self):
+ def test_cpp_exception_breakpoint(self):
"""Test setting and hitting the C++ exception breakpoint."""
- self.buildDwarf()
+ self.build()
self.do_cpp_exception_bkpt ()
def setUp (self):
diff --git a/lldb/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py b/lldb/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
index de532c8..65197ed 100644
--- a/lldb/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
+++ b/lldb/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
@@ -12,17 +12,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
+ def test(self):
"""Test breakpoint set before we have a target. """
- self.buildDsym()
- self.dummy_breakpoint_test()
-
- @dwarf_test
- def test_with_dwarf(self):
- """Test breakpoint set before we have a target. """
- self.buildDwarf()
+ self.build()
self.dummy_breakpoint_test()
def setUp(self):
diff --git a/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py b/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py
index d3549dc..5681b12 100644
--- a/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py
+++ b/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py
@@ -14,17 +14,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
+ def test_with_run_command(self):
"""Test 'b basic_types.cpp:176' does break (where int.cpp includes basic_type.cpp)."""
- self.buildDsym()
- self.inlined_breakpoints()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test 'b basic_types.cpp:176' does break (where int.cpp includes basic_type.cpp)."""
- self.buildDwarf()
+ self.build()
self.inlined_breakpoints()
def setUp(self):
diff --git a/lldb/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py b/lldb/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py
index 1c82379..6feb31a 100644
--- a/lldb/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py
+++ b/lldb/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py
@@ -16,17 +16,9 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_break_with_dsym(self):
- """Test setting Objective C specific breakpoints (dSYM)."""
- self.buildDsym()
- self.setTearDownCleanup()
- self.check_objc_breakpoints(True)
-
- @dwarf_test
- def test_break_with_dwarf(self):
+ def test_break(self):
"""Test setting Objective C specific breakpoints (DWARF in .o files)."""
- self.buildDwarf()
+ self.build()
self.setTearDownCleanup()
self.check_objc_breakpoints(False)
diff --git a/lldb/test/functionalities/command_history/TestCommandHistory.py b/lldb/test/functionalities/command_history/TestCommandHistory.py
index 0644f4b..6cca992 100644
--- a/lldb/test/functionalities/command_history/TestCommandHistory.py
+++ b/lldb/test/functionalities/command_history/TestCommandHistory.py
@@ -11,6 +11,7 @@
mydir = TestBase.compute_mydir(__file__)
+ @no_debug_info_test
def test_history(self):
self.runCmd('command history --clear', inHistory=False)
self.runCmd('breakpoint list', check=False, inHistory=True) #0
diff --git a/lldb/test/functionalities/command_regex/TestCommandRegex.py b/lldb/test/functionalities/command_regex/TestCommandRegex.py
index 5db123c..93c0aa4 100644
--- a/lldb/test/functionalities/command_regex/TestCommandRegex.py
+++ b/lldb/test/functionalities/command_regex/TestCommandRegex.py
@@ -12,6 +12,7 @@
mydir = TestBase.compute_mydir(__file__)
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
+ @no_debug_info_test
def test_command_regex(self):
"""Test a simple scenario of 'command regex' invocation and subsequent use."""
import pexpect
diff --git a/lldb/test/functionalities/command_script/TestCommandScript.py b/lldb/test/functionalities/command_script/TestCommandScript.py
index 61685d8..40d0b69 100644
--- a/lldb/test/functionalities/command_script/TestCommandScript.py
+++ b/lldb/test/functionalities/command_script/TestCommandScript.py
@@ -11,15 +11,8 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym (self):
- self.buildDsym ()
- self.pycmd_tests ()
-
- @dwarf_test
- def test_with_dwarf (self):
- self.buildDwarf ()
+ def test (self):
+ self.build ()
self.pycmd_tests ()
def pycmd_tests (self):
diff --git a/lldb/test/functionalities/command_script/import/TestImport.py b/lldb/test/functionalities/command_script/import/TestImport.py
index 393285b..a00db8e 100644
--- a/lldb/test/functionalities/command_script/import/TestImport.py
+++ b/lldb/test/functionalities/command_script/import/TestImport.py
@@ -10,6 +10,7 @@
mydir = TestBase.compute_mydir(__file__)
@python_api_test
+ @no_debug_info_test
def test_import_command(self):
"""Import some Python scripts by path and test them"""
self.run_test()
diff --git a/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py b/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
index c3ee8ff..1736819 100644
--- a/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
+++ b/lldb/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
@@ -10,6 +10,7 @@
mydir = TestBase.compute_mydir(__file__)
@python_api_test
+ @no_debug_info_test
def test_rdar12586188_command(self):
"""Check that we handle an ImportError in a special way when command script importing files."""
self.run_test()
diff --git a/lldb/test/functionalities/command_source/TestCommandSource.py b/lldb/test/functionalities/command_source/TestCommandSource.py
index 413b344..122d4c6 100644
--- a/lldb/test/functionalities/command_source/TestCommandSource.py
+++ b/lldb/test/functionalities/command_source/TestCommandSource.py
@@ -13,6 +13,7 @@
mydir = TestBase.compute_mydir(__file__)
+ @no_debug_info_test
def test_command_source(self):
"""Test that lldb command "command source" works correctly."""
diff --git a/lldb/test/functionalities/completion/TestCompletion.py b/lldb/test/functionalities/completion/TestCompletion.py
index 5af1edb..638c894 100644
--- a/lldb/test/functionalities/completion/TestCompletion.py
+++ b/lldb/test/functionalities/completion/TestCompletion.py
@@ -22,18 +22,21 @@
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_at(self):
"""Test that 'at' completes to 'attach '."""
self.complete_from_to('at', 'attach ')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_de(self):
"""Test that 'de' completes to 'detach '."""
self.complete_from_to('de', 'detach ')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_process_attach_dash_dash_con(self):
"""Test that 'process attach --con' completes to 'process attach --continue '."""
self.complete_from_to('process attach --con', 'process attach --continue ')
@@ -41,6 +44,7 @@
# <rdar://problem/11052829>
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_infinite_loop_while_completing(self):
"""Test that 'process print hello\' completes to itself and does not infinite loop."""
self.complete_from_to('process print hello\\', 'process print hello\\',
@@ -48,126 +52,147 @@
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_watchpoint_co(self):
"""Test that 'watchpoint co' completes to 'watchpoint command '."""
self.complete_from_to('watchpoint co', 'watchpoint command ')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_watchpoint_command_space(self):
"""Test that 'watchpoint command ' completes to ['Available completions:', 'add', 'delete', 'list']."""
self.complete_from_to('watchpoint command ', ['Available completions:', 'add', 'delete', 'list'])
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_watchpoint_command_a(self):
"""Test that 'watchpoint command a' completes to 'watchpoint command add '."""
self.complete_from_to('watchpoint command a', 'watchpoint command add ')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_watchpoint_set_variable_dash_w(self):
"""Test that 'watchpoint set variable -w' completes to 'watchpoint set variable -w '."""
self.complete_from_to('watchpoint set variable -w', 'watchpoint set variable -w ')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_watchpoint_set_variable_dash_w_space(self):
"""Test that 'watchpoint set variable -w ' completes to ['Available completions:', 'read', 'write', 'read_write']."""
self.complete_from_to('watchpoint set variable -w ', ['Available completions:', 'read', 'write', 'read_write'])
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_watchpoint_set_ex(self):
"""Test that 'watchpoint set ex' completes to 'watchpoint set expression '."""
self.complete_from_to('watchpoint set ex', 'watchpoint set expression ')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_watchpoint_set_var(self):
"""Test that 'watchpoint set var' completes to 'watchpoint set variable '."""
self.complete_from_to('watchpoint set var', 'watchpoint set variable ')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_watchpoint_set_variable_dash_w_read_underbar(self):
"""Test that 'watchpoint set variable -w read_' completes to 'watchpoint set variable -w read_write'."""
self.complete_from_to('watchpoint set variable -w read_', 'watchpoint set variable -w read_write')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_help_fi(self):
"""Test that 'help fi' completes to ['Available completions:', 'file', 'finish']."""
self.complete_from_to('help fi', ['Available completions:', 'file', 'finish'])
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_help_watchpoint_s(self):
"""Test that 'help watchpoint s' completes to 'help watchpoint set '."""
self.complete_from_to('help watchpoint s', 'help watchpoint set ')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_append_target_er(self):
"""Test that 'settings append target.er' completes to 'settings append target.error-path'."""
self.complete_from_to('settings append target.er', 'settings append target.error-path')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_insert_after_target_en(self):
"""Test that 'settings insert-after target.env' completes to 'settings insert-after target.env-vars'."""
self.complete_from_to('settings insert-after target.env', 'settings insert-after target.env-vars')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_insert_before_target_en(self):
"""Test that 'settings insert-before target.env' completes to 'settings insert-before target.env-vars'."""
self.complete_from_to('settings insert-before target.env', 'settings insert-before target.env-vars')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_replace_target_ru(self):
"""Test that 'settings replace target.ru' completes to 'settings replace target.run-args'."""
self.complete_from_to('settings replace target.ru', 'settings replace target.run-args')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_s(self):
"""Test that 'settings s' completes to ['Available completions:', 'set', 'show']."""
self.complete_from_to('settings s', ['Available completions:', 'set', 'show'])
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_set_th(self):
"""Test that 'settings set th' completes to 'settings set thread-format'."""
self.complete_from_to('settings set th', 'settings set thread-format')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_s_dash(self):
"""Test that 'settings set -' completes to 'settings set -g'."""
self.complete_from_to('settings set -', 'settings set -g')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_clear_th(self):
"""Test that 'settings clear th' completes to 'settings clear thread-format'."""
self.complete_from_to('settings clear th', 'settings clear thread-format')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_set_ta(self):
"""Test that 'settings set ta' completes to 'settings set target.'."""
self.complete_from_to('settings set ta', 'settings set target.')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_set_target_exec(self):
"""Test that 'settings set target.exec' completes to 'settings set target.exec-search-paths '."""
self.complete_from_to('settings set target.exec', 'settings set target.exec-search-paths')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_set_target_pr(self):
"""Test that 'settings set target.pr' completes to ['Available completions:',
'target.prefer-dynamic-value', 'target.process.']."""
@@ -178,18 +203,21 @@
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_set_target_process(self):
"""Test that 'settings set target.process' completes to 'settings set target.process.'."""
self.complete_from_to('settings set target.process', 'settings set target.process.')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_set_target_process_dot(self):
"""Test that 'settings set target.process.t' completes to 'settings set target.process.thread.'."""
self.complete_from_to('settings set target.process.t', 'settings set target.process.thread.')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_settings_set_target_process_thread_dot(self):
"""Test that 'settings set target.process.thread.' completes to ['Available completions:',
'target.process.thread.step-avoid-regexp', 'target.process.thread.trace-thread']."""
@@ -200,6 +228,7 @@
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_target_space(self):
"""Test that 'target ' completes to ['Available completions:', 'create', 'delete', 'list',
'modules', 'select', 'stop-hook', 'variable']."""
@@ -209,29 +238,21 @@
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_target_create_dash_co(self):
"""Test that 'target create --co' completes to 'target variable --core '."""
self.complete_from_to('target create --co', 'target create --core ')
@expectedFailureHostWindows("llvm.org/pr24679")
@skipIfFreeBSD # timing out on the FreeBSD buildbot
+ @no_debug_info_test
def test_target_va(self):
"""Test that 'target va' completes to 'target variable '."""
self.complete_from_to('target va', 'target variable ')
- @skipUnlessDarwin
- @dsym_test
- def test_symbol_name_dsym(self):
- self.buildDsym()
- self.complete_from_to('''file a.out
- breakpoint set -n Fo''',
- 'breakpoint set -n Foo::Bar(int,\\ int)',
- turn_off_re_match=True)
-
@expectedFailureHostWindows("llvm.org/pr24679")
- @dwarf_test
- def test_symbol_name_dwarf(self):
- self.buildDwarf()
+ def test_symbol_name(self):
+ self.build()
self.complete_from_to('''file a.out
breakpoint set -n Fo''',
'breakpoint set -n Foo::Bar(int,\\ int)',
diff --git a/lldb/test/functionalities/conditional_break/TestConditionalBreak.py b/lldb/test/functionalities/conditional_break/TestConditionalBreak.py
index 2ebb471..4ca3a01 100644
--- a/lldb/test/functionalities/conditional_break/TestConditionalBreak.py
+++ b/lldb/test/functionalities/conditional_break/TestConditionalBreak.py
@@ -17,33 +17,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_python(self):
- """Exercise some thread and frame APIs to break if c() is called by a()."""
- self.buildDsym()
- self.do_conditional_break()
-
@expectedFailureWindows("llvm.org/pr24778")
@python_api_test
- @dwarf_test
- def test_with_dwarf_python(self):
+ def test_with_python(self):
"""Exercise some thread and frame APIs to break if c() is called by a()."""
- self.buildDwarf()
+ self.build()
self.do_conditional_break()
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_command(self):
+ def test_with_command(self):
"""Simulate a user using lldb commands to break on c() if called from a()."""
- self.buildDsym()
- self.simulate_conditional_break_by_user()
-
- @dwarf_test
- def test_with_dwarf_command(self):
- """Simulate a user using lldb commands to break on c() if called from a()."""
- self.buildDwarf()
+ self.build()
self.simulate_conditional_break_by_user()
def do_conditional_break(self):
diff --git a/lldb/test/functionalities/connect_remote/TestConnectRemote.py b/lldb/test/functionalities/connect_remote/TestConnectRemote.py
index f7c40b4..2486afd 100644
--- a/lldb/test/functionalities/connect_remote/TestConnectRemote.py
+++ b/lldb/test/functionalities/connect_remote/TestConnectRemote.py
@@ -16,6 +16,7 @@
@expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@expectedFailureLinux("llvm.org/pr23475") # Test occasionally times out on the Linux build bot
@skipIfLinux # Test occasionally times out on the Linux build bot
+ @no_debug_info_test
def test_connect_remote(self):
"""Test "process connect connect:://localhost:[port]"."""
diff --git a/lldb/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py b/lldb/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
index 092737b..4464ba0 100644
--- a/lldb/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
+++ b/lldb/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
@@ -14,17 +14,9 @@
mydir = TestBase.compute_mydir(__file__)
@skipUnlessDarwin
- @dsym_test
- def test_boolrefptr_with_dsym_and_run_command(self):
+ def test_boolrefptr_with_run_command(self):
"""Test the formatters we use for BOOL& and BOOL* in Objective-C."""
- self.buildDsym()
- self.boolrefptr_data_formatter_commands()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_boolrefptr_with_dwarf_and_run_command(self):
- """Test the formatters we use for BOOL& and BOOL* in Objective-C."""
- self.buildDwarf()
+ self.build()
self.boolrefptr_data_formatter_commands()
def setUp(self):
diff --git a/lldb/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py b/lldb/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py
index 35a5ebe..eeb5ffb 100644
--- a/lldb/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py
+++ b/lldb/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py
@@ -12,28 +12,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ @skipUnlessDarwin
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py b/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
index 702563a..97dcb74 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py b/lldb/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
index 299e322..6aa51e0 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py b/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
index 6ac9d1d..259abc0 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
@@ -12,28 +12,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py b/lldb/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
index 25cea2a..e15f17d 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
@@ -12,28 +12,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows
+ def test_with_run_command(self):
"""Check that we can properly disable all data formatter categories."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py b/lldb/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py
index 98891e5..4c3d390 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py b/lldb/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
index 0b5817f..44ed11b 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py b/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py
index 64e68e5..12f59b7 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py b/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
index 89ccd5f..3aae3e5 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py
@@ -15,180 +15,81 @@
mydir = TestBase.compute_mydir(__file__)
@skipUnlessDarwin
- @dsym_test
- def test_plain_objc_with_dsym_and_run_command(self):
+ def test_plain_objc_with_run_command(self):
"""Test basic ObjC formatting behavior."""
- self.buildDsym()
+ self.build()
self.plain_data_formatter_commands()
- @skipUnlessDarwin
- @dwarf_test
- def test_plain_objc_with_dwarf_and_run_command(self):
- """Test basic ObjC formatting behavior."""
- self.buildDwarf()
- self.plain_data_formatter_commands()
-
- def appkit_tester_impl(self,builder,commands):
- builder()
+ def appkit_tester_impl(self,commands):
+ self.build()
self.appkit_common_data_formatters_command()
commands()
@skipUnlessDarwin
- @dsym_test
- def test_nsnumber_with_dsym_and_run_command(self):
+ def test_nsnumber_with_run_command(self):
"""Test formatters for NSNumber."""
- self.appkit_tester_impl(self.buildDsym,self.nsnumber_data_formatter_commands)
+ self.appkit_tester_impl(self.nsnumber_data_formatter_commands)
@skipUnlessDarwin
- @dwarf_test
- def test_nsnumber_with_dwarf_and_run_command(self):
- """Test formatters for NSNumber."""
- self.appkit_tester_impl(self.buildDwarf,self.nsnumber_data_formatter_commands)
-
- @skipUnlessDarwin
- @dsym_test
- def test_nscontainers_with_dsym_and_run_command(self):
- """Test formatters for NS container classes."""
- self.appkit_tester_impl(self.buildDsym,self.nscontainers_data_formatter_commands)
-
- @skipUnlessDarwin
- @dwarf_test
- def test_nscontainers_with_dwarf_and_run_command(self):
+ def test_nscontainers_with_run_command(self):
"""Test formatters for NS container classes."""
- self.appkit_tester_impl(self.buildDwarf,self.nscontainers_data_formatter_commands)
-
+ self.appkit_tester_impl(self.nscontainers_data_formatter_commands)
@skipUnlessDarwin
- @dsym_test
- def test_nsdata_with_dsym_and_run_command(self):
- """Test formatters for NSData."""
- self.appkit_tester_impl(self.buildDsym,self.nsdata_data_formatter_commands)
-
- @skipUnlessDarwin
- @dwarf_test
- def test_nsdata_with_dwarf_and_run_command(self):
+ def test_nsdata_with_run_command(self):
"""Test formatters for NSData."""
- self.appkit_tester_impl(self.buildDwarf,self.nsdata_data_formatter_commands)
-
+ self.appkit_tester_impl(self.nsdata_data_formatter_commands)
@skipUnlessDarwin
- @dsym_test
- def test_nsurl_with_dsym_and_run_command(self):
+ def test_nsurl_with_run_command(self):
"""Test formatters for NSURL."""
- self.appkit_tester_impl(self.buildDsym,self.nsurl_data_formatter_commands)
-
- @skipUnlessDarwin
- @dwarf_test
- def test_nsurl_with_dwarf_and_run_command(self):
- """Test formatters for NSURL."""
- self.appkit_tester_impl(self.buildDwarf,self.nsurl_data_formatter_commands)
+ self.appkit_tester_impl(self.nsurl_data_formatter_commands)
@skipUnlessDarwin
- @dsym_test
- def test_nserror_with_dsym_and_run_command(self):
+ def test_nserror_with_run_command(self):
"""Test formatters for NSError."""
- self.appkit_tester_impl(self.buildDsym,self.nserror_data_formatter_commands)
-
- @skipUnlessDarwin
- @dwarf_test
- def test_nserror_with_dwarf_and_run_command(self):
- """Test formatters for NSError."""
- self.appkit_tester_impl(self.buildDwarf,self.nserror_data_formatter_commands)
+ self.appkit_tester_impl(self.nserror_data_formatter_commands)
@skipUnlessDarwin
- @dsym_test
- def test_nsbundle_with_dsym_and_run_command(self):
+ def test_nsbundle_with_run_command(self):
"""Test formatters for NSBundle."""
- self.appkit_tester_impl(self.buildDsym,self.nsbundle_data_formatter_commands)
-
- @skipUnlessDarwin
- @dwarf_test
- def test_nsbundle_with_dwarf_and_run_command(self):
- """Test formatters for NSBundle."""
- self.appkit_tester_impl(self.buildDwarf,self.nsbundle_data_formatter_commands)
+ self.appkit_tester_impl(self.nsbundle_data_formatter_commands)
@skipUnlessDarwin
- @dsym_test
- def test_nsexception_with_dsym_and_run_command(self):
+ def test_nsexception_with_run_command(self):
"""Test formatters for NSException."""
- self.appkit_tester_impl(self.buildDsym,self.nsexception_data_formatter_commands)
+ self.appkit_tester_impl(self.nsexception_data_formatter_commands)
@skipUnlessDarwin
- @dwarf_test
- def test_nsexception_with_dwarf_and_run_command(self):
- """Test formatters for NSException."""
- self.appkit_tester_impl(self.buildDwarf,self.nsexception_data_formatter_commands)
-
-
- @skipUnlessDarwin
- @dsym_test
- def test_nsmisc_with_dsym_and_run_command(self):
+ def test_nsmisc_with_run_command(self):
"""Test formatters for misc NS classes."""
- self.appkit_tester_impl(self.buildDsym,self.nsmisc_data_formatter_commands)
-
- @skipUnlessDarwin
- @dwarf_test
- def test_nsmisc_with_dwarf_and_run_command(self):
- """Test formatters for misc NS classes."""
- self.appkit_tester_impl(self.buildDwarf,self.nsmisc_data_formatter_commands)
+ self.appkit_tester_impl(self.nsmisc_data_formatter_commands)
@skipUnlessDarwin
- @dsym_test
- def test_nsdate_with_dsym_and_run_command(self):
+ def test_nsdate_with_run_command(self):
"""Test formatters for NSDate."""
- self.appkit_tester_impl(self.buildDsym,self.nsdate_data_formatter_commands)
+ self.appkit_tester_impl(self.nsdate_data_formatter_commands)
@skipUnlessDarwin
- @dwarf_test
- def test_nsdate_with_dwarf_and_run_command(self):
- """Test formatters for NSDate."""
- self.appkit_tester_impl(self.buildDwarf,self.nsdate_data_formatter_commands)
-
-
- @skipUnlessDarwin
- @dsym_test
- def test_coreframeworks_with_dsym_and_run_command(self):
+ def test_coreframeworks_and_run_command(self):
"""Test formatters for Core OSX frameworks."""
- self.buildDsym()
+ self.build()
self.cf_data_formatter_commands()
@skipUnlessDarwin
- @dwarf_test
- def test_coreframeworks_with_dwarf_and_run_command(self):
- """Test formatters for Core OSX frameworks."""
- self.buildDwarf()
- self.cf_data_formatter_commands()
-
- @skipUnlessDarwin
- @dsym_test
- def test_kvo_with_dsym_and_run_command(self):
+ def test_kvo_with_run_command(self):
"""Test the behavior of formatters when KVO is in use."""
- self.buildDsym()
+ self.build()
self.kvo_data_formatter_commands()
@skipUnlessDarwin
- @dwarf_test
- def test_kvo_with_dwarf_and_run_command(self):
- """Test the behavior of formatters when KVO is in use."""
- self.buildDwarf()
- self.kvo_data_formatter_commands()
-
- @skipUnlessDarwin
- @dsym_test
- def test_expr_with_dsym_and_run_command(self):
+ def test_expr_with_run_command(self):
"""Test common cases of expression parser <--> formatters interaction."""
- self.buildDsym()
- self.expr_objc_data_formatter_commands()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_expr_with_dwarf_and_run_command(self):
- """Test common cases of expression parser <--> formatters interaction."""
- self.buildDwarf()
+ self.build()
self.expr_objc_data_formatter_commands()
def setUp(self):
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py b/lldb/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py
index 563ba5a..fb04429 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py
@@ -14,8 +14,8 @@
mydir = TestBase.compute_mydir(__file__)
- def appkit_tester_impl(self,builder,commands):
- builder()
+ def appkit_tester_impl(self,commands):
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
@@ -40,40 +40,19 @@
commands()
@skipUnlessDarwin
- @dsym_test
- def test_nsstring_with_dsym_and_run_command(self):
+ def test_nsstring_with_run_command(self):
"""Test formatters for NSString."""
- self.appkit_tester_impl(self.buildDsym,self.nsstring_data_formatter_commands)
+ self.appkit_tester_impl(self.nsstring_data_formatter_commands)
@skipUnlessDarwin
- @dwarf_test
- def test_nsstring_with_dwarf_and_run_command(self):
- """Test formatters for NSString."""
- self.appkit_tester_impl(self.buildDwarf,self.nsstring_data_formatter_commands)
-
- @skipUnlessDarwin
- @dsym_test
- def test_rdar11106605_with_dsym_and_run_command(self):
+ def test_rdar11106605_with_run_command(self):
"""Check that Unicode characters come out of CFString summary correctly."""
- self.appkit_tester_impl(self.buildDsym,self.rdar11106605_commands)
+ self.appkit_tester_impl(self.rdar11106605_commands)
@skipUnlessDarwin
- @dwarf_test
- def test_rdar11106605_with_dwarf_and_run_command(self):
- """Check that Unicode characters come out of CFString summary correctly."""
- self.appkit_tester_impl(self.buildDwarf,self.rdar11106605_commands)
-
- @skipUnlessDarwin
- @dsym_test
- def test_nsstring_withNULs_with_dsym_and_run_command(self):
+ def test_nsstring_withNULS_with_run_command(self):
"""Test formatters for NSString."""
- self.appkit_tester_impl(self.buildDsym,self.nsstring_withNULs_commands)
-
- @skipUnlessDarwin
- @dwarf_test
- def test_nsstring_withNULS_with_dwarf_and_run_command(self):
- """Test formatters for NSString."""
- self.appkit_tester_impl(self.buildDwarf,self.nsstring_withNULs_commands)
+ self.appkit_tester_impl(self.nsstring_withNULs_commands)
def setUp(self):
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py b/lldb/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py
index b3cbeb4..42e1c46 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py
@@ -14,17 +14,9 @@
mydir = TestBase.compute_mydir(__file__)
@skipUnlessDarwin
- @dsym_test
- def test_one_is_singular_with_dsym_and_run_command(self):
+ def test_one_is_singular_with_run_command(self):
"""Test that 1 item is not as reported as 1 items."""
- self.buildDsym()
- self.oneness_data_formatter_commands()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_one_is_singular_with_dwarf_and_run_command(self):
- """Test that 1 item is not as reported as 1 items."""
- self.buildDwarf()
+ self.build()
self.oneness_data_formatter_commands()
def setUp(self):
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py b/lldb/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
index 5f89979..172cfdd 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
@@ -12,17 +12,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
+ def test_with_run_command(self):
"""Test that LLDB handles the clang typeclass Paren correctly."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test that LLDB handles the clang typeclass Paren correctly."""
- self.buildDwarf()
+ self.build()
self.data_formatter_commands()
def setUp(self):
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py b/lldb/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
index fad6d4a..f6a3e2d 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
@@ -12,31 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
@skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
+ def test_with_run_command(self):
"""Test data formatter commands."""
- self.buildDwarf()
+ self.build()
self.data_formatter_commands()
- @skipUnlessDarwin
- @dsym_test
- def test_rdar10960550_with_dsym_and_run_command(self):
+ def test_rdar10960550_with_run_command(self):
"""Test data formatter commands."""
- self.buildDsym()
- self.rdar10960550_formatter_commands()
-
- @dwarf_test
- def test_rdar10960550_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
+ self.build()
self.rdar10960550_formatter_commands()
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py b/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py
index a23fa2c..4eecda4 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py
@@ -12,17 +12,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
+ def test_with_run_command(self):
"""Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
+ self.build()
self.data_formatter_commands()
def setUp(self):
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py b/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
index 2d56af3..5ef9257 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
@@ -12,19 +12,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
@expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot
@expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
+ def test_with_run_command(self):
"""Test data formatter commands."""
- self.buildDwarf()
+ self.build()
self.data_formatter_commands()
def setUp(self):
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py b/lldb/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
index 1984cf0..e4eb325 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
@@ -12,18 +12,10 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
@expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows
- def test_with_dwarf_and_run_command(self):
+ def test_with_run_command(self):
"""Test data formatter commands."""
- self.buildDwarf()
+ self.build()
self.data_formatter_commands()
def setUp(self):
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
index 6b9c875..7abb6ed 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
@@ -12,28 +12,12 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
@skipIfWindows # libc++ not ported to Windows yet
@skipIfGcc
@expectedFailureLinux # fails on clang 3.5 and tot
- @dwarf_test
- def test_with_dwarf(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def data_formatter_commands(self):
+ def test(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
index 2e4c43b..82ff6d1 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
@@ -12,29 +12,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @skipIfGcc
- @skipIfWindows # libc++ not ported to Windows yet
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ @skipIfGcc
+ @skipIfWindows # libc++ not ported to Windows yet
+ def test_with_run_command(self):
"""Test that libc++ iterators format properly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
index c1b10a0..3390ae3 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
@@ -12,21 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @skipIfGcc
- @skipIfWindows # libc++ not ported to Windows yet
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -36,8 +21,11 @@
self.line3 = line_number('main.cpp', '// Set third break point at this line.')
self.line4 = line_number('main.cpp', '// Set fourth break point at this line.')
- def data_formatter_commands(self):
+ @skipIfGcc
+ @skipIfWindows # libc++ not ported to Windows yet
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
index 934d03a..25565bf 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
@@ -12,27 +12,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
@skipIfGcc
@skipIfWindows # libc++ not ported to Windows yet
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
index 36dfa58..ebd74fb 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
@@ -12,27 +12,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
@skipIfWindows # libc++ not ported to Windows yet
@skipIfGcc
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
index 16e3779..68d1c9e 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
@@ -12,27 +12,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
@skipIfGcc
@skipIfWindows # libc++ not ported to Windows yet
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
index 5b034e9..e6ceff9 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
@@ -12,27 +12,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
@skipIfGcc
@skipIfWindows # libc++ not ported to Windows yet
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
index 448c333..ee050cd 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
@@ -13,29 +13,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @skipIfGcc
- @skipIfWindows # libc++ not ported to Windows yet
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ @skipIfGcc
+ @skipIfWindows # libc++ not ported to Windows yet
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
index 6399fce..04caa51 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
@@ -12,31 +12,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
@skipIfWindows # libc++ not ported to Windows yet
@skipIfGcc
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def look_for_content_and_continue(self, var_name, patterns):
- self.expect( ("frame variable %s" % var_name), patterns=patterns)
- self.runCmd("continue")
-
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
@@ -87,6 +67,10 @@
['size=5 {', '(\[\d\] = "is"(\\n|.)+){2}',
'(\[\d\] = "world"(\\n|.)+){2}'])
+ def look_for_content_and_continue(self, var_name, patterns):
+ self.expect( ("frame variable %s" % var_name), patterns=patterns)
+ self.runCmd("continue")
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
index 99ca5da..92368d1 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
@@ -12,29 +12,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @skipIfGcc
- @skipIfWindows # libc++ not ported to Windows.
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ @skipIfGcc
+ @skipIfWindows # libc++ not ported to Windows.
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
index a6ac38e..5cec93e 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
@@ -12,27 +12,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
@skipIfGcc
@skipIfWindows # libc++ not ported to Windows yet
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
index ea835a7..9b83078 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
@@ -12,30 +12,18 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- @skipIfWindows # libstdcpp not ported to Windows
- @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot
- @expectedFailureIcc # llvm.org/pr15301 LLDB prints incorrect sizes of STL containers
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ @skipIfWindows # libstdcpp not ported to Windows
+ @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot
+ @expectedFailureIcc # llvm.org/pr15301 LLDB prints incorrect sizes of STL containers
+ def test_with_run_command(self):
"""Test that libstdcpp iterators format properly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
index 1d1202a..f82caa8 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
@@ -12,21 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- @skipIfWindows # libstdcpp not ported to Windows
- @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -35,8 +20,11 @@
self.optional_line = line_number('main.cpp', '// Optional break point at this line.')
self.final_line = line_number('main.cpp', '// Set final break point at this line.')
- def data_formatter_commands(self):
+ @skipIfWindows # libstdcpp not ported to Windows
+ @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
index c80a3c2..0a2cdf1 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
@@ -12,30 +12,18 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @expectedFailureIcc # llvm.org/pr15301: LLDB prints incorrect size of libstdc++ containers
- @skipIfWindows # libstdcpp not ported to Windows
- @skipIfFreeBSD
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ @expectedFailureIcc # llvm.org/pr15301: LLDB prints incorrect size of libstdc++ containers
+ @skipIfWindows # libstdcpp not ported to Windows
+ @skipIfFreeBSD
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.")
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py
index 5c0c249..b34e0e4 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py
@@ -13,29 +13,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot
- @skipIfWindows # libstdcpp not ported to Windows
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot
+ @skipIfWindows # libstdcpp not ported to Windows
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
index b8052dc..ec34c52 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
@@ -12,32 +12,19 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- @skipIfDarwin
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot
- @dwarf_test
- @skipIfWindows # libstdcpp not ported to Windows.
- @skipIfDarwin
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
+ @expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot
@expectedFailureIcc # llvm.org/pr15301: lldb does not print the correct sizes of STL containers when building with ICC
- def data_formatter_commands(self):
+ @skipIfWindows # libstdcpp not ported to Windows.
+ @skipIfDarwin
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
index 9c74cac..c268317 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
@@ -12,30 +12,18 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- @skipIfFreeBSD
- @expectedFailureIcc # llvm.org/pr15301 LLDB prints incorrect sizes of STL containers
- @skipIfWindows # libstdcpp not ported to Windows
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ @skipIfFreeBSD
+ @expectedFailureIcc # llvm.org/pr15301 LLDB prints incorrect sizes of STL containers
+ @skipIfWindows # libstdcpp not ported to Windows
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.")
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py b/lldb/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
index 6592641..dc12536 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
@@ -12,28 +12,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["x86_64","i386"])
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["x86_64","i386"])
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py b/lldb/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
index a7dd95a..cdff8e4 100644
--- a/lldb/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
+++ b/lldb/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
@@ -12,29 +12,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test using Python synthetic children provider to provide a value."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser
- @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test using Python synthetic children provider to provide a value."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', 'break here')
- def data_formatter_commands(self):
+ @skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser
+ @expectedFailureWindows("llvm.org/pr24462") # Data formatters have problems on Windows
+ def test_with_run_command(self):
"""Test using Python synthetic children provider to provide a value."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py b/lldb/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py
index cc67056..6a949ff 100644
--- a/lldb/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py
+++ b/lldb/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py
@@ -12,29 +12,16 @@
mydir = TestBase.compute_mydir(__file__)
- # rdar://problem/14035604
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Check if changing Format on an SBValue correctly propagates that new format to children as it should"""
- self.buildDsym()
- self.propagate_test_commands()
-
- # rdar://problem/14035604
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Check if changing Format on an SBValue correctly propagates that new format to children as it should"""
- self.buildDwarf()
- self.propagate_test_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def propagate_test_commands(self):
+ # rdar://problem/14035604
+ def test_with_run_command(self):
"""Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py b/lldb/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py
index 7580a5f..1e9008a 100644
--- a/lldb/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py
+++ b/lldb/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that the user can input a format but it will not prevail over summary format's choices."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test that the user can input a format but it will not prevail over summary format's choices."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that the user can input a format but it will not prevail over summary format's choices."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py b/lldb/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py
index de283da..dc486c7 100644
--- a/lldb/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py
+++ b/lldb/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py b/lldb/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py
index 08260c5..a5f0108 100644
--- a/lldb/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py
+++ b/lldb/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py
@@ -13,28 +13,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_rdar11086338_with_dsym_and_run_command(self):
- """Test that NSArray reports its synthetic children properly."""
- self.buildDsym()
- self.rdar11086338_tester()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_rdar11086338_with_dwarf_and_run_command(self):
- """Test that NSArray reports its synthetic children properly."""
- self.buildDwarf()
- self.rdar11086338_tester()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.m', '// Set break point at this line.')
- def rdar11086338_tester(self):
+ @skipUnlessDarwin
+ def test_rdar11086338_with_run_command(self):
"""Test that NSArray reports its synthetic children properly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py b/lldb/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py
index 032ca1c..188c450 100644
--- a/lldb/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py
+++ b/lldb/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py
@@ -13,28 +13,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_rdar11988289_with_dsym_and_run_command(self):
- """Test that NSDictionary reports its synthetic children properly."""
- self.buildDsym()
- self.rdar11988289_tester()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_rdar11988289_with_dwarf_and_run_command(self):
- """Test that NSDictionary reports its synthetic children properly."""
- self.buildDwarf()
- self.rdar11988289_tester()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.m', '// Set break point at this line.')
- def rdar11988289_tester(self):
+ @skipUnlessDarwin
+ def test_rdar11988289_with_run_command(self):
"""Test that NSDictionary reports its synthetic children properly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py b/lldb/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py
index de1138d..5a5203c 100644
--- a/lldb/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py
+++ b/lldb/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py
@@ -13,28 +13,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_rdar12529957_with_dsym_and_run_command(self):
- """Test that NSSet reports its synthetic children properly."""
- self.buildDsym()
- self.rdar12529957_tester()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_rdar12529957_with_dwarf_and_run_command(self):
- """Test that NSSet reports its synthetic children properly."""
- self.buildDwarf()
- self.rdar12529957_tester()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.m', '// Set break point at this line.')
- def rdar12529957_tester(self):
+ @skipUnlessDarwin
+ def test_rdar12529957_with_run_command(self):
"""Test that NSSet reports its synthetic children properly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/ostypeformatting/TestFormattersBoolRefPtr.py b/lldb/test/functionalities/data-formatter/ostypeformatting/TestFormattersBoolRefPtr.py
index f0584c8..afca9bd 100644
--- a/lldb/test/functionalities/data-formatter/ostypeformatting/TestFormattersBoolRefPtr.py
+++ b/lldb/test/functionalities/data-formatter/ostypeformatting/TestFormattersBoolRefPtr.py
@@ -13,28 +13,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_ostype_with_dsym_and_run_command(self):
- """Test the formatters we use for OSType."""
- self.buildDsym()
- self.ostype_data_formatter_commands()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_ostype_with_dwarf_and_run_command(self):
- """Test the formatters we use for OSType."""
- self.buildDwarf()
- self.ostype_data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.mm', '// Set break point at this line.')
- def ostype_data_formatter_commands(self):
+ @skipUnlessDarwin
+ def test_ostype_with_run_command(self):
"""Test the formatters we use for OSType."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.mm", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py b/lldb/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py
index ad086e6..7bac2cf 100644
--- a/lldb/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py
+++ b/lldb/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set breakpoint here')
-
- def data_formatter_commands(self):
+
+ def test_with_run_command(self):
"""Test that a pointer/reference to a typedef is formatted as we want."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py b/lldb/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py
index 237099d..e9927f1 100644
--- a/lldb/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py
+++ b/lldb/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that ValueObjectPrinter does not cause an infinite loop when a reference to a struct that contains a pointer to itself is printed."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test that ValueObjectPrinter does not cause an infinite loop when a reference to a struct that contains a pointer to itself is printed."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that ValueObjectPrinter does not cause an infinite loop when a reference to a struct that contains a pointer to itself is printed."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py b/lldb/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py
index 326edf1..6dc9e12 100644
--- a/lldb/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py
+++ b/lldb/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py
@@ -13,27 +13,15 @@
# test for rdar://problem/9974002 ()
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
self.skipTest("llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
diff --git a/lldb/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py b/lldb/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py
index b054d48..bf18d44 100644
--- a/lldb/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py
+++ b/lldb/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs."""
- self.buildDsym()
- self.capping_test_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs."""
- self.buildDwarf()
- self.capping_test_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def capping_test_commands(self):
+ def test_with_run_command(self):
"""Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py b/lldb/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py
index fd24740..eb3859c8 100644
--- a/lldb/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py
+++ b/lldb/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py
@@ -13,28 +13,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_rdar12437442_with_dsym_and_run_command(self):
- """Test that we update SBValues correctly as dynamic types change."""
- self.buildDsym()
- self.rdar12437442_tester()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_rdar12437442_with_dwarf_and_run_command(self):
- """Test that we update SBValues correctly as dynamic types change."""
- self.buildDwarf()
- self.rdar12437442_tester()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.m', '// Set break point at this line.')
- def rdar12437442_tester(self):
+ @skipUnlessDarwin
+ def test_rdar12437442_with_run_command(self):
"""Test that we update SBValues correctly as dynamic types change."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py b/lldb/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py
index 7650c23..63beed2 100644
--- a/lldb/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py
+++ b/lldb/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that the user can input a format but it will not prevail over summary format's choices."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test that the user can input a format but it will not prevail over summary format's choices."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that the user can input a format but it will not prevail over summary format's choices."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py b/lldb/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py
index ffa2fc9..d3eaa1d 100644
--- a/lldb/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py
+++ b/lldb/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py
@@ -12,28 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
-
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def data_formatter_commands(self):
+ def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py b/lldb/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
index 66f597d..777dc29 100644
--- a/lldb/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
+++ b/lldb/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
@@ -13,28 +13,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test data formatter commands."""
- self.buildDsym()
- self.data_formatter_commands()
-
- @skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test data formatter commands."""
- self.buildDwarf()
- self.data_formatter_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', ' // Set breakpoint here.')
- def data_formatter_commands(self):
+ @skipIfFreeBSD # llvm.org/pr20545 bogus output confuses buildbot parser
+ def test_with_run_command(self):
"""Test using Python synthetic children provider."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py b/lldb/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py
index 61f9631..58a31ce 100644
--- a/lldb/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py
+++ b/lldb/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py
@@ -12,30 +12,17 @@
mydir = TestBase.compute_mydir(__file__)
- # rdar://problem/14035604
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Check that vector types format properly"""
- self.buildDsym()
- self.propagate_test_commands()
-
- # rdar://problem/14035604
- @dwarf_test
- @skipIf(compiler='gcc') # gcc don't have ext_vector_type extension
- def test_with_dwarf_and_run_command(self):
- """Check that vector types format properly"""
- self.buildDwarf()
- self.propagate_test_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// break here')
- def propagate_test_commands(self):
+ # rdar://problem/14035604
+ @skipIf(compiler='gcc') # gcc don't have ext_vector_type extension
+ def test_with_run_command(self):
"""Check that vector types format properly"""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/dead-strip/TestDeadStrip.py b/lldb/test/functionalities/dead-strip/TestDeadStrip.py
index 27e6480..a9e24b5 100644
--- a/lldb/test/functionalities/dead-strip/TestDeadStrip.py
+++ b/lldb/test/functionalities/dead-strip/TestDeadStrip.py
@@ -12,23 +12,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test breakpoint works correctly with dead-code stripping."""
- self.buildDsym()
- self.dead_strip()
-
@expectedFailureWindows("llvm.org/pr24778")
@skipIfFreeBSD # The -dead_strip linker option isn't supported on FreeBSD versions of ld.
- @dwarf_test
- def test_with_dwarf(self):
+ def test(self):
"""Test breakpoint works correctly with dead-code stripping."""
- self.buildDwarf()
- self.dead_strip()
-
- def dead_strip(self):
- """Test breakpoint works correctly with dead-code stripping."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/disassembly/TestDisassembleBreakpoint.py b/lldb/test/functionalities/disassembly/TestDisassembleBreakpoint.py
index 3d71f30..fe7e3d6 100644
--- a/lldb/test/functionalities/disassembly/TestDisassembleBreakpoint.py
+++ b/lldb/test/functionalities/disassembly/TestDisassembleBreakpoint.py
@@ -12,19 +12,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym (self):
- self.buildDsym ()
- self.disassemble_breakpoint ()
-
- @dwarf_test
@expectedFailureWindows # Function name prints fully demangled instead of name-only
- def test_with_dwarf (self):
- self.buildDwarf ()
- self.disassemble_breakpoint ()
-
- def disassemble_breakpoint (self):
+ def test(self):
+ self.build()
exe = os.path.join (os.getcwd(), "a.out")
self.expect("file " + exe,
patterns = [ "Current executable set to .*a.out.*" ])
diff --git a/lldb/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py b/lldb/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py
index 4fad3af..e670263 100644
--- a/lldb/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py
+++ b/lldb/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py
@@ -12,26 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- @expectedFailurei386("to be figured out")
- def test_get_dynamic_vals_with_dsym(self):
- """Test fetching C++ dynamic values from pointers & references."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.do_get_dynamic_vals()
-
- @expectedFailureLinux("llvm.org/pr23039")
- @expectedFailureFreeBSD("llvm.org/pr19311") # continue at a breakpoint does not work
- @expectedFailureWindows("llvm.org/pr24663")
- @python_api_test
- @dwarf_test
- @expectedFailurei386("to be figured out")
- def test_get_dynamic_vals_with_dwarf(self):
- """Test fetching C++ dynamic values from pointers & references."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.do_get_dynamic_vals()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -47,11 +27,15 @@
self.main_sixth_call_line = line_number('pass-to-base.cpp',
'// Break here and check b has 0 children again')
-
-
-
- def do_get_dynamic_vals(self):
+ @expectedFailureLinux("llvm.org/pr23039")
+ @expectedFailureFreeBSD("llvm.org/pr19311") # continue at a breakpoint does not work
+ @expectedFailureWindows("llvm.org/pr24663")
+ @expectedFailurei386("to be figured out")
+ @python_api_test
+ def test_get_dynamic_vals(self):
+ """Test fetching C++ dynamic values from pointers & references."""
"""Get argument vals for the call stack when stopped on a breakpoint."""
+ self.build(dictionary=self.getBuildFlags())
exe = os.path.join(os.getcwd(), "a.out")
# Create a target from the debugger.
diff --git a/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py b/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py
index 8b1ef5f..0f66a3e 100644
--- a/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py
+++ b/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py
@@ -9,32 +9,19 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- @skipIfRemote
- def test_with_dsym_and_run_command(self):
- """Test convenience variables lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame."""
- self.buildDsym()
- self.convenience_variables()
-
- @dwarf_test
- @skipIfFreeBSD # llvm.org/pr17228
- @skipIfRemote
- @expectedFailureAll("llvm.org/pr23560", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"])
- @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
- def test_with_dwarf_and_run_commands(self):
- """Test convenience variables lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame."""
- self.buildDwarf()
- self.convenience_variables()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break on inside main.cpp.
self.line = line_number('main.c', 'Hello world.')
- def convenience_variables(self):
+ @skipIfFreeBSD # llvm.org/pr17228
+ @skipIfRemote
+ @expectedFailureAll("llvm.org/pr23560", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"])
+ @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
+ def test_with_run_commands(self):
"""Test convenience variables lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame."""
+ self.build()
import pexpect
exe = os.path.join(os.getcwd(), "a.out")
prompt = "(lldb) "
diff --git a/lldb/test/functionalities/exec/TestExec.py b/lldb/test/functionalities/exec/TestExec.py
index e5d1958..c81ebef 100644
--- a/lldb/test/functionalities/exec/TestExec.py
+++ b/lldb/test/functionalities/exec/TestExec.py
@@ -21,35 +21,19 @@
mydir = TestBase.compute_mydir(__file__)
-
@skipUnlessDarwin
- @dsym_test
- def test_with_dsym (self):
+ def test(self):
if self.getArchitecture() == 'x86_64':
source = os.path.join (os.getcwd(), "main.cpp")
o_file = os.path.join (os.getcwd(), "main.o")
execute_command ("'%s' -g -O0 -arch i386 -arch x86_64 '%s' -c -o '%s'" % (os.environ["CC"], source, o_file))
execute_command ("'%s' -g -O0 -arch i386 -arch x86_64 '%s'" % (os.environ["CC"], o_file))
+ if self.debug_info != "dsym":
+ dsym_path = os.path.join (os.getcwd(), "a.out.dSYM")
+ execute_command ("rm -rf '%s'" % (dsym_path))
else:
- self.buildDsym()
- self.do_test ()
+ self.build()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_with_dwarf (self):
- if self.getArchitecture() == 'x86_64':
- source = os.path.join (os.getcwd(), "main.cpp")
- o_file = os.path.join (os.getcwd(), "main.o")
- dsym_path = os.path.join (os.getcwd(), "a.out.dSYM")
- execute_command ("'%s' -g -O0 -arch i386 -arch x86_64 '%s' -c -o '%s'" % (os.environ["CC"], source, o_file))
- execute_command ("'%s' -g -O0 -arch i386 -arch x86_64 '%s'" % (os.environ["CC"], o_file))
- execute_command ("rm -rf '%s'" % (dsym_path))
- else:
- self.buildDwarf()
- self.do_test ()
-
- def do_test (self):
exe = os.path.join (os.getcwd(), "a.out")
# Create the target
diff --git a/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py b/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py
index 19faf2a2..76677ff 100644
--- a/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py
+++ b/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py
@@ -15,28 +15,12 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that expr will time out and allow other threads to run if it blocks - with dsym."""
- self.buildDsym()
- self.expr_doesnt_deadlock()
-
- @dwarf_test
@expectedFailureFreeBSD('llvm.org/pr17946')
@expectedFlakeyLinux # failed 1/365 test runs, line 61, thread.IsValid()
@expectedFailureWindows # Windows doesn't have pthreads, need to port this test.
- def test_with_dwarf_and_run_command(self):
+ def test_with_run_command(self):
"""Test that expr will time out and allow other threads to run if it blocks."""
- self.buildDwarf()
- self.expr_doesnt_deadlock()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def expr_doesnt_deadlock (self):
- """Test that expr will time out and allow other threads to run if it blocks."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/functionalities/fat_archives/TestFatArchives.py b/lldb/test/functionalities/fat_archives/TestFatArchives.py
index dc31738..d4be28f 100644
--- a/lldb/test/functionalities/fat_archives/TestFatArchives.py
+++ b/lldb/test/functionalities/fat_archives/TestFatArchives.py
@@ -22,8 +22,7 @@
mydir = TestBase.compute_mydir(__file__)
@skipUnlessDarwin
- @dwarf_test
- def test_with_dwarf (self):
+ def test (self):
if self.getArchitecture() == 'x86_64':
execute_command ("make CC='%s'" % (os.environ["CC"]))
self.main ()
diff --git a/lldb/test/functionalities/format/TestFormats.py b/lldb/test/functionalities/format/TestFormats.py
index a3ddf3f..878f276 100644
--- a/lldb/test/functionalities/format/TestFormats.py
+++ b/lldb/test/functionalities/format/TestFormats.py
@@ -14,7 +14,7 @@
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
def test_formats(self):
"""Test format string functionality."""
- self.buildDwarf ()
+ self.build()
import pexpect
prompt = "(lldb) "
child = pexpect.spawn('%s %s -x -o "b main" -o r a.out' % (lldbtest_config.lldbExec, self.lldbOption))
diff --git a/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py b/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py
index 31cfebf..de74b71 100644
--- a/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py
+++ b/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py
@@ -9,70 +9,46 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- def test_inferior_asserting_dsym(self):
- """Test that lldb reliably catches the inferior asserting (command)."""
- self.buildDsym()
- self.inferior_asserting()
-
@expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
@expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
- def test_inferior_asserting_dwarf(self):
+ def test_inferior_asserting(self):
"""Test that lldb reliably catches the inferior asserting (command)."""
- self.buildDwarf()
+ self.build()
self.inferior_asserting()
- @skipUnlessDarwin
- def test_inferior_asserting_registers_dsym(self):
- """Test that lldb reliably reads registers from the inferior after asserting (command)."""
- self.buildDsym()
- self.inferior_asserting_registers()
-
@expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
@expectedFailureAndroid(api_levels=range(16 + 1)) # b.android.com/179836
- def test_inferior_asserting_register_dwarf(self):
+ def test_inferior_asserting_register(self):
"""Test that lldb reliably reads registers from the inferior after asserting (command)."""
- self.buildDwarf()
+ self.build()
self.inferior_asserting_registers()
@expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
@expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
def test_inferior_asserting_disassemble(self):
"""Test that lldb reliably disassembles frames after asserting (command)."""
- self.buildDefault()
+ self.build()
self.inferior_asserting_disassemble()
@python_api_test
@expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
def test_inferior_asserting_python(self):
"""Test that lldb reliably catches the inferior asserting (Python API)."""
- self.buildDefault()
+ self.build()
self.inferior_asserting_python()
- @skipUnlessDarwin
- def test_inferior_asserting_expr_dsym(self):
- """Test that the lldb expression interpreter can read from the inferior after asserting (command)."""
- self.buildDsym()
- self.inferior_asserting_expr()
-
@expectedFailurei386('llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly')
@expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
- def test_inferior_asserting_expr_dwarf(self):
+ def test_inferior_asserting_expr(self):
"""Test that the lldb expression interpreter can read from the inferior after asserting (command)."""
- self.buildDwarf()
+ self.build()
self.inferior_asserting_expr()
- @skipUnlessDarwin
- def test_inferior_asserting_step_dsym(self):
- """Test that lldb functions correctly after stepping through a call to assert()."""
- self.buildDsym()
- self.inferior_asserting_step()
-
@expectedFailurei386("llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly")
@expectedFailureWindows("llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
- def test_inferior_asserting_step_dwarf(self):
+ def test_inferior_asserting_step(self):
"""Test that lldb functions correctly after stepping through a call to assert()."""
- self.buildDwarf()
+ self.build()
self.inferior_asserting_step()
def set_breakpoint(self, line):
diff --git a/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py b/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py
index 5f47be7..cd13b80 100644
--- a/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py
+++ b/lldb/test/functionalities/inferior-changed/TestInferiorChanged.py
@@ -10,21 +10,10 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- def test_inferior_crashing_dsym(self):
- """Test lldb reloads the inferior after it was changed during the session."""
- self.buildDsym()
- self.inferior_crashing()
- self.cleanup()
- d = {'C_SOURCES': 'main2.c'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.inferior_not_crashing()
-
@skipIfHostWindows
- def test_inferior_crashing_dwarf(self):
+ def test_inferior_crashing(self):
"""Test lldb reloads the inferior after it was changed during the session."""
- self.buildDwarf()
+ self.build()
self.inferior_crashing()
self.cleanup()
# lldb needs to recognize the inferior has changed. If lldb needs to check the
@@ -32,7 +21,7 @@
# 1 second delay.
time.sleep(1)
d = {'C_SOURCES': 'main2.c'}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.inferior_not_crashing()
diff --git a/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py b/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py
index c300dee..40d7688 100644
--- a/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py
+++ b/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py
@@ -9,88 +9,52 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- def test_inferior_crashing_dsym(self):
- """Test that lldb reliably catches the inferior crashing (command)."""
- self.buildDsym()
- self.inferior_crashing()
-
@expectedFailureFreeBSD("llvm.org/pr23699 SIGSEGV is reported as exception, not signal")
@expectedFailureWindows("llvm.org/pr24778") # This actually works, but the test relies on the output format instead of the API
- def test_inferior_crashing_dwarf(self):
+ def test_inferior_crashing(self):
"""Test that lldb reliably catches the inferior crashing (command)."""
- self.buildDwarf()
+ self.build()
self.inferior_crashing()
- @skipUnlessDarwin
- def test_inferior_crashing_registers_dsym(self):
- """Test that lldb reliably reads registers from the inferior after crashing (command)."""
- self.buildDsym()
- self.inferior_crashing_registers()
-
@expectedFailureWindows("llvm.org/pr24778")
- def test_inferior_crashing_register_dwarf(self):
+ def test_inferior_crashing_register(self):
"""Test that lldb reliably reads registers from the inferior after crashing (command)."""
- self.buildDwarf()
+ self.build()
self.inferior_crashing_registers()
@python_api_test
@expectedFailureWindows("llvm.org/pr24778")
def test_inferior_crashing_python(self):
"""Test that lldb reliably catches the inferior crashing (Python API)."""
- self.buildDefault()
+ self.build()
self.inferior_crashing_python()
- @skipUnlessDarwin
- def test_inferior_crashing_expr_dsym(self):
- """Test that the lldb expression interpreter can read from the inferior after crashing (command)."""
- self.buildDsym()
- self.inferior_crashing_expr()
-
@expectedFailureWindows("llvm.org/pr24778")
- def test_inferior_crashing_expr_dwarf(self):
+ def test_inferior_crashing_expr(self):
"""Test that the lldb expression interpreter can read from the inferior after crashing (command)."""
- self.buildDwarf()
+ self.build()
self.inferior_crashing_expr()
- @skipUnlessDarwin
- def test_inferior_crashing_step_dsym(self):
- """Test that lldb functions correctly after stepping through a crash."""
- self.buildDsym()
- self.inferior_crashing_step()
-
@expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"])
@expectedFailureWindows("llvm.org/pr24778")
- def test_inferior_crashing_step_dwarf(self):
+ def test_inferior_crashing_step(self):
"""Test that stepping after a crash behaves correctly."""
- self.buildDwarf()
+ self.build()
self.inferior_crashing_step()
- @skipUnlessDarwin
- def test_inferior_crashing_step_after_break_dsym(self):
- """Test that stepping after a crash behaves correctly."""
- self.buildDsym()
- self.inferior_crashing_step_after_break()
-
@expectedFailureFreeBSD('llvm.org/pr24939')
@expectedFailureWindows("llvm.org/pr24778")
@expectedFailureAndroid(archs=['aarch64'], api_levels=range(21 + 1)) # No eh_frame for sa_restorer
- def test_inferior_crashing_step_after_break_dwarf(self):
+ def test_inferior_crashing_step_after_break(self):
"""Test that lldb functions correctly after stepping through a crash."""
- self.buildDwarf()
+ self.build()
self.inferior_crashing_step_after_break()
- @skipUnlessDarwin
- def test_inferior_crashing_expr_step_and_expr_dsym(self):
- """Test that lldb expressions work before and after stepping after a crash."""
- self.buildDsym()
- self.inferior_crashing_expr_step_expr()
-
@expectedFailureWindows("llvm.org/pr24778")
@skipIfLinux # Inferior exits after stepping after a segfault. This is working as intended IMHO.
- def test_inferior_crashing_expr_step_and_expr_dwarf(self):
+ def test_inferior_crashing_expr_step_and_expr(self):
"""Test that lldb expressions work before and after stepping after a crash."""
- self.buildDwarf()
+ self.build()
self.inferior_crashing_expr_step_expr()
def set_breakpoint(self, line):
diff --git a/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py b/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
index 855c3cf..86eba5d 100644
--- a/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
+++ b/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
@@ -10,87 +10,52 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- def test_recursive_inferior_crashing_dsym(self):
- """Test that lldb reliably catches the inferior crashing (command)."""
- self.buildDsym()
- self.recursive_inferior_crashing()
-
@expectedFailureFreeBSD("llvm.org/pr23699 SIGSEGV is reported as exception, not signal")
@expectedFailureWindows("llvm.org/pr24778")
- def test_recursive_inferior_crashing_dwarf(self):
+ def test_recursive_inferior_crashing(self):
"""Test that lldb reliably catches the inferior crashing (command)."""
- self.buildDwarf()
+ self.build()
self.recursive_inferior_crashing()
- @skipUnlessDarwin
- def test_recursive_inferior_crashing_registers_dsym(self):
- """Test that lldb reliably reads registers from the inferior after crashing (command)."""
- self.buildDsym()
- self.recursive_inferior_crashing_registers()
-
@expectedFailureWindows("llvm.org/pr24778")
- def test_recursive_inferior_crashing_register_dwarf(self):
+ def test_recursive_inferior_crashing_register(self):
"""Test that lldb reliably reads registers from the inferior after crashing (command)."""
- self.buildDwarf()
+ self.build()
self.recursive_inferior_crashing_registers()
@python_api_test
@expectedFailureWindows("llvm.org/pr24778")
def test_recursive_inferior_crashing_python(self):
"""Test that lldb reliably catches the inferior crashing (Python API)."""
- self.buildDefault()
+ self.build()
self.recursive_inferior_crashing_python()
- @skipUnlessDarwin
- def test_recursive_inferior_crashing_expr_dsym(self):
+ @expectedFailureWindows("llvm.org/pr24778")
+ def test_recursive_inferior_crashing_expr(self):
"""Test that the lldb expression interpreter can read from the inferior after crashing (command)."""
- self.buildDsym()
+ self.build()
self.recursive_inferior_crashing_expr()
@expectedFailureWindows("llvm.org/pr24778")
- def test_recursive_inferior_crashing_expr_dwarf(self):
- """Test that the lldb expression interpreter can read from the inferior after crashing (command)."""
- self.buildDwarf()
- self.recursive_inferior_crashing_expr()
-
- @skipUnlessDarwin
- def test_recursive_inferior_crashing_step_dsym(self):
- """Test that lldb functions correctly after stepping through a crash."""
- self.buildDsym()
- self.recursive_inferior_crashing_step()
-
- @expectedFailureWindows("llvm.org/pr24778")
- def test_recursive_inferior_crashing_step_dwarf(self):
+ def test_recursive_inferior_crashing_step(self):
"""Test that stepping after a crash behaves correctly."""
- self.buildDwarf()
+ self.build()
self.recursive_inferior_crashing_step()
- @skipUnlessDarwin
- def test_recursive_inferior_crashing_step_after_break_dsym(self):
- """Test that stepping after a crash behaves correctly."""
- self.buildDsym()
- self.recursive_inferior_crashing_step_after_break()
-
@expectedFailureFreeBSD('llvm.org/pr24939')
@expectedFailureWindows("llvm.org/pr24778")
@expectedFailureAndroid(archs=['aarch64'], api_levels=range(21 + 1)) # No eh_frame for sa_restorer
- def test_recursive_inferior_crashing_step_after_break_dwarf(self):
+ def test_recursive_inferior_crashing_step_after_break(self):
"""Test that lldb functions correctly after stepping through a crash."""
- self.buildDwarf()
+ self.build()
self.recursive_inferior_crashing_step_after_break()
- @skipUnlessDarwin
- def test_recursive_inferior_crashing_expr_step_and_expr_dsym(self):
- """Test that lldb expressions work before and after stepping after a crash."""
- self.buildDsym()
- self.recursive_inferior_crashing_expr_step_expr()
-
+ @expectedFailureFreeBSD('llvm.org/pr15989') # Couldn't allocate space for the stack frame
@skipIfLinux # Inferior exits after stepping after a segfault. This is working as intended IMHO.
@expectedFailureWindows("llvm.org/pr24778")
- def test_recursive_inferior_crashing_expr_step_and_expr_dwarf(self):
+ def test_recursive_inferior_crashing_expr_step_and_expr(self):
"""Test that lldb expressions work before and after stepping after a crash."""
- self.buildDwarf()
+ self.build()
self.recursive_inferior_crashing_expr_step_expr()
def set_breakpoint(self, line):
diff --git a/lldb/test/functionalities/inline-stepping/TestInlineStepping.py b/lldb/test/functionalities/inline-stepping/TestInlineStepping.py
index 6a59783..6c2a31e 100644
--- a/lldb/test/functionalities/inline-stepping/TestInlineStepping.py
+++ b/lldb/test/functionalities/inline-stepping/TestInlineStepping.py
@@ -10,56 +10,29 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test stepping over and into inlined functions."""
- self.buildDsym()
- self.inline_stepping()
-
- @python_api_test
- @dwarf_test
@expectedFailureFreeBSD('llvm.org/pr17214')
@expectedFailureIcc # Not really a bug. ICC combines two inlined functions.
@expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"])
@expectedFailureWindows("llvm.org/pr24778")
# failed 1/365 dosep runs, (i386-clang), TestInlineStepping.py:237 failed to stop at first breakpoint in main
@expectedFailureAll(oslist=["linux"], archs=["i386"])
- def test_with_dwarf_and_python_api(self):
+ def test_with_python_api(self):
"""Test stepping over and into inlined functions."""
- self.buildDwarf()
+ self.build()
self.inline_stepping()
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_step_over_with_dsym_and_python_api(self):
- """Test stepping over and into inlined functions."""
- self.buildDsym()
- self.inline_stepping_step_over()
-
- @python_api_test
- @dwarf_test
@expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"])
- def test_step_over_with_dwarf_and_python_api(self):
+ def test_step_over_with_python_api(self):
"""Test stepping over and into inlined functions."""
- self.buildDwarf()
+ self.build()
self.inline_stepping_step_over()
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_step_in_template_with_dsym_and_python_api(self):
+ def test_step_in_template_with_python_api(self):
"""Test stepping in to templated functions."""
- self.buildDsym()
- self.step_in_template()
-
- @python_api_test
- @dwarf_test
- def test_step_in_template_with_dwarf_and_python_api(self):
- """Test stepping in to templated functions."""
- self.buildDwarf()
+ self.build()
self.step_in_template()
def setUp(self):
diff --git a/lldb/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py b/lldb/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py
index e7168be..8a7b4d0 100644
--- a/lldb/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py
+++ b/lldb/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py
@@ -14,20 +14,9 @@
@skipTestIfFn(lambda x: True, "llvm.org/pr24702", "Skipped because the test crashes the test runner")
@unittest2.expectedFailure("llvm.org/pr24702")
- @dsym_test
- def test_bogus_values_with_dsym(self):
- self.buildDsym()
- self.bogus_values_test()
-
- @skipTestIfFn(lambda x: True, "llvm.org/pr24702", "Skipped because the test crashes the test runner")
- @unittest2.expectedFailure("llvm.org/pr24702")
- @dwarf_test
- def test_bogus_values_with_dwarf(self):
- self.buildDwarf()
- self.bogus_values_test()
-
- def bogus_values_test(self):
+ def test_bogus_values(self):
"""Test that we handle inferior misusing the GDB JIT interface"""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py b/lldb/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py
index 9d599c3..f499178 100644
--- a/lldb/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py
+++ b/lldb/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py
@@ -13,23 +13,11 @@
mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym (self):
- self.buildDsym()
- self.do_test ()
-
-
@expectedFailureFreeBSD("llvm.org/pr22627 process launch w/ shell expansion not working")
@expectedFailureLinux("llvm.org/pr22627 process launch w/ shell expansion not working")
@expectedFailureWindows("llvm.org/pr24778")
- @dwarf_test
- def test_with_dwarf (self):
- self.buildDwarf()
- self.do_test ()
-
- def do_test (self):
+ def test(self):
+ self.build()
exe = os.path.join (os.getcwd(), "a.out")
self.runCmd("target create %s" % exe)
diff --git a/lldb/test/functionalities/load_unload/TestLoadUnload.py b/lldb/test/functionalities/load_unload/TestLoadUnload.py
index f32749d..fa1455b 100644
--- a/lldb/test/functionalities/load_unload/TestLoadUnload.py
+++ b/lldb/test/functionalities/load_unload/TestLoadUnload.py
@@ -75,7 +75,7 @@
"""Test target modules list after loading a different copy of the library libd.dylib, and verifies that it works with 'target modules search-paths add'."""
# Invoke the default build rule.
- self.buildDefault()
+ self.build()
if self.platformIsDarwin():
dylibName = 'libloadunload_d.dylib'
@@ -129,7 +129,7 @@
"""Test (DY)LD_LIBRARY_PATH after moving libd.dylib, which defines d_function, somewhere else."""
# Invoke the default build rule.
- self.buildDefault()
+ self.build()
self.copy_shlibs_to_remote(hidden_dir=True)
exe = os.path.join(os.getcwd(), "a.out")
@@ -185,7 +185,7 @@
"""Test that lldb process load/unload command work correctly."""
# Invoke the default build rule.
- self.buildDefault()
+ self.build()
self.copy_shlibs_to_remote()
exe = os.path.join(os.getcwd(), "a.out")
@@ -245,7 +245,7 @@
"""Test breakpoint by name works correctly with dlopen'ing."""
# Invoke the default build rule.
- self.buildDefault()
+ self.build()
self.copy_shlibs_to_remote()
exe = os.path.join(os.getcwd(), "a.out")
@@ -288,7 +288,7 @@
"""Test stepping over code that loads a shared library works correctly."""
# Invoke the default build rule.
- self.buildDefault()
+ self.build()
self.copy_shlibs_to_remote()
exe = os.path.join(os.getcwd(), "a.out")
diff --git a/lldb/test/functionalities/longjmp/TestLongjmp.py b/lldb/test/functionalities/longjmp/TestLongjmp.py
index ace7ad6..3fd06f2 100644
--- a/lldb/test/functionalities/longjmp/TestLongjmp.py
+++ b/lldb/test/functionalities/longjmp/TestLongjmp.py
@@ -21,7 +21,7 @@
@expectedFailureWindows("llvm.org/pr24778")
def test_step_out(self):
"""Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-out."""
- self.buildDefault()
+ self.build()
self.step_out()
@skipIfDarwin # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
@@ -30,7 +30,7 @@
@expectedFailureWindows("llvm.org/pr24778")
def test_step_over(self):
"""Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-over a longjmp."""
- self.buildDefault()
+ self.build()
self.step_over()
@skipIfDarwin # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
@@ -39,7 +39,7 @@
@expectedFailureWindows("llvm.org/pr24778")
def test_step_back_out(self):
"""Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-out after thread step-in."""
- self.buildDefault()
+ self.build()
self.step_back_out()
def start_test(self, symbol):
diff --git a/lldb/test/functionalities/memory/read/TestMemoryRead.py b/lldb/test/functionalities/memory/read/TestMemoryRead.py
index 427a8d4..67cf389 100644
--- a/lldb/test/functionalities/memory/read/TestMemoryRead.py
+++ b/lldb/test/functionalities/memory/read/TestMemoryRead.py
@@ -13,28 +13,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_memory_read_with_dsym(self):
- """Test the 'memory read' command with plain and vector formats."""
- self.buildDsym()
- self.memory_read_command()
-
- @dwarf_test
- @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"])
- def test_memory_read_with_dwarf(self):
- """Test the 'memory read' command with plain and vector formats."""
- self.buildDwarf()
- self.memory_read_command()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.cpp', '// Set break point at this line.')
- def memory_read_command(self):
+ @expectedFailureAll("llvm.org/pr23139", oslist=["linux"], compiler="gcc", compiler_version=[">=","4.9"], archs=["i386"])
+ def test_memory_read(self):
"""Test the 'memory read' command with plain and vector formats."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py b/lldb/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py
index d2a127e..786102e 100644
--- a/lldb/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py
+++ b/lldb/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py
@@ -18,13 +18,9 @@
# rdar://problem/9890530
def test_eval_index_variable(self):
"""Test expressions of variable 'i' which appears in two for loops."""
- self.buildDefault()
+ self.build()
self.exe_name = 'a.out'
- self.eval_index_variable_i(self.exe_name)
-
- def eval_index_variable_i(self, exe_name):
- """Test expressions of variable 'i' which appears in two for loops."""
- exe = os.path.join(os.getcwd(), exe_name)
+ exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file %s" % exe, CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, self.source, self.line_to_break, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/nosucharch/TestNoSuchArch.py b/lldb/test/functionalities/nosucharch/TestNoSuchArch.py
index 06eb0dc..cda0cd6 100644
--- a/lldb/test/functionalities/nosucharch/TestNoSuchArch.py
+++ b/lldb/test/functionalities/nosucharch/TestNoSuchArch.py
@@ -10,32 +10,17 @@
mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym (self):
- self.buildDsym()
- self.do_test ()
-
-
- @skipUnlessDarwin
- @dwarf_test
- def test_with_dwarf (self):
- self.buildDwarf()
- self.do_test ()
-
- def do_test (self):
+ def test (self):
+ self.build()
exe = os.path.join (os.getcwd(), "a.out")
-
+
# Check that passing an invalid arch via the command-line fails but doesn't crash
self.expect("target crete --arch nothingtoseehere %s" % (exe), error=True)
-
-
+
# Check that passing an invalid arch via the SB API fails but doesn't crash
target = self.dbg.CreateTargetWithFileAndArch(exe,"nothingtoseehere")
-
self.assertFalse(target.IsValid(), "This target should not be valid")
-
+
# Now just create the target with the default arch and check it's fine
target = self.dbg.CreateTarget(exe)
self.assertTrue(target.IsValid(), "This target should now be valid")
diff --git a/lldb/test/functionalities/object-file/TestImageListMultiArchitecture.py b/lldb/test/functionalities/object-file/TestImageListMultiArchitecture.py
index aa1a6f0..165a41f 100644
--- a/lldb/test/functionalities/object-file/TestImageListMultiArchitecture.py
+++ b/lldb/test/functionalities/object-file/TestImageListMultiArchitecture.py
@@ -15,10 +15,7 @@
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
+ @no_debug_info_test
def test_image_list_shows_multiple_architectures(self):
"""Test that image list properly shows the correct architecture for a set of different architecture object files."""
images = {
diff --git a/lldb/test/functionalities/paths/TestPaths.py b/lldb/test/functionalities/paths/TestPaths.py
index bc37ea6..c581ccc 100644
--- a/lldb/test/functionalities/paths/TestPaths.py
+++ b/lldb/test/functionalities/paths/TestPaths.py
@@ -13,6 +13,7 @@
mydir = TestBase.compute_mydir(__file__)
+ @no_debug_info_test
def test_paths (self):
'''Test to make sure no file names are set in the lldb.SBFileSpec objects returned by lldb.SBHostOS.GetLLDBPath() for paths that are directories'''
dir_path_types = [lldb.ePathTypeLLDBShlibDir,
@@ -28,6 +29,7 @@
# No directory path types should have the filename set
self.assertTrue (f.GetFilename() == None);
+ @no_debug_info_test
def test_directory_doesnt_end_with_slash(self):
current_directory_spec = lldb.SBFileSpec(os.path.curdir)
current_directory_string = current_directory_spec.GetDirectory()
@@ -35,6 +37,7 @@
pass
@skipUnlessPlatform(["windows"])
+ @no_debug_info_test
def test_windows_double_slash (self):
'''Test to check the path with double slash is handled correctly '''
# Create a path and see if lldb gets the directory and file right
diff --git a/lldb/test/functionalities/platform/TestPlatformCommand.py b/lldb/test/functionalities/platform/TestPlatformCommand.py
index 5bf8126..c7afacf 100644
--- a/lldb/test/functionalities/platform/TestPlatformCommand.py
+++ b/lldb/test/functionalities/platform/TestPlatformCommand.py
@@ -11,26 +11,32 @@
mydir = TestBase.compute_mydir(__file__)
+ @no_debug_info_test
def test_help_platform(self):
self.runCmd("help platform")
+ @no_debug_info_test
def test_list(self):
self.expect("platform list",
patterns = ['^Available platforms:'])
+ @no_debug_info_test
def test_process_list(self):
self.expect("platform process list",
substrs = ['PID', 'TRIPLE', 'NAME'])
+ @no_debug_info_test
def test_process_info_with_no_arg(self):
"""This is expected to fail and to return a proper error message."""
self.expect("platform process info", error=True,
substrs = ['one or more process id(s) must be specified'])
+ @no_debug_info_test
def test_status(self):
self.expect("platform status",
substrs = ['Platform', 'Triple', 'OS Version', 'Kernel', 'Hostname'])
+ @no_debug_info_test
def test_shell(self):
""" Test that the platform shell command can invoke ls. """
triple = self.dbg.GetSelectedPlatform().GetTriple()
@@ -41,12 +47,14 @@
else:
self.expect("platform shell ls /", substrs = ["dev", "tmp", "usr"])
+ @no_debug_info_test
def test_shell_builtin(self):
""" Test a shell built-in command (echo) """
self.expect("platform shell echo hello lldb",
substrs = ["hello lldb"])
#FIXME: re-enable once platform shell -t can specify the desired timeout
+ @no_debug_info_test
def test_shell_timeout(self):
""" Test a shell built-in command (sleep) that times out """
self.skipTest("due to taking too long to complete.")
diff --git a/lldb/test/functionalities/plugins/commands/TestPluginCommands.py b/lldb/test/functionalities/plugins/commands/TestPluginCommands.py
index 0d360e4..f00ada5 100644
--- a/lldb/test/functionalities/plugins/commands/TestPluginCommands.py
+++ b/lldb/test/functionalities/plugins/commands/TestPluginCommands.py
@@ -22,6 +22,7 @@
@skipIfNoSBHeaders
@skipIfHostIncompatibleWithRemote # Requires a compatible arch and platform to link against the host's built lldb lib.
@expectedFailureWindows("llvm.org/pr24778")
+ @no_debug_info_test
def test_load_plugin(self):
"""Test that plugins that load commands work correctly."""
diff --git a/lldb/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py b/lldb/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
index 16feb5f..d4b1b5f 100644
--- a/lldb/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
+++ b/lldb/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
@@ -13,30 +13,14 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_python_os_plugin_dsym(self):
+ def test_python_os_plugin(self):
"""Test that the Python operating system plugin works correctly"""
- self.buildDsym()
+ self.build()
self.run_python_os_funcionality()
- @dwarf_test
- def test_python_os_plugin_dwarf(self):
- """Test that the Python operating system plugin works correctly"""
- self.buildDwarf()
- self.run_python_os_funcionality()
-
- @skipUnlessDarwin
- @dsym_test
- def test_python_os_step_dsym(self):
+ def run_python_os_step(self):
"""Test that the Python operating system plugin works correctly when single stepping a virtual thread"""
- self.buildDsym()
- self.run_python_os_step()
-
- @dwarf_test
- def run_python_os_step_dwarf(self):
- """Test that the Python operating system plugin works correctly when single stepping a virtual thread"""
- self.buildDwarf()
+ self.build()
self.run_python_os_step()
def verify_os_thread_registers(self, thread):
diff --git a/lldb/test/functionalities/postmortem/minidump/TestMiniDump.py b/lldb/test/functionalities/postmortem/minidump/TestMiniDump.py
index 63cfd0e..84bf777 100644
--- a/lldb/test/functionalities/postmortem/minidump/TestMiniDump.py
+++ b/lldb/test/functionalities/postmortem/minidump/TestMiniDump.py
@@ -12,12 +12,14 @@
mydir = TestBase.compute_mydir(__file__)
+ @no_debug_info_test
def test_process_info_in_mini_dump(self):
"""Test that lldb can read the process information from the minidump."""
self.assertTrue(self.process, PROCESS_IS_VALID)
self.assertEqual(self.process.GetNumThreads(), 1)
self.assertEqual(self.process.GetProcessID(), 4440)
+ @no_debug_info_test
def test_thread_info_in_mini_dump(self):
"""Test that lldb can read the thread information from the minidump."""
# This process crashed due to an access violation (0xc0000005) in its one and only thread.
diff --git a/lldb/test/functionalities/process_attach/TestProcessAttach.py b/lldb/test/functionalities/process_attach/TestProcessAttach.py
index 56a9439..b8005c2 100644
--- a/lldb/test/functionalities/process_attach/TestProcessAttach.py
+++ b/lldb/test/functionalities/process_attach/TestProcessAttach.py
@@ -14,46 +14,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_attach_to_process_by_id_with_dsym(self):
+ def test_attach_to_process_by_id(self):
"""Test attach by process id"""
- self.buildDsym()
- self.process_attach_by_id()
-
- @dwarf_test
- def test_attach_to_process_by_id_with_dwarf(self):
- """Test attach by process id"""
- self.buildDwarf()
- self.process_attach_by_id()
-
- @skipUnlessDarwin
- @dsym_test
- def test_attach_to_process_by_name_with_dsym(self):
- """Test attach by process name"""
- self.buildDsym()
- self.process_attach_by_name()
-
- @dwarf_test
- def test_attach_to_process_by_name_with_dwarf(self):
- """Test attach by process name"""
- self.buildDwarf()
- self.process_attach_by_name()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def tearDown(self):
- # Destroy process before TestBase.tearDown()
- self.dbg.GetSelectedTarget().GetProcess().Destroy()
-
- # Call super's tearDown().
- TestBase.tearDown(self)
-
- def process_attach_by_id(self):
- """Test attach by process id"""
-
+ self.build()
exe = os.path.join(os.getcwd(), exe_name)
# Spawn a new process
@@ -67,10 +30,9 @@
process = target.GetProcess()
self.assertTrue(process, PROCESS_IS_VALID)
-
- def process_attach_by_name(self):
+ def test_attach_to_process_by_name(self):
"""Test attach by process name"""
-
+ self.build()
exe = os.path.join(os.getcwd(), exe_name)
# Spawn a new process
@@ -84,6 +46,12 @@
process = target.GetProcess()
self.assertTrue(process, PROCESS_IS_VALID)
+ def tearDown(self):
+ # Destroy process before TestBase.tearDown()
+ self.dbg.GetSelectedTarget().GetProcess().Destroy()
+
+ # Call super's tearDown().
+ TestBase.tearDown(self)
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py b/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
index 57ef2e0..65d0c23 100644
--- a/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
+++ b/lldb/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
@@ -24,8 +24,7 @@
@skipIfLinux # hanging after reviews D13124 change went in
def test_attach_to_process_by_id_denied(self):
"""Test attach by process id denied"""
-
- self.buildDefault()
+ self.build()
exe = os.path.join(os.getcwd(), exe_name)
# Use a file as a synchronization point between test and inferior.
diff --git a/lldb/test/functionalities/process_group/TestChangeProcessGroup.py b/lldb/test/functionalities/process_group/TestChangeProcessGroup.py
index 2d3c0f9..343e53d 100644
--- a/lldb/test/functionalities/process_group/TestChangeProcessGroup.py
+++ b/lldb/test/functionalities/process_group/TestChangeProcessGroup.py
@@ -17,28 +17,11 @@
# Find the line number to break for main.c.
self.line = line_number('main.c', '// Set breakpoint here')
- @skipIfWindows # setpgid call does not exist on Windows
- @skipUnlessDarwin
- @dsym_test
- def test_setpgid_with_dsym(self):
- self.buildDsym()
- self.setpgid()
-
@skipIfFreeBSD # Times out on FreeBSD llvm.org/pr23731
@skipIfWindows # setpgid call does not exist on Windows
@expectedFailureAndroid("http://llvm.org/pr23762", api_levels=[16])
- @dwarf_test
- def test_setpgid_with_dwarf(self):
- self.buildDwarf()
- self.setpgid()
-
- def run_platform_command(self, cmd):
- platform = self.dbg.GetSelectedPlatform()
- shell_command = lldb.SBPlatformShellCommand(cmd)
- err = platform.Run(shell_command)
- return (err, shell_command.GetStatus(), shell_command.GetOutput())
-
- def setpgid(self):
+ def test_setpgid(self):
+ self.build()
exe = os.path.join(os.getcwd(), 'a.out')
# Use a file as a synchronization point between test and inferior.
@@ -109,6 +92,12 @@
process.Continue()
self.assertEqual(process.GetState(), lldb.eStateExited)
+ def run_platform_command(self, cmd):
+ platform = self.dbg.GetSelectedPlatform()
+ shell_command = lldb.SBPlatformShellCommand(cmd)
+ err = platform.Run(shell_command)
+ return (err, shell_command.GetStatus(), shell_command.GetOutput())
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/functionalities/process_launch/TestProcessLaunch.py b/lldb/test/functionalities/process_launch/TestProcessLaunch.py
index 92732f9..e843bfc 100644
--- a/lldb/test/functionalities/process_launch/TestProcessLaunch.py
+++ b/lldb/test/functionalities/process_launch/TestProcessLaunch.py
@@ -18,22 +18,10 @@
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
- @skipUnlessDarwin
- @dsym_test
- def test_io_with_dsym (self):
- """Test that process launch I/O redirection flags work properly."""
- self.buildDsym ()
- self.process_io_test ()
-
- @dwarf_test
- def test_io_with_dwarf (self):
- """Test that process launch I/O redirection flags work properly."""
- self.buildDwarf ()
- self.process_io_test ()
-
@not_remote_testsuite_ready
- def process_io_test (self):
+ def test_io (self):
"""Test that process launch I/O redirection flags work properly."""
+ self.build ()
exe = os.path.join (os.getcwd(), "a.out")
self.expect("file " + exe,
patterns = [ "Current executable set to .*a.out" ])
@@ -115,29 +103,15 @@
if not success:
self.fail (err_msg)
- d = {'CXX_SOURCES' : 'print_cwd.cpp'}
-
- @skipUnlessDarwin
- @dsym_test
- def test_set_working_dir_with_dsym (self):
- """Test that '-w dir' sets the working dir when running the inferior."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(self.d)
- self.my_working_dir_test()
-
- @expectedFailureLinux("llvm.org/pr20265")
- @dwarf_test
- def test_set_working_dir_with_dwarf (self):
- """Test that '-w dir' sets the working dir when running the inferior."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(self.d)
- self.my_working_dir_test()
-
# rdar://problem/9056462
# The process launch flag '-w' for setting the current working directory not working?
@not_remote_testsuite_ready
- def my_working_dir_test (self):
+ @expectedFailureLinux("llvm.org/pr20265")
+ def test_set_working_dir (self):
"""Test that '-w dir' sets the working dir when running the inferior."""
+ d = {'CXX_SOURCES' : 'print_cwd.cpp'}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(d)
exe = os.path.join (os.getcwd(), "a.out")
self.runCmd("file " + exe)
diff --git a/lldb/test/functionalities/recursion/TestValueObjectRecursion.py b/lldb/test/functionalities/recursion/TestValueObjectRecursion.py
index 42724d5..243b862 100644
--- a/lldb/test/functionalities/recursion/TestValueObjectRecursion.py
+++ b/lldb/test/functionalities/recursion/TestValueObjectRecursion.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that deeply nested ValueObjects still work."""
- self.buildDsym()
- self.recursive_vo_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test that deeply nested ValueObjects still work."""
- self.buildDwarf()
- self.recursive_vo_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def recursive_vo_commands(self):
- """Test that that file and class static variables display correctly."""
+ def test_with_run_command(self):
+ """Test that deeply nested ValueObjects still work."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/register/TestRegisters.py b/lldb/test/functionalities/register/TestRegisters.py
index cee5837..8957d9c 100755
--- a/lldb/test/functionalities/register/TestRegisters.py
+++ b/lldb/test/functionalities/register/TestRegisters.py
@@ -25,7 +25,7 @@
"""Test commands related to registers, in particular vector registers."""
if not self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
self.skipTest("This test requires x86 or x86_64 as the architecture for the inferior")
- self.buildDefault()
+ self.build()
self.register_commands()
@skipIfTargetAndroid(archs=["i386"]) # Writing of mxcsr register fails, presumably due to a kernel/hardware problem
@@ -33,7 +33,7 @@
"""Test commands that write to registers, in particular floating-point registers."""
if not self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
self.skipTest("This test requires x86 or x86_64 as the architecture for the inferior")
- self.buildDefault()
+ self.build()
self.fp_register_write()
@expectedFailureAndroid(archs=["i386"]) # "register read fstat" always return 0xffff
@@ -42,35 +42,35 @@
"""Test commands that read fpu special purpose registers."""
if not self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
self.skipTest("This test requires x86 or x86_64 as the architecture for the inferior")
- self.buildDefault()
+ self.build()
self.fp_special_purpose_register_read()
def test_register_expressions(self):
"""Test expression evaluation with commands related to registers."""
if not self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
self.skipTest("This test requires x86 or x86_64 as the architecture for the inferior")
- self.buildDefault()
+ self.build()
self.register_expressions()
def test_convenience_registers(self):
"""Test convenience registers."""
if not self.getArchitecture() in ['amd64', 'x86_64']:
self.skipTest("This test requires x86_64 as the architecture for the inferior")
- self.buildDefault()
+ self.build()
self.convenience_registers()
def test_convenience_registers_with_process_attach(self):
"""Test convenience registers after a 'process attach'."""
if not self.getArchitecture() in ['amd64', 'x86_64']:
self.skipTest("This test requires x86_64 as the architecture for the inferior")
- self.buildDefault()
+ self.build()
self.convenience_registers_with_process_attach(test_16bit_regs=False)
def test_convenience_registers_16bit_with_process_attach(self):
"""Test convenience registers after a 'process attach'."""
if not self.getArchitecture() in ['amd64', 'x86_64']:
self.skipTest("This test requires x86_64 as the architecture for the inferior")
- self.buildDefault()
+ self.build()
self.convenience_registers_with_process_attach(test_16bit_regs=True)
def common_setup(self):
diff --git a/lldb/test/functionalities/rerun/TestRerun.py b/lldb/test/functionalities/rerun/TestRerun.py
index 18b447c..b1b5465 100644
--- a/lldb/test/functionalities/rerun/TestRerun.py
+++ b/lldb/test/functionalities/rerun/TestRerun.py
@@ -13,20 +13,8 @@
mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym (self):
- self.buildDsym()
- self.do_test ()
-
-
- @dwarf_test
- def test_with_dwarf (self):
- self.buildDwarf()
- self.do_test ()
-
- def do_test (self):
+ def test (self):
+ self.build()
exe = os.path.join (os.getcwd(), "a.out")
self.runCmd("target create %s" % exe)
diff --git a/lldb/test/functionalities/return-value/TestReturnValue.py b/lldb/test/functionalities/return-value/TestReturnValue.py
index e315b15..bafde43 100644
--- a/lldb/test/functionalities/return-value/TestReturnValue.py
+++ b/lldb/test/functionalities/return-value/TestReturnValue.py
@@ -12,80 +12,12 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @expectedFailurei386
- @python_api_test
- @dsym_test
- def test_with_dsym_python(self):
- """Test getting return values from stepping out with dsyms."""
- self.buildDsym()
- self.do_return_value()
-
@expectedFailurei386
@expectedFailureWindows("llvm.org/pr24778")
@python_api_test
- @dwarf_test
- def test_with_dwarf_python(self):
+ def test_with_python(self):
"""Test getting return values from stepping out."""
- self.buildDwarf()
- self.do_return_value()
-
- def return_and_test_struct_value (self, func_name):
- """Pass in the name of the function to return from - takes in value, returns value."""
-
- # Set the breakpoint, run to it, finish out.
- bkpt = self.target.BreakpointCreateByName (func_name)
- self.assertTrue (bkpt.GetNumResolvedLocations() > 0)
-
- self.process.Continue ()
-
- thread_list = lldbutil.get_threads_stopped_at_breakpoint (self.process, bkpt)
-
- self.assertTrue (len(thread_list) == 1)
- thread = thread_list[0]
-
- self.target.BreakpointDelete (bkpt.GetID())
-
- in_value = thread.GetFrameAtIndex(0).FindVariable ("value")
-
- self.assertTrue (in_value.IsValid())
- num_in_children = in_value.GetNumChildren()
-
- # This is a little hokey, but if we don't get all the children now, then
- # once we've stepped we won't be able to get them?
-
- for idx in range(0, num_in_children):
- in_child = in_value.GetChildAtIndex (idx)
- in_child_str = in_child.GetValue()
-
- thread.StepOut()
-
- self.assertTrue (self.process.GetState() == lldb.eStateStopped)
- self.assertTrue (thread.GetStopReason() == lldb.eStopReasonPlanComplete)
-
- # Assuming all these functions step out to main. Could figure out the caller dynamically
- # if that would add something to the test.
- frame = thread.GetFrameAtIndex(0)
- fun_name = frame.GetFunctionName()
- self.assertTrue (fun_name == "main")
-
- frame = thread.GetFrameAtIndex(0)
- ret_value = thread.GetStopReturnValue()
-
- self.assertTrue (ret_value.IsValid())
-
- num_ret_children = ret_value.GetNumChildren()
- self.assertTrue (num_in_children == num_ret_children)
- for idx in range(0, num_ret_children):
- in_child = in_value.GetChildAtIndex(idx)
- ret_child = ret_value.GetChildAtIndex(idx)
- in_child_str = in_child.GetValue()
- ret_child_str = ret_child.GetValue()
-
- self.assertEqual(in_child_str, ret_child_str)
-
- def do_return_value(self):
- """Test getting return values from stepping out."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
error = lldb.SBError()
@@ -221,6 +153,60 @@
self.return_and_test_struct_value ("return_ext_vector_size_float32_4")
self.return_and_test_struct_value ("return_ext_vector_size_float32_8")
+ def return_and_test_struct_value (self, func_name):
+ """Pass in the name of the function to return from - takes in value, returns value."""
+
+ # Set the breakpoint, run to it, finish out.
+ bkpt = self.target.BreakpointCreateByName (func_name)
+ self.assertTrue (bkpt.GetNumResolvedLocations() > 0)
+
+ self.process.Continue ()
+
+ thread_list = lldbutil.get_threads_stopped_at_breakpoint (self.process, bkpt)
+
+ self.assertTrue (len(thread_list) == 1)
+ thread = thread_list[0]
+
+ self.target.BreakpointDelete (bkpt.GetID())
+
+ in_value = thread.GetFrameAtIndex(0).FindVariable ("value")
+
+ self.assertTrue (in_value.IsValid())
+ num_in_children = in_value.GetNumChildren()
+
+ # This is a little hokey, but if we don't get all the children now, then
+ # once we've stepped we won't be able to get them?
+
+ for idx in range(0, num_in_children):
+ in_child = in_value.GetChildAtIndex (idx)
+ in_child_str = in_child.GetValue()
+
+ thread.StepOut()
+
+ self.assertTrue (self.process.GetState() == lldb.eStateStopped)
+ self.assertTrue (thread.GetStopReason() == lldb.eStopReasonPlanComplete)
+
+ # Assuming all these functions step out to main. Could figure out the caller dynamically
+ # if that would add something to the test.
+ frame = thread.GetFrameAtIndex(0)
+ fun_name = frame.GetFunctionName()
+ self.assertTrue (fun_name == "main")
+
+ frame = thread.GetFrameAtIndex(0)
+ ret_value = thread.GetStopReturnValue()
+
+ self.assertTrue (ret_value.IsValid())
+
+ num_ret_children = ret_value.GetNumChildren()
+ self.assertTrue (num_in_children == num_ret_children)
+ for idx in range(0, num_ret_children):
+ in_child = in_value.GetChildAtIndex(idx)
+ ret_child = ret_value.GetChildAtIndex(idx)
+ in_child_str = in_child.GetValue()
+ ret_child_str = ret_child.GetValue()
+
+ self.assertEqual(in_child_str, ret_child_str)
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/functionalities/set-data/TestSetData.py b/lldb/test/functionalities/set-data/TestSetData.py
index 07fdc7e..3bd5ee4 100644
--- a/lldb/test/functionalities/set-data/TestSetData.py
+++ b/lldb/test/functionalities/set-data/TestSetData.py
@@ -8,19 +8,14 @@
from lldbtest import *
import lldbutil
-@skipUnlessDarwin
class SetDataTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_set_data_dsym(self):
+ @skipUnlessDarwin
+ def test_set_data(self):
"""Test setting the contents of variables and registers using raw data."""
- self.buildDsym()
- self.setData()
-
- def setData(self):
- """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/signal/TestSendSignal.py b/lldb/test/functionalities/signal/TestSendSignal.py
index 4b01b57..5ce843d 100644
--- a/lldb/test/functionalities/signal/TestSendSignal.py
+++ b/lldb/test/functionalities/signal/TestSendSignal.py
@@ -11,43 +11,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process."""
- self.buildDsym()
- self.send_signal()
-
- @expectedFailureFreeBSD("llvm.org/pr23318: does not report running state")
- @skipIfWindows # Windows does not support signals
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process."""
- self.buildDwarf()
- self.send_signal()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.c', 'Put breakpoint here')
- def match_state(self, process_listener, expected_state):
- num_seconds = 5
- broadcaster = self.process().GetBroadcaster()
- event_type_mask = lldb.SBProcess.eBroadcastBitStateChanged
- event = lldb.SBEvent()
- got_event = process_listener.WaitForEventForBroadcasterWithType(
- num_seconds, broadcaster, event_type_mask, event)
- self.assertTrue(got_event, "Got an event")
- state = lldb.SBProcess.GetStateFromEvent(event)
- self.assertTrue(state == expected_state,
- "It was the %s state." %
- lldb.SBDebugger_StateAsCString(expected_state))
-
- def send_signal(self):
+ @expectedFailureFreeBSD("llvm.org/pr23318: does not report running state")
+ @skipIfWindows # Windows does not support signals
+ def test_with_run_command(self):
"""Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process."""
-
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
@@ -114,6 +88,19 @@
self.assertTrue(thread.GetStopReasonDataAtIndex(0) == lldbutil.get_signal_number('SIGUSR1'),
"The stop signal was SIGUSR1")
+ def match_state(self, process_listener, expected_state):
+ num_seconds = 5
+ broadcaster = self.process().GetBroadcaster()
+ event_type_mask = lldb.SBProcess.eBroadcastBitStateChanged
+ event = lldb.SBEvent()
+ got_event = process_listener.WaitForEventForBroadcasterWithType(
+ num_seconds, broadcaster, event_type_mask, event)
+ self.assertTrue(got_event, "Got an event")
+ state = lldb.SBProcess.GetStateFromEvent(event)
+ self.assertTrue(state == expected_state,
+ "It was the %s state." %
+ lldb.SBDebugger_StateAsCString(expected_state))
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/functionalities/signal/handle-segv/TestHandleSegv.py b/lldb/test/functionalities/signal/handle-segv/TestHandleSegv.py
index ce47e94..fdb8f99 100644
--- a/lldb/test/functionalities/signal/handle-segv/TestHandleSegv.py
+++ b/lldb/test/functionalities/signal/handle-segv/TestHandleSegv.py
@@ -15,8 +15,8 @@
@skipIfWindows # signals do not exist on Windows
@skipIfDarwin
@expectedFailureFreeBSD("llvm.org/pr23699 SIGSEGV is reported as exception, not signal")
- def test_inferior_handle_sigsegv_with_dwarf(self):
- self.buildDefault()
+ def test_inferior_handle_sigsegv(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/functionalities/signal/raise/TestRaise.py b/lldb/test/functionalities/signal/raise/TestRaise.py
index b667277..0099251 100644
--- a/lldb/test/functionalities/signal/raise/TestRaise.py
+++ b/lldb/test/functionalities/signal/raise/TestRaise.py
@@ -13,24 +13,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_sigstop_with_dsym(self):
- self.buildDsym()
+ def test_sigstop(self):
+ self.build()
self.signal_test('SIGSTOP', False)
# passing of SIGSTOP is not correctly handled, so not testing that scenario: https://llvm.org/bugs/show_bug.cgi?id=23574
- @dwarf_test
- def test_sigstop_with_dwarf(self):
- self.buildDwarf()
- self.signal_test('SIGSTOP', False)
- # passing of SIGSTOP is not correctly handled, so not testing that scenario: https://llvm.org/bugs/show_bug.cgi?id=23574
-
- @dwarf_test
@skipIfDarwin # darwin does not support real time signals
@skipIfTargetAndroid()
- def test_sigsigrtmin_with_dwarf(self):
- self.buildDwarf()
+ def test_sigsigrtmin(self):
+ self.build()
self.signal_test('SIGRTMIN', True)
def launch(self, target, signal):
@@ -154,23 +145,12 @@
# reset signal handling to default
self.set_handle(signal, default_pass, default_stop, default_notify)
- @dwarf_test
@expectedFailureLinux("llvm.org/pr24530") # the signal the inferior generates gets lost
@expectedFailureDarwin("llvm.org/pr24530") # the signal the inferior generates gets lost
- def test_restart_bug_with_dwarf(self):
- self.buildDwarf()
- self.restart_bug_test()
-
- @dsym_test
- @expectedFailureDarwin("llvm.org/pr24530") # the signal the inferior generates gets lost
- def test_restart_bug_with_dsym(self):
- self.buildDsym()
- self.restart_bug_test()
-
- def restart_bug_test(self):
+ def test_restart_bug(self):
"""Test that we catch a signal in the edge case where the process receives it while we are
about to interrupt it"""
-
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py b/lldb/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
index 5f5aff0..cd45412 100644
--- a/lldb/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
+++ b/lldb/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
@@ -23,6 +23,7 @@
pass
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
+ @no_debug_info_test
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."""
import pexpect
diff --git a/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py b/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
index 7f6601b..1b38afc 100644
--- a/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
+++ b/lldb/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
@@ -13,56 +13,26 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_step_out_with_dsym_python(self):
+ def test_step_out_with_python(self):
"""Test stepping out using avoid-no-debug with dsyms."""
- self.buildDsym()
+ self.build()
self.get_to_starting_point()
self.do_step_out_past_nodebug()
@python_api_test
- @dwarf_test
- def test_step_out_with_dwarf_python(self):
- """Test stepping out using avoid-no-debug with dsyms."""
- self.buildDwarf()
- self.get_to_starting_point()
- self.do_step_out_past_nodebug()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_step_over_with_dsym_python(self):
- """Test stepping over using avoid-no-debug with dsyms."""
- self.buildDsym()
- self.get_to_starting_point()
- self.do_step_over_past_nodebug()
-
- @python_api_test
- @dwarf_test
@expectedFailureGcc("llvm.org/pr19247")
- def test_step_over_with_dwarf_python(self):
+ def test_step_over_with_python(self):
"""Test stepping over using avoid-no-debug with dwarf."""
- self.buildDwarf()
+ self.build()
self.get_to_starting_point()
self.do_step_over_past_nodebug()
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_step_in_with_dsym_python(self):
- """Test stepping in using avoid-no-debug with dsyms."""
- self.buildDsym()
- self.get_to_starting_point()
- self.do_step_in_past_nodebug()
-
- @python_api_test
- @dwarf_test
@expectedFailureGcc("llvm.org/pr19247")
- def test_step_in_with_dwarf_python(self):
+ def test_step_in_with_python(self):
"""Test stepping in using avoid-no-debug with dwarf."""
- self.buildDwarf()
+ self.build()
self.get_to_starting_point()
self.do_step_in_past_nodebug()
diff --git a/lldb/test/functionalities/stop-hook/TestStopHookCmd.py b/lldb/test/functionalities/stop-hook/TestStopHookCmd.py
index 8453cc3..14017c7 100644
--- a/lldb/test/functionalities/stop-hook/TestStopHookCmd.py
+++ b/lldb/test/functionalities/stop-hook/TestStopHookCmd.py
@@ -13,24 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- # Regression test.
- def test_not_crashing_if_no_target(self):
- """target stop-hook list should not crash if no target has been set."""
- self.runCmd("target stop-hook list", check=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test a sequence of target stop-hook commands."""
- self.buildDsym()
- self.stop_hook_cmd_sequence()
-
- @dwarf_test
- def test_with_dwarf(self):
- """Test a sequence of target stop-hook commands."""
- self.buildDwarf()
- self.stop_hook_cmd_sequence()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -39,8 +21,14 @@
self.endl = line_number('main.cpp', '// End of the line range for which stop-hook is to be run.')
self.line = line_number('main.cpp', '// Another breakpoint which is outside of the stop-hook range.')
- def stop_hook_cmd_sequence(self):
+ @no_debug_info_test
+ def test_not_crashing_if_no_target(self):
+ """target stop-hook list should not crash if no target has been set."""
+ self.runCmd("target stop-hook list", check=False)
+
+ def test(self):
"""Test a sequence of target stop-hook commands."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py b/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py
index cda025b..abb9995 100644
--- a/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py
+++ b/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py
@@ -11,22 +11,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test the stop-hook mechanism."""
- self.buildDsym()
- self.stop_hook_firing()
-
- @skipIfFreeBSD # llvm.org/pr15037
- @expectedFlakeyLinux('llvm.org/pr15037') # stop-hooks sometimes fail to fire on Linux
- @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
- @dwarf_test
- def test_with_dwarf(self):
- """Test the stop-hook mechanism."""
- self.buildDwarf()
- self.stop_hook_firing()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -36,8 +20,13 @@
self.correct_step_line = line_number ('main.cpp', '// We should stop here after stepping.')
self.line = line_number('main.cpp', '// Another breakpoint which is outside of the stop-hook range.')
- def stop_hook_firing(self):
+ @skipIfFreeBSD # llvm.org/pr15037
+ @expectedFlakeyLinux('llvm.org/pr15037') # stop-hooks sometimes fail to fire on Linux
+ @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
+ def test(self):
"""Test the stop-hook mechanism."""
+ self.build()
+
import pexpect
exe = os.path.join(os.getcwd(), "a.out")
prompt = "(lldb) "
diff --git a/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py b/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
index 69cd39f..59c5222 100644
--- a/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
+++ b/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
@@ -11,24 +11,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_stop_hook_multiple_threads_with_dsym(self):
- """Test that lldb stop-hook works for multiple threads."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.stop_hook_multiple_threads()
-
- @dwarf_test
- @expectedFlakeyFreeBSD("llvm.org/pr15037")
- @expectedFlakeyLinux("llvm.org/pr15037") # stop hooks sometimes fail to fire on Linux
- @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
- def test_stop_hook_multiple_threads_with_dwarf(self):
- """Test that lldb stop-hook works for multiple threads."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.stop_hook_multiple_threads()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -41,8 +23,14 @@
self.exe_name = self.testMethodName
self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
- def stop_hook_multiple_threads(self):
+ @expectedFlakeyFreeBSD("llvm.org/pr15037")
+ @expectedFlakeyLinux("llvm.org/pr15037") # stop hooks sometimes fail to fire on Linux
+ @expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
+ def test_stop_hook_multiple_threads(self):
"""Test that lldb stop-hook works for multiple threads."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
+
import pexpect
exe = os.path.join(os.getcwd(), self.exe_name)
prompt = "(lldb) "
diff --git a/lldb/test/functionalities/target_command/TestTargetCommand.py b/lldb/test/functionalities/target_command/TestTargetCommand.py
index 8cf327a..eb7409b 100644
--- a/lldb/test/functionalities/target_command/TestTargetCommand.py
+++ b/lldb/test/functionalities/target_command/TestTargetCommand.py
@@ -19,41 +19,36 @@
self.line_b = line_number('b.c', '// Set break point at this line.')
self.line_c = line_number('c.c', '// Set break point at this line.')
- @dwarf_test
- def test_target_command_with_dwarf(self):
+ def test_target_command(self):
"""Test some target commands: create, list, select."""
da = {'C_SOURCES': 'a.c', 'EXE': 'a.out'}
- self.buildDwarf(dictionary=da)
+ self.build(dictionary=da)
self.addTearDownCleanup(dictionary=da)
db = {'C_SOURCES': 'b.c', 'EXE': 'b.out'}
- self.buildDwarf(dictionary=db)
+ self.build(dictionary=db)
self.addTearDownCleanup(dictionary=db)
dc = {'C_SOURCES': 'c.c', 'EXE': 'c.out'}
- self.buildDwarf(dictionary=dc)
+ self.build(dictionary=dc)
self.addTearDownCleanup(dictionary=dc)
self.do_target_command()
# rdar://problem/9763907
# 'target variable' command fails if the target program has been run
- @skipUnlessDarwin
- @dsym_test
- def test_target_variable_command_with_dsym(self):
+ def test_target_variable_command(self):
"""Test 'target variable' command before and after starting the inferior."""
d = {'C_SOURCES': 'globals.c', 'EXE': 'globals'}
- self.buildDsym(dictionary=d)
+ self.build(dictionary=d)
self.addTearDownCleanup(dictionary=d)
self.do_target_variable_command('globals')
- @skipUnlessDarwin
- @dsym_test
- def test_target_variable_command_with_dsym_no_fail(self):
+ def test_target_variable_command_no_fail(self):
"""Test 'target variable' command before and after starting the inferior."""
d = {'C_SOURCES': 'globals.c', 'EXE': 'globals'}
- self.buildDsym(dictionary=d)
+ self.build(dictionary=d)
self.addTearDownCleanup(dictionary=d)
self.do_target_variable_command_no_fail('globals')
diff --git a/lldb/test/functionalities/thread/TestNumThreads.py b/lldb/test/functionalities/thread/TestNumThreads.py
index a7d0150..65ca699 100644
--- a/lldb/test/functionalities/thread/TestNumThreads.py
+++ b/lldb/test/functionalities/thread/TestNumThreads.py
@@ -12,27 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test number of threads."""
- self.buildDsym()
- self.number_of_threads_test()
-
- @dwarf_test
- def test_with_dwarf(self):
- """Test number of threads."""
- self.buildDwarf()
- self.number_of_threads_test()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.cpp', '// Set break point at this line.')
- def number_of_threads_test(self):
+ def test(self):
"""Test number of threads."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py b/lldb/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
index f1f18024..e149f36 100644
--- a/lldb/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
+++ b/lldb/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
@@ -12,31 +12,19 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @dsym_test
- def test_with_dsym(self):
- """Test breakpoint handling after a thread join."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.breakpoint_after_join_test()
-
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
- @dwarf_test
- def test_with_dwarf(self):
- """Test breakpoint handling after a thread join."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.breakpoint_after_join_test()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number for our breakpoint.
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
- def breakpoint_after_join_test(self):
+ @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
+ @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ def test(self):
"""Test breakpoint handling after a thread join."""
+ self.build(dictionary=self.getBuildFlags())
+
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py b/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py
index ae073f0..149d6a2 100644
--- a/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py
+++ b/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py
@@ -25,170 +25,150 @@
## Tests for multiple threads that generate a single event.
#
@unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
- @dwarf_test
- def test_many_breakpoints_dwarf(self):
+ def test_many_breakpoints(self):
"""Test 100 breakpoints from 100 threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=100)
@unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
- @dwarf_test
- def test_many_watchpoints_dwarf(self):
+ def test_many_watchpoints(self):
"""Test 100 watchpoints from 100 threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_watchpoint_threads=100)
@unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
- @dwarf_test
- def test_many_signals_dwarf(self):
+ def test_many_signals(self):
"""Test 100 signals from 100 threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_signal_threads=100)
@unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
- @dwarf_test
- def test_many_crash_dwarf(self):
+ def test_many_crash(self):
"""Test 100 threads that cause a segfault."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_crash_threads=100)
#
## Tests for concurrent signal and breakpoint
#
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
- def test_signal_break_dwarf(self):
+ def test_signal_break(self):
"""Test signal and a breakpoint in multiple threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=1, num_signal_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
- def test_delay_signal_break_dwarf(self):
+ def test_delay_signal_break(self):
"""Test (1-second delay) signal and a breakpoint in multiple threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=1, num_delay_signal_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
- def test_signal_delay_break_dwarf(self):
+ def test_signal_delay_break(self):
"""Test signal and a (1 second delay) breakpoint in multiple threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_delay_breakpoint_threads=1, num_signal_threads=1)
#
## Tests for concurrent watchpoint and breakpoint
#
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_watch_break_dwarf(self):
+ def test_watch_break(self):
"""Test watchpoint and a breakpoint in multiple threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=1, num_watchpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_delay_watch_break_dwarf(self):
+ def test_delay_watch_break(self):
"""Test (1-second delay) watchpoint and a breakpoint in multiple threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=1, num_delay_watchpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_watch_break_dwarf_delay(self):
+ def test_watch_break_delay(self):
"""Test watchpoint and a (1 second delay) breakpoint in multiple threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_delay_breakpoint_threads=1, num_watchpoint_threads=1)
#
## Tests for concurrent signal and watchpoint
#
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_signal_watch_dwarf(self):
+ def test_signal_watch(self):
"""Test a watchpoint and a signal in multiple threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_signal_threads=1, num_watchpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_delay_signal_watch_dwarf(self):
+ def test_delay_signal_watch(self):
"""Test a watchpoint and a (1 second delay) signal in multiple threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_delay_signal_threads=1, num_watchpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
@expectedFailureAll("llvm.org/pr16714", oslist=["linux"], archs=["i386"])
- def test_signal_delay_watch_dwarf(self):
+ def test_signal_delay_watch(self):
"""Test a (1 second delay) watchpoint and a signal in multiple threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_signal_threads=1, num_delay_watchpoint_threads=1)
#
## Tests for multiple breakpoint threads
#
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
- def test_two_breakpoint_threads_dwarf(self):
+ def test_two_breakpoint_threads(self):
"""Test two threads that trigger a breakpoint. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=2)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
- def test_breakpoint_one_delay_breakpoint_threads_dwarf(self):
+ def test_breakpoint_one_delay_breakpoint_threads(self):
"""Test threads that trigger a breakpoint where one thread has a 1 second delay. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=1,
num_delay_breakpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
- def test_two_breakpoints_one_signal_dwarf(self):
+ def test_two_breakpoints_one_signal(self):
"""Test two threads that trigger a breakpoint and one signal thread. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=2, num_signal_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
- def test_breakpoint_delay_breakpoint_one_signal_dwarf(self):
+ def test_breakpoint_delay_breakpoint_one_signal(self):
"""Test two threads that trigger a breakpoint (one with a 1 second delay) and one signal thread. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=1,
num_delay_breakpoint_threads=1,
num_signal_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
- def test_two_breakpoints_one_delay_signal_dwarf(self):
+ def test_two_breakpoints_one_delay_signal(self):
"""Test two threads that trigger a breakpoint and one (1 second delay) signal thread. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=2, num_delay_signal_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_two_breakpoints_one_watchpoint_dwarf(self):
+ def test_two_breakpoints_one_watchpoint(self):
"""Test two threads that trigger a breakpoint and one watchpoint thread. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=2, num_watchpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_breakpoints_delayed_breakpoint_one_watchpoint_dwarf(self):
+ def test_breakpoints_delayed_breakpoint_one_watchpoint(self):
"""Test a breakpoint, a delayed breakpoint, and one watchpoint thread. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_breakpoint_threads=1,
num_delay_breakpoint_threads=1,
num_watchpoint_threads=1)
@@ -196,86 +176,77 @@
#
## Tests for multiple watchpoint threads
#
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_two_watchpoint_threads_dwarf(self):
+ def test_two_watchpoint_threads(self):
"""Test two threads that trigger a watchpoint. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_watchpoint_threads=2)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_watchpoint_with_delay_watchpoint_threads_dwarf(self):
+ def test_watchpoint_with_delay_watchpoint_threads(self):
"""Test two threads that trigger a watchpoint where one thread has a 1 second delay. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_watchpoint_threads=1,
num_delay_watchpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_two_watchpoints_one_breakpoint_dwarf(self):
+ def test_two_watchpoints_one_breakpoint(self):
"""Test two threads that trigger a watchpoint and one breakpoint thread. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_watchpoint_threads=2, num_breakpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_two_watchpoints_one_delay_breakpoint_dwarf(self):
+ def test_two_watchpoints_one_delay_breakpoint(self):
"""Test two threads that trigger a watchpoint and one (1 second delay) breakpoint thread. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_watchpoint_threads=2, num_delay_breakpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_watchpoint_delay_watchpoint_one_breakpoint_dwarf(self):
+ def test_watchpoint_delay_watchpoint_one_breakpoint(self):
"""Test two threads that trigger a watchpoint (one with a 1 second delay) and one breakpoint thread. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_watchpoint_threads=1,
num_delay_watchpoint_threads=1,
num_breakpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_two_watchpoints_one_signal_dwarf(self):
+ def test_two_watchpoints_one_signal(self):
"""Test two threads that trigger a watchpoint and one signal thread. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_watchpoint_threads=2, num_signal_threads=1)
#
## Test for watchpoint, signal and breakpoint happening concurrently
#
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_signal_watch_break_dwarf(self):
+ def test_signal_watch_break(self):
"""Test a signal/watchpoint/breakpoint in multiple threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_signal_threads=1,
num_watchpoint_threads=1,
num_breakpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_signal_watch_break_dwarf(self):
+ def test_signal_watch_break(self):
"""Test one signal thread with 5 watchpoint and breakpoint threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_signal_threads=1,
num_watchpoint_threads=5,
num_breakpoint_threads=5)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_signal_watch_break_dwarf(self):
+ def test_signal_watch_break(self):
"""Test with 5 watchpoint and breakpoint threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_watchpoint_threads=5,
num_breakpoint_threads=5)
@@ -283,54 +254,48 @@
#
## Test for crashing threads happening concurrently with other events
#
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
- def test_crash_with_break_dwarf(self):
+ def test_crash_with_break(self):
""" Test a thread that crashes while another thread hits a breakpoint."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_crash_threads=1, num_breakpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_crash_with_watchpoint_dwarf(self):
+ def test_crash_with_watchpoint(self):
""" Test a thread that crashes while another thread hits a watchpoint."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_crash_threads=1, num_watchpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
- def test_crash_with_signal_dwarf(self):
+ def test_crash_with_signal(self):
""" Test a thread that crashes while another thread generates a signal."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_crash_threads=1, num_signal_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_crash_with_watchpoint_breakpoint_signal_dwarf(self):
+ def test_crash_with_watchpoint_breakpoint_signal(self):
""" Test a thread that crashes while other threads generate a signal and hit a watchpoint and breakpoint. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_crash_threads=1,
num_breakpoint_threads=1,
num_signal_threads=1,
num_watchpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@skipIfRemoteDueToDeadlock
- def test_delayed_crash_with_breakpoint_watchpoint_dwarf(self):
+ def test_delayed_crash_with_breakpoint_watchpoint(self):
""" Test a thread with a delayed crash while other threads hit a watchpoint and a breakpoint. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_delay_crash_threads=1,
num_breakpoint_threads=1,
num_watchpoint_threads=1)
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
- def test_delayed_crash_with_breakpoint_signal_dwarf(self):
+ def test_delayed_crash_with_breakpoint_signal(self):
""" Test a thread with a delayed crash while other threads generate a signal and hit a breakpoint. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.do_thread_actions(num_delay_crash_threads=1,
num_breakpoint_threads=1,
num_signal_threads=1)
diff --git a/lldb/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py b/lldb/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
index 96010de..e196fa2 100644
--- a/lldb/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
+++ b/lldb/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
@@ -12,26 +12,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_step_inst_with_dsym(self):
- """Test thread creation during step-inst handling."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.crash_during_step_inst_test()
-
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr24778")
- @expectedFailureAndroid("llvm.org/pr24497", archs=['arm', 'aarch64'])
- def test_step_inst_with_dwarf(self):
- """Test thread creation during step-inst handling."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.crash_during_step_inst_test()
-
def setUp(self):
TestBase.setUp(self)
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
- def crash_during_step_inst_test(self):
+ @expectedFailureWindows("llvm.org/pr24778")
+ @expectedFailureAndroid("llvm.org/pr24497", archs=['arm', 'aarch64'])
+ def test_step_inst_with(self):
+ """Test thread creation during step-inst handling."""
+ self.build(dictionary=self.getBuildFlags())
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py b/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
index 6bd0d6b..51bc26f 100644
--- a/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
+++ b/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
@@ -12,32 +12,23 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_create_after_attach_with_dsym(self):
- """Test thread creation after process attach."""
- self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False))
- self.create_after_attach(use_fork=False)
-
@skipIfFreeBSD # Hangs. May be the same as Linux issue llvm.org/pr16229 but
# not yet investigated. Revisit once required functionality
# is implemented for FreeBSD.
@skipIfWindows # Occasionally hangs on Windows, may be same as other issues.
- @dwarf_test
- def test_create_after_attach_with_dwarf_and_popen(self):
+ def test_create_after_attach_with_popen(self):
"""Test thread creation after process attach."""
- self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
+ self.build(dictionary=self.getBuildFlags(use_cpp11=False))
self.create_after_attach(use_fork=False)
@skipIfFreeBSD # Hangs. Revisit once required functionality is implemented
# for FreeBSD.
- @dwarf_test
@skipIfRemote
@skipIfWindows # Windows doesn't have fork.
@expectedFlakeyLinux("llvm.org/pr16229") # 1/100 dosep, build 3546, clang-3.5 x84_64
- def test_create_after_attach_with_dwarf_and_fork(self):
+ def test_create_after_attach_with_fork(self):
"""Test thread creation after process attach."""
- self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
+ self.build(dictionary=self.getBuildFlags(use_cpp11=False))
self.create_after_attach(use_fork=True)
def setUp(self):
diff --git a/lldb/test/functionalities/thread/create_during_step/TestCreateDuringStep.py b/lldb/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
index fd8cf77..76fbc15 100644
--- a/lldb/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
+++ b/lldb/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
@@ -12,59 +12,32 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
@expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @dsym_test
- def test_step_inst_with_dsym(self):
+ @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
+ @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
+ def test_step_inst(self):
"""Test thread creation during step-inst handling."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.create_during_step_inst_test()
+ self.build(dictionary=self.getBuildFlags())
+ self.create_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step')
- @skipUnlessDarwin
@expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @dsym_test
- def test_step_over_with_dsym(self):
+ @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
+ @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
+ def test_step_over(self):
"""Test thread creation during step-over handling."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.create_during_step_over_test()
+ self.build(dictionary=self.getBuildFlags())
+ self.create_during_step_base("thread step-over -m all-threads", 'stop reason = step over')
- @skipUnlessDarwin
@expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @dsym_test
- def test_step_in_with_dsym(self):
+ @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
+ @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
+ def test_step_in(self):
"""Test thread creation during step-in handling."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.create_during_step_in_test()
-
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
- @dwarf_test
- def test_step_inst_with_dwarf(self):
- """Test thread creation during step-inst handling."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.create_during_step_inst_test()
-
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
- @dwarf_test
- def test_step_over_with_dwarf(self):
- """Test thread creation during step-over handling."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.create_during_step_over_test()
-
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
- @dwarf_test
- def test_step_in_with_dwarf(self):
- """Test thread creation during step-in handling."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.create_during_step_in_test()
+ self.build(dictionary=self.getBuildFlags())
+ self.create_during_step_base("thread step-in -m all-threads", 'stop reason = step in')
def setUp(self):
# Call super's setUp().
@@ -73,18 +46,6 @@
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
self.continuepoint = line_number('main.cpp', '// Continue from here')
- def create_during_step_inst_test(self):
- """Test thread creation while using step-inst."""
- self.create_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step')
-
- def create_during_step_over_test(self):
- """Test thread creation while using step-over."""
- self.create_during_step_base("thread step-over -m all-threads", 'stop reason = step over')
-
- def create_during_step_in_test(self):
- """Test thread creation while using step-in."""
- self.create_during_step_base("thread step-in -m all-threads", 'stop reason = step in')
-
def create_during_step_base(self, step_cmd, step_stop_reason):
"""Test thread creation while using step-in."""
exe = os.path.join(os.getcwd(), "a.out")
diff --git a/lldb/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py b/lldb/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
index 9d6974d..cecc5d91 100644
--- a/lldb/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
+++ b/lldb/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
@@ -12,32 +12,19 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @dsym_test
- def test_with_dsym(self):
- """Test thread exit during breakpoint handling."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.exit_during_breakpoint_test()
-
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
- @dwarf_test
- def test_with_dwarf(self):
- """Test thread exit during breakpoint handling."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.exit_during_breakpoint_test()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number for our breakpoint.
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
- def exit_during_breakpoint_test(self):
+ @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
+ @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
+ def test(self):
"""Test thread exit during breakpoint handling."""
+ self.build(dictionary=self.getBuildFlags())
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/thread/exit_during_step/TestExitDuringStep.py b/lldb/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
index 0908bbd..a69bb7f 100644
--- a/lldb/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
+++ b/lldb/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
@@ -12,68 +12,35 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @dsym_test
- def test_thread_state_is_stopped_with_dsym(self):
- """Test thread exit during step handling."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.thread_state_is_stopped()
-
@expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
@expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
@expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
@expectedFailureWindows("llvm.org/pr24681")
- @dwarf_test
- def test_thread_state_is_stopped_with_dwarf(self):
+ def test_thread_state_is_stopped(self):
"""Test thread exit during step handling."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.thread_state_is_stopped()
+ self.build(dictionary=self.getBuildFlags())
+ self.exit_during_step_base("thread step-in -m all-threads", 'stop reason = step in', True)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
+ @skipIfFreeBSD # llvm.org/pr21411: test is hanging
+ @expectedFailureWindows("llvm.org/pr24681")
+ def test(self):
"""Test thread exit during step handling."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.exit_during_step_inst_test()
+ self.build(dictionary=self.getBuildFlags())
+ self.exit_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step', False)
- @skipUnlessDarwin
- @dsym_test
- def test_step_over_with_dsym(self):
+ @skipIfFreeBSD # llvm.org/pr21411: test is hanging
+ @expectedFailureWindows("llvm.org/pr24681")
+ def test_step_over(self):
"""Test thread exit during step-over handling."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.exit_during_step_over_test()
+ self.build(dictionary=self.getBuildFlags())
+ self.exit_during_step_base("thread step-over -m all-threads", 'stop reason = step over', False)
- @skipUnlessDarwin
- @dsym_test
- def test_step_in_with_dsym(self):
+ @skipIfFreeBSD # llvm.org/pr21411: test is hanging
+ @expectedFailureWindows("llvm.org/pr24681")
+ def test_step_in(self):
"""Test thread exit during step-in handling."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.exit_during_step_in_test()
-
- @skipIfFreeBSD # llvm.org/pr21411: test is hanging
- @expectedFailureWindows("llvm.org/pr24681")
- @dwarf_test
- def test_with_dwarf(self):
- """Test thread exit during step handling."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.exit_during_step_inst_test()
-
- @skipIfFreeBSD # llvm.org/pr21411: test is hanging
- @expectedFailureWindows("llvm.org/pr24681")
- @dwarf_test
- def test_step_over_with_dwarf(self):
- """Test thread exit during step-over handling."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.exit_during_step_over_test()
-
- @skipIfFreeBSD # llvm.org/pr21411: test is hanging
- @expectedFailureWindows("llvm.org/pr24681")
- @dwarf_test
- def test_step_in_with_dwarf(self):
- """Test thread exit during step-in handling."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.exit_during_step_in_test()
+ self.build(dictionary=self.getBuildFlags())
+ self.exit_during_step_base("thread step-in -m all-threads", 'stop reason = step in', False)
def setUp(self):
# Call super's setUp().
@@ -82,22 +49,6 @@
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
self.continuepoint = line_number('main.cpp', '// Continue from here')
- def exit_during_step_inst_test(self):
- """Test thread exit while using step-inst."""
- self.exit_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step', False)
-
- def exit_during_step_over_test(self):
- """Test thread exit while using step-over."""
- self.exit_during_step_base("thread step-over -m all-threads", 'stop reason = step over', False)
-
- def exit_during_step_in_test(self):
- """Test thread exit while using step-in."""
- self.exit_during_step_base("thread step-in -m all-threads", 'stop reason = step in', False)
-
- def thread_state_is_stopped (self):
- """Go to first point where all threads are stopped, and test that the thread state is correctly set."""
- self.exit_during_step_base("thread step-in -m all-threads", 'stop reason = step in', True)
-
def exit_during_step_base(self, step_cmd, step_stop_reason, test_thread_state):
"""Test thread exit during step handling."""
exe = os.path.join(os.getcwd(), "a.out")
diff --git a/lldb/test/functionalities/thread/jump/TestThreadJump.py b/lldb/test/functionalities/thread/jump/TestThreadJump.py
index d1c279f..3919a24 100644
--- a/lldb/test/functionalities/thread/jump/TestThreadJump.py
+++ b/lldb/test/functionalities/thread/jump/TestThreadJump.py
@@ -12,29 +12,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
+ def test(self):
"""Test thread jump handling."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.thread_jump_test()
-
- @dwarf_test
- def test_with_dwarf(self):
- """Test thread jump handling."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.thread_jump_test()
-
- def do_min_test(self, start, jump, var, value):
- self.runCmd("j %i" % start) # jump to the start marker
- self.runCmd("thread step-in") # step into the min fn
- self.runCmd("j %i" % jump) # jump to the branch we're interested in
- self.runCmd("thread step-out") # return out
- self.runCmd("thread step-over") # assign to the global
- self.expect("expr %s" % var, substrs = [value]) # check it
-
- def thread_jump_test(self):
- """Test thread exit handling."""
+ self.build(dictionary=self.getBuildFlags())
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -67,6 +47,14 @@
# Try jumping to another function (without forcing)
self.expect("j main.cpp:%i" % self.mark1, COMMAND_FAILED_AS_EXPECTED, error = True,
substrs = ["error"])
+
+ def do_min_test(self, start, jump, var, value):
+ self.runCmd("j %i" % start) # jump to the start marker
+ self.runCmd("thread step-in") # step into the min fn
+ self.runCmd("j %i" % jump) # jump to the branch we're interested in
+ self.runCmd("thread step-out") # return out
+ self.runCmd("thread step-over") # assign to the global
+ self.expect("expr %s" % var, substrs = [value]) # check it
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py b/lldb/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
index bf0b2bb..cf6cda6 100644
--- a/lldb/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
+++ b/lldb/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
@@ -12,32 +12,19 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @dsym_test
- def test_with_dsym(self):
- """Test simultaneous breakpoints in multiple threads."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.multiple_breakpoint_test()
-
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
- @dwarf_test
- def test_with_dwarf(self):
- """Test simultaneous breakpoints in multiple threads."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.multiple_breakpoint_test()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number for our breakpoint.
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
- def multiple_breakpoint_test(self):
+ @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
+ @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
+ def test(self):
"""Test simultaneous breakpoints in multiple threads."""
+ self.build(dictionary=self.getBuildFlags())
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/thread/state/TestThreadStates.py b/lldb/test/functionalities/thread/state/TestThreadStates.py
index 41b2c34..e1f29a4 100644
--- a/lldb/test/functionalities/thread/state/TestThreadStates.py
+++ b/lldb/test/functionalities/thread/state/TestThreadStates.py
@@ -12,88 +12,43 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- @expectedFailureDarwin("rdar://15367566")
- def test_state_after_breakpoint_with_dsym(self):
- """Test thread state after breakpoint."""
- self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False))
- self.thread_state_after_breakpoint_test()
-
@expectedFailureDarwin("rdar://15367566")
@expectedFailureFreeBSD('llvm.org/pr15824')
@expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
@expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
- @dwarf_test
- def test_state_after_breakpoint_with_dwarf(self):
+ def test_state_after_breakpoint(self):
"""Test thread state after breakpoint."""
- self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
+ self.build(dictionary=self.getBuildFlags(use_cpp11=False))
self.thread_state_after_breakpoint_test()
- @skipUnlessDarwin
- @dsym_test
- def test_state_after_continue_with_dsym(self):
- """Test thread state after continue."""
- self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False))
- self.thread_state_after_continue_test()
-
- @dwarf_test
@skipIfDarwin # 'llvm.org/pr23669', cause Python crash randomly
@expectedFailureDarwin('llvm.org/pr23669')
@expectedFailureWindows("llvm.org/pr24660")
- def test_state_after_continue_with_dwarf(self):
+ def test_state_after_continue(self):
"""Test thread state after continue."""
- self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
- self.thread_state_after_continue_test()
-
- @skipUnlessDarwin
- @skipIfDarwin # 'llvm.org/pr23669', cause Python crash randomly
- @expectedFailureDarwin('llvm.org/pr23669')
- @dsym_test
- def test_state_after_expression_with_dsym(self):
- """Test thread state after expression."""
- self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False))
+ self.build(dictionary=self.getBuildFlags(use_cpp11=False))
self.thread_state_after_continue_test()
@skipIfDarwin # 'llvm.org/pr23669', cause Python crash randomly
@expectedFailureDarwin('llvm.org/pr23669')
@expectedFailureWindows("llvm.org/pr24660")
- @dwarf_test
- def test_state_after_expression_with_dwarf(self):
+ def test_state_after_expression(self):
"""Test thread state after expression."""
- self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
+ self.build(dictionary=self.getBuildFlags(use_cpp11=False))
self.thread_state_after_continue_test()
- @skipUnlessDarwin
- @dsym_test
- @unittest2.expectedFailure("llvm.org/pr16172") # thread states not properly maintained
- def test_process_interrupt_with_dsym(self):
- """Test process interrupt."""
- self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False))
- self.process_interrupt_test()
-
- @dwarf_test
@unittest2.expectedFailure("llvm.org/pr16712") # thread states not properly maintained
@expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
- def test_process_interrupt_with_dwarf(self):
+ def test_process_interrupt(self):
"""Test process interrupt."""
- self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
+ self.build(dictionary=self.getBuildFlags(use_cpp11=False))
self.process_interrupt_test()
- @skipUnlessDarwin
- @dsym_test
- @unittest2.expectedFailure("llvm.org/pr15824") # thread states not properly maintained
- def test_process_state_with_dsym(self):
- """Test thread states (comprehensive)."""
- self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False))
- self.thread_states_test()
-
- @dwarf_test
@unittest2.expectedFailure("llvm.org/pr15824") # thread states not properly maintained
@expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
- def test_process_state_with_dwarf(self):
+ def test_process_state(self):
"""Test thread states (comprehensive)."""
- self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
+ self.build(dictionary=self.getBuildFlags(use_cpp11=False))
self.thread_states_test()
def setUp(self):
diff --git a/lldb/test/functionalities/thread/step_out/TestThreadStepOut.py b/lldb/test/functionalities/thread/step_out/TestThreadStepOut.py
index 2f26fc89..96a62e3 100644
--- a/lldb/test/functionalities/thread/step_out/TestThreadStepOut.py
+++ b/lldb/test/functionalities/thread/step_out/TestThreadStepOut.py
@@ -12,52 +12,31 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_step_single_thread_with_dsym(self):
- """Test thread step out on one thread via command interpreter. """
- self.buildDsym(dictionary=self.getBuildFlags())
- self.step_out_test(self.step_out_single_thread_with_cmd)
-
@skipIfLinux # Test occasionally times out on the Linux build bot
@expectedFailureLinux("llvm.org/pr23477") # Test occasionally times out on the Linux build bot
@expectedFailureFreeBSD("llvm.org/pr18066") # inferior does not exit
@expectedFailureWindows # Test crashes
- @dwarf_test
- def test_step_single_thread_with_dwarf(self):
+ def test_step_single_thread(self):
"""Test thread step out on one thread via command interpreter. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.step_out_test(self.step_out_single_thread_with_cmd)
- @dsym_test
- def test_step_all_threads_with_dsym(self):
- """Test thread step out on all threads via command interpreter. """
- self.buildDsym(dictionary=self.getBuildFlags())
- self.step_out_test(self.step_out_all_threads_with_cmd)
-
@skipIfLinux # Test occasionally times out on the Linux build bot
@expectedFailureLinux("llvm.org/pr23477") # Test occasionally times out on the Linux build bot
@expectedFailureFreeBSD("llvm.org/pr19347") # 2nd thread stops at breakpoint
@expectedFailureWindows # Test crashes
- @dwarf_test
- def test_step_all_threads_with_dwarf(self):
+ def test_step_all_threads(self):
"""Test thread step out on all threads via command interpreter. """
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.step_out_test(self.step_out_all_threads_with_cmd)
- @dsym_test
- def test_python_with_dsym(self):
- """Test thread step out on one threads via Python API (dsym)."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.step_out_test(self.step_out_with_python)
-
@skipIfLinux # Test occasionally times out on the Linux build bot
@expectedFailureLinux("llvm.org/pr23477") # Test occasionally times out on the Linux build bot
@expectedFailureFreeBSD("llvm.org/pr19347")
@expectedFailureWindows("llvm.org/pr24681")
- @dwarf_test
- def test_python_with_dwarf(self):
+ def test_python(self):
"""Test thread step out on one thread via Python API (dwarf)."""
- self.buildDwarf(dictionary=self.getBuildFlags())
+ self.build(dictionary=self.getBuildFlags())
self.step_out_test(self.step_out_with_python)
def setUp(self):
diff --git a/lldb/test/functionalities/thread/thread_exit/TestThreadExit.py b/lldb/test/functionalities/thread/thread_exit/TestThreadExit.py
index 3155ef0..99f7ac6 100644
--- a/lldb/test/functionalities/thread/thread_exit/TestThreadExit.py
+++ b/lldb/test/functionalities/thread/thread_exit/TestThreadExit.py
@@ -12,21 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test thread exit handling."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.thread_exit_test()
-
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureWindows("llvm.org/pr24681")
- @dwarf_test
- def test_with_dwarf(self):
- """Test thread exit handling."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.thread_exit_test()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -36,8 +21,11 @@
self.break_3 = line_number('main.cpp', '// Set third breakpoint here')
self.break_4 = line_number('main.cpp', '// Set fourth breakpoint here')
- def thread_exit_test(self):
+ @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
+ @expectedFailureWindows("llvm.org/pr24681")
+ def test(self):
"""Test thread exit handling."""
+ self.build(dictionary=self.getBuildFlags())
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py b/lldb/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
index 99eebc6..1c22ae8 100644
--- a/lldb/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
+++ b/lldb/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
@@ -12,27 +12,14 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_python(self):
- """Test that we obey thread conditioned breakpoints."""
- self.buildDsym()
- self.do_thread_specific_break()
-
@skipIfFreeBSD # test frequently times out or hangs
@expectedFailureFreeBSD('llvm.org/pr18522') # hits break in another thread in testrun
@expectedFailureWindows("llvm.org/pr24777")
@python_api_test
- @dwarf_test
@expectedFlakeyLinux # this test fails 6/100 dosep runs
- def test_with_dwarf_python(self):
+ def test_python(self):
"""Test that we obey thread conditioned breakpoints."""
- self.buildDwarf()
- self.do_thread_specific_break()
-
- def do_thread_specific_break(self):
- """Test that we obey thread conditioned breakpoints."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.dbg.HandleCommand ("log enable -f /tmp/lldb-testsuite-log.txt lldb step breakpoint process")
diff --git a/lldb/test/functionalities/tty/TestTerminal.py b/lldb/test/functionalities/tty/TestTerminal.py
index 3905459..e346e1c 100644
--- a/lldb/test/functionalities/tty/TestTerminal.py
+++ b/lldb/test/functionalities/tty/TestTerminal.py
@@ -16,17 +16,13 @@
# a program in a separate terminal window. It would be great if other platforms
# added support for this.
@skipUnlessDarwin
-
-
# If the test is being run under sudo, the spawned terminal won't retain that elevated
# privilege so it can't open the socket to talk back to the test case
- @unittest2.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0,
- "test cannot be run as root")
-
+ @unittest2.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0, "test cannot be run as root")
# Do we need to disable this test if the testsuite is being run on a remote system?
# This env var is only defined when the shell is running in a local mac terminal window
@unittest2.skipUnless(os.environ.has_key('TERM_PROGRAM'), "test must be run on local system")
-
+ @no_debug_info_test
def test_launch_in_terminal (self):
exe = "/bin/ls"
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/functionalities/type_completion/TestTypeCompletion.py b/lldb/test/functionalities/type_completion/TestTypeCompletion.py
index db66ec8..0e11ff6 100644
--- a/lldb/test/functionalities/type_completion/TestTypeCompletion.py
+++ b/lldb/test/functionalities/type_completion/TestTypeCompletion.py
@@ -12,27 +12,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Check that types only get completed when necessary."""
- self.buildDsym()
- self.type_completion_commands()
-
- @dwarf_test
@expectedFailureIcc # often fails with 'NameAndAddress should be valid'
# Fails with gcc 4.8.1 with llvm.org/pr15301 LLDB prints incorrect sizes of STL containers
- def test_with_dwarf_and_run_command(self):
+ def test_with_run_command(self):
"""Check that types only get completed when necessary."""
- self.buildDwarf()
- self.type_completion_commands()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def type_completion_commands(self):
- """Check that types only get completed when necessary."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_source_regexp (self, "// Set break point at this line.")
diff --git a/lldb/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py b/lldb/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
index 88501c3..16b44857 100644
--- a/lldb/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
+++ b/lldb/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
@@ -11,24 +11,13 @@
class NoreturnUnwind(TestBase):
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym (self):
- """Test that we can backtrace correctly with 'noreturn' functions on the stack"""
- self.buildDsym()
- self.setTearDownCleanup()
- self.noreturn_unwind_tests()
-
- @dwarf_test
@expectedFailurei386 #xfail to get buildbot green, failing config: i386 binary running on ubuntu 14.04 x86_64
@skipIfWindows # clang-cl does not support gcc style attributes.
- def test_with_dwarf (self):
+ def test (self):
"""Test that we can backtrace correctly with 'noreturn' functions on the stack"""
- self.buildDwarf()
+ self.build()
self.setTearDownCleanup()
- self.noreturn_unwind_tests()
- def noreturn_unwind_tests (self):
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
diff --git a/lldb/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py b/lldb/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
index 541fe51..9aec735 100644
--- a/lldb/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
+++ b/lldb/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
@@ -14,22 +14,11 @@
# On different platforms the "_sigtramp" and "__kill" frames are likely to be different.
# This test could probably be adapted to run on linux/*bsd easily enough.
@skipUnlessDarwin
- @dsym_test
- def test_with_dsym (self):
+ def test (self):
"""Test that we can backtrace correctly with _sigtramp on the stack"""
- self.buildDsym()
+ self.build()
self.setTearDownCleanup()
- self.sigtramp_unwind_tests()
- @skipUnlessDarwin
- @dwarf_test
- def test_with_dwarf (self):
- """Test that we can backtrace correctly with _sigtramp on the stack"""
- self.buildDwarf()
- self.setTearDownCleanup()
- self.sigtramp_unwind_tests()
-
- def sigtramp_unwind_tests (self):
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
diff --git a/lldb/test/functionalities/value_md5_crash/TestValueMD5Crash.py b/lldb/test/functionalities/value_md5_crash/TestValueMD5Crash.py
index 67885aa..2f73587 100644
--- a/lldb/test/functionalities/value_md5_crash/TestValueMD5Crash.py
+++ b/lldb/test/functionalities/value_md5_crash/TestValueMD5Crash.py
@@ -12,28 +12,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Verify that the hash computing logic for ValueObject's values can't crash us."""
- self.buildDsym()
- self.doThings()
-
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr24663")
- def test_with_dwarf_and_run_command(self):
- """Verify that the hash computing logic for ValueObject's values can't crash us."""
- self.buildDwarf()
- self.doThings()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// break here')
- def doThings(self):
+ @expectedFailureWindows("llvm.org/pr24663")
+ def test_with_run_command(self):
"""Verify that the hash computing logic for ValueObject's values can't crash us."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py b/lldb/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
index 3c7067d..624dc56 100644
--- a/lldb/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
+++ b/lldb/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
@@ -13,23 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_hello_watchlocation_with_dsym(self):
- """Test watching a location with '-s size' option."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_watchlocation()
-
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_hello_watchlocation_with_dwarf(self):
- """Test watching a location with '-s size' option."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_watchlocation()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -43,8 +26,12 @@
self.exe_name = self.testMethodName
self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
- def hello_watchlocation(self):
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
+ def test_hello_watchlocation(self):
"""Test watching a location with '-s size' option."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py b/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
index 6dbd9e9..267f61c 100644
--- a/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
+++ b/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
@@ -15,22 +15,6 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_hello_watchpoint_with_dsym_using_watchpoint_set(self):
- """Test a simple sequence of watchpoint creation and watchpoint hit."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_watchpoint()
-
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureWindows("llvm.org/pr24446")
- def test_hello_watchpoint_with_dwarf_using_watchpoint_set(self):
- """Test a simple sequence of watchpoint creation and watchpoint hit."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_watchpoint()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -43,8 +27,13 @@
self.exe_name = 'a.out'
self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
- def hello_watchpoint(self):
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ @expectedFailureWindows("llvm.org/pr24446")
+ def test_hello_watchpoint_using_watchpoint_set(self):
"""Test a simple sequence of watchpoint creation and watchpoint hit."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
+
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py b/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
index 06821fc..e1bd0dd 100644
--- a/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
+++ b/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
@@ -13,37 +13,19 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_watchpoint_multiple_threads_with_dsym(self):
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
+ def test_watchpoint_multiple_threads(self):
"""Test that lldb watchpoint works for multiple threads."""
- self.buildDsym()
+ self.build()
self.setTearDownCleanup()
self.hello_multiple_threads()
- @dwarf_test
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_watchpoint_multiple_threads_with_dwarf(self):
- """Test that lldb watchpoint works for multiple threads."""
- self.buildDwarf()
- self.setTearDownCleanup()
- self.hello_multiple_threads()
-
- @skipUnlessDarwin
- @dsym_test
- def test_watchpoint_multiple_threads_wp_set_and_then_delete_with_dsym(self):
+ def test_watchpoint_multiple_threads_wp_set_and_then_delete(self):
"""Test that lldb watchpoint works for multiple threads, and after the watchpoint is deleted, the watchpoint event should no longer fires."""
- self.buildDsym()
- self.setTearDownCleanup()
- self.hello_multiple_threads_wp_set_and_then_delete()
-
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_watchpoint_multiple_threads_wp_set_and_then_delete_with_dwarf(self):
- """Test that lldb watchpoint works for multiple threads, and after the watchpoint is deleted, the watchpoint event should no longer fires."""
- self.buildDwarf()
+ self.build()
self.setTearDownCleanup()
self.hello_multiple_threads_wp_set_and_then_delete()
diff --git a/lldb/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py b/lldb/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
index fa546ba..d13c89c 100644
--- a/lldb/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
+++ b/lldb/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
@@ -13,44 +13,11 @@
def getCategories(self):
return ['basic_process']
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test stepping over watchpoints."""
- self.buildDsym()
- self.step_over_watchpoint()
-
- @dwarf_test
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446")
- def test_with_dwarf(self):
+ def test(self):
"""Test stepping over watchpoints."""
- self.buildDwarf()
- self.step_over_watchpoint()
-
- def setUp(self):
- TestBase.setUp(self)
-
- def step_inst_for_watchpoint(self, wp_id):
- watchpoint_hit = False
- current_line = self.frame().GetLineEntry().GetLine()
- while self.frame().GetLineEntry().GetLine() == current_line:
- self.thread().StepInstruction(False) # step_over=False
- stop_reason = self.thread().GetStopReason()
- if stop_reason == lldb.eStopReasonWatchpoint:
- self.assertFalse(watchpoint_hit, "Watchpoint already hit.")
- expected_stop_desc = "watchpoint %d" % wp_id
- actual_stop_desc = self.thread().GetStopDescription(20)
- self.assertTrue(actual_stop_desc == expected_stop_desc,
- "Watchpoint ID didn't match.")
- watchpoint_hit = True
- else:
- self.assertTrue(stop_reason == lldb.eStopReasonPlanComplete,
- STOPPED_DUE_TO_STEP_IN)
- self.assertTrue(watchpoint_hit, "Watchpoint never hit.")
-
- def step_over_watchpoint(self):
- """Test stepping over watchpoints."""
+ self.build()
exe = os.path.join(os.getcwd(), 'a.out')
target = self.dbg.CreateTarget(exe)
@@ -119,6 +86,24 @@
self.step_inst_for_watchpoint(2)
+ def step_inst_for_watchpoint(self, wp_id):
+ watchpoint_hit = False
+ current_line = self.frame().GetLineEntry().GetLine()
+ while self.frame().GetLineEntry().GetLine() == current_line:
+ self.thread().StepInstruction(False) # step_over=False
+ stop_reason = self.thread().GetStopReason()
+ if stop_reason == lldb.eStopReasonWatchpoint:
+ self.assertFalse(watchpoint_hit, "Watchpoint already hit.")
+ expected_stop_desc = "watchpoint %d" % wp_id
+ actual_stop_desc = self.thread().GetStopDescription(20)
+ self.assertTrue(actual_stop_desc == expected_stop_desc,
+ "Watchpoint ID didn't match.")
+ watchpoint_hit = True
+ else:
+ self.assertTrue(stop_reason == lldb.eStopReasonPlanComplete,
+ STOPPED_DUE_TO_STEP_IN)
+ self.assertTrue(watchpoint_hit, "Watchpoint never hit.")
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py b/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
index 5f9a7f1..2c4b3e1 100644
--- a/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
+++ b/lldb/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
@@ -20,22 +20,6 @@
# clearer API to express this.
#
- @dsym_test
- @unittest2.expectedFailure("rdar://problem/18685649")
- def test_watched_var_should_only_hit_when_in_scope_with_dsym(self):
- """Test that a variable watchpoint should only hit when in scope."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.watched_var()
-
- @unittest2.expectedFailure("rdar://problem/18685649")
- @dwarf_test
- def test_watched_var_should_only_hit_when_in_scope_with_dwarf(self):
- """Test that a variable watchpoint should only hit when in scope."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.watched_var()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -44,8 +28,12 @@
self.exe_name = self.testMethodName
self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
- def watched_var(self):
- """Test a simple sequence of watchpoint creation and watchpoint hit."""
+ @unittest2.expectedFailure("rdar://problem/18685649")
+ def test_watched_var_should_only_hit_when_in_scope(self):
+ """Test that a variable watchpoint should only hit when in scope."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
+
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
index 11583a5..cc05230 100644
--- a/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
+++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
@@ -26,93 +26,13 @@
self.exe_name = self.testMethodName
self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
- @skipUnlessDarwin
- @dsym_test
- def test_rw_watchpoint_with_dsym(self):
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
+ def test_rw_watchpoint(self):
"""Test read_write watchpoint and expect to stop two times."""
- self.buildDsym(dictionary=self.d)
+ self.build(dictionary=self.d)
self.setTearDownCleanup(dictionary=self.d)
- self.normal_read_write_watchpoint()
-
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_rw_watchpoint_with_dwarf(self):
- """Test read_write watchpoint and expect to stop two times."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.normal_read_write_watchpoint()
-
- @skipUnlessDarwin
- @dsym_test
- def test_rw_watchpoint_delete_with_dsym(self):
- """Test delete watchpoint and expect not to stop for watchpoint."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.delete_read_write_watchpoint()
-
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_rw_watchpoint_delete_with_dwarf(self):
- """Test delete watchpoint and expect not to stop for watchpoint."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.delete_read_write_watchpoint()
-
- @skipUnlessDarwin
- @dsym_test
- def test_rw_watchpoint_set_ignore_count_with_dsym(self):
- """Test watchpoint ignore count and expect to not to stop at all."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.ignore_read_write_watchpoint()
-
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_rw_watchpoint_set_ignore_count_with_dwarf(self):
- """Test watchpoint ignore count and expect to not to stop at all."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.ignore_read_write_watchpoint()
-
- @skipUnlessDarwin
- @dsym_test
- def test_rw_disable_after_first_stop_with_dsym(self):
- """Test read_write watchpoint but disable it after the first stop."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.read_write_watchpoint_disable_after_first_stop()
-
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_rw_disable_after_first_stop__with_dwarf(self):
- """Test read_write watchpoint but disable it after the first stop."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.read_write_watchpoint_disable_after_first_stop()
-
- @skipUnlessDarwin
- @dsym_test
- def test_rw_disable_then_enable_with_dsym(self):
- """Test read_write watchpoint, disable initially, then enable it."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.read_write_watchpoint_disable_then_enable()
-
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_rw_disable_then_enable_with_dwarf(self):
- """Test read_write watchpoint, disable initially, then enable it."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.read_write_watchpoint_disable_then_enable()
-
- def normal_read_write_watchpoint(self):
- """Do read_write watchpoint and expect to stop two times."""
+
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -166,8 +86,13 @@
self.expect("watchpoint list -v",
substrs = ['hit_count = 2'])
- def delete_read_write_watchpoint(self):
- """Do delete watchpoint immediately and expect not to stop for watchpoint."""
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
+ def test_rw_watchpoint_delete(self):
+ """Test delete watchpoint and expect not to stop for watchpoint."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
+
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -206,8 +131,13 @@
self.expect("process status",
substrs = ['exited'])
- def ignore_read_write_watchpoint(self):
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
+ def test_rw_watchpoint_set_ignore_count(self):
"""Test watchpoint ignore count and expect to not to stop at all."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
+
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -250,147 +180,13 @@
self.expect("watchpoint list -v",
substrs = ['hit_count = 2', 'ignore_count = 2'])
- def read_write_watchpoint_disable_after_first_stop(self):
- """Do read_write watchpoint but disable it after the first stop."""
- exe = os.path.join(os.getcwd(), self.exe_name)
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
- lldbutil.run_break_set_by_file_and_line (self, "main.m")
-
- # Run the program.
- self.runCmd("run", RUN_SUCCEEDED)
-
- # We should be stopped again due to the breakpoint.
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['stopped',
- 'stop reason = breakpoint'])
-
- # Now let's set a read_write-type watchpoint for 'global'.
- # There should be two watchpoint hits (see main.c).
- self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
- substrs = ['Watchpoint created', 'size = 4', 'type = rw',
- '%s:%d' % (self.source, self.decl)])
-
- # Use the '-v' option to do verbose listing of the watchpoint.
- # The hit count should be 0 initially.
- self.expect("watchpoint list -v",
- substrs = ['Number of supported hardware watchpoints:',
- 'hit_count = 0'])
-
- self.runCmd("process continue")
-
- # We should be stopped again due to the watchpoint (read_write type).
- # The stop reason of the thread should be watchpoint.
- self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
- substrs = ['stop reason = watchpoint'])
-
- self.runCmd("process continue")
-
- # We should be stopped again due to the watchpoint (read_write type).
- # The stop reason of the thread should be watchpoint.
- self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
- substrs = ['stop reason = watchpoint'])
-
- self.runCmd("process continue")
-
- # There should be no more watchpoint hit and the process status should
- # be 'exited'.
- self.expect("process status",
- substrs = ['exited'])
-
- # Use the '-v' option to do verbose listing of the watchpoint.
- # The hit count should now be 2.
- self.expect("watchpoint list -v",
- substrs = ['hit_count = 2'])
-
- def delete_read_write_watchpoint(self):
- """Do delete watchpoint immediately and expect not to stop for watchpoint."""
- exe = os.path.join(os.getcwd(), self.exe_name)
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
- lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
-
- # Run the program.
- self.runCmd("run", RUN_SUCCEEDED)
-
- # We should be stopped again due to the breakpoint.
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['stopped',
- 'stop reason = breakpoint'])
-
- # Now let's set a read_write-type watchpoint for 'global'.
- # There should be two watchpoint hits (see main.c).
- self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
- substrs = ['Watchpoint created', 'size = 4', 'type = rw',
- '%s:%d' % (self.source, self.decl)])
-
- # Delete the watchpoint immediately, but set auto-confirm to true first.
- self.runCmd("settings set auto-confirm true")
- self.expect("watchpoint delete",
- substrs = ['All watchpoints removed.'])
- # Restore the original setting of auto-confirm.
- self.runCmd("settings clear auto-confirm")
-
- # Use the '-v' option to do verbose listing of the watchpoint.
- self.runCmd("watchpoint list -v")
-
- self.runCmd("process continue")
-
- # There should be no more watchpoint hit and the process status should
- # be 'exited'.
- self.expect("process status",
- substrs = ['exited'])
-
- def ignore_read_write_watchpoint(self):
- """Test watchpoint ignore count and expect to not to stop at all."""
- exe = os.path.join(os.getcwd(), self.exe_name)
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
- lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
-
- # Run the program.
- self.runCmd("run", RUN_SUCCEEDED)
-
- # We should be stopped again due to the breakpoint.
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['stopped',
- 'stop reason = breakpoint'])
-
- # Now let's set a read_write-type watchpoint for 'global'.
- # There should be two watchpoint hits (see main.c).
- self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
- substrs = ['Watchpoint created', 'size = 4', 'type = rw',
- '%s:%d' % (self.source, self.decl)])
-
- # Set the ignore count of the watchpoint immediately.
- self.expect("watchpoint ignore -i 2",
- substrs = ['All watchpoints ignored.'])
-
- # Use the '-v' option to do verbose listing of the watchpoint.
- # Expect to find an ignore_count of 2.
- self.expect("watchpoint list -v",
- substrs = ['hit_count = 0', 'ignore_count = 2'])
-
- self.runCmd("process continue")
-
- # There should be no more watchpoint hit and the process status should
- # be 'exited'.
- self.expect("process status",
- substrs = ['exited'])
-
- # Use the '-v' option to do verbose listing of the watchpoint.
- # Expect to find a hit_count of 2 as well.
- self.expect("watchpoint list -v",
- substrs = ['hit_count = 2', 'ignore_count = 2'])
-
- def read_write_watchpoint_disable_after_first_stop(self):
- """Do read_write watchpoint but disable it after the first stop."""
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
+ def test_rw_disable_after_first_stop(self):
+ """Test read_write watchpoint but disable it after the first stop."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
+
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -443,8 +239,13 @@
self.expect("watchpoint list -v",
substrs = ['hit_count = 1'])
- def read_write_watchpoint_disable_then_enable(self):
- """Do read_write watchpoint, disable initially, then enable it."""
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
+ def test_rw_disable_then_enable(self):
+ """Test read_write watchpoint, disable initially, then enable it."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
+
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py
index cf1df78..2d269fd 100644
--- a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py
+++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py
@@ -25,42 +25,13 @@
self.exe_name = 'a%d.out' % self.test_number
self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
- @skipUnlessDarwin
- @dsym_test
- def test_watchpoint_command_with_dsym(self):
- """Test 'watchpoint command'."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.watchpoint_command()
-
- @dwarf_test
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_watchpoint_command_with_dwarf(self):
+ def test_watchpoint_command(self):
"""Test 'watchpoint command'."""
- self.buildDwarf(dictionary=self.d)
+ self.build(dictionary=self.d)
self.setTearDownCleanup(dictionary=self.d)
- self.watchpoint_command()
-
- @skipUnlessDarwin
- @dsym_test
- def test_watchpoint_command_can_disable_a_watchpoint_with_dsym(self):
- """Test that 'watchpoint command' action can disable a watchpoint after it is triggered."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.watchpoint_command_can_disable_a_watchpoint()
-
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_watchpoint_command_can_disable_a_watchpoint_with_dwarf(self):
- """Test that 'watchpoint command' action can disable a watchpoint after it is triggered."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.watchpoint_command_can_disable_a_watchpoint()
-
- def watchpoint_command(self):
- """Do 'watchpoint command add'."""
+
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -108,8 +79,13 @@
self.expect("frame variable --show-globals cookie",
substrs = ['(int32_t)', 'cookie = 777'])
- def watchpoint_command_can_disable_a_watchpoint(self):
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
+ def test_watchpoint_command_can_disable_a_watchpoint(self):
"""Test that 'watchpoint command' action can disable a watchpoint after it is triggered."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
+
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py
index 98da3b9..79566fb 100644
--- a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py
+++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py
@@ -25,26 +25,14 @@
self.exe_name = self.testMethodName
self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
- @skipUnlessDarwin
- @dsym_test
- def test_watchpoint_command_with_dsym(self):
- """Test 'watchpoint command'."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.watchpoint_command()
-
- @dwarf_test
@skipIfFreeBSD # timing out on buildbot
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- def test_watchpoint_command_with_dwarf(self):
+ def test_watchpoint_command(self):
"""Test 'watchpoint command'."""
- self.buildDwarf(dictionary=self.d)
+ self.build(dictionary=self.d)
self.setTearDownCleanup(dictionary=self.d)
- self.watchpoint_command()
- def watchpoint_command(self):
- """Do 'watchpoint command add'."""
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
index 929e66a..726b80f 100644
--- a/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
+++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
@@ -25,25 +25,13 @@
self.exe_name = self.testMethodName
self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
- @skipUnlessDarwin
- @dsym_test
- def test_watchpoint_cond_with_dsym(self):
- """Test watchpoint condition."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.watchpoint_condition()
-
- @dwarf_test
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_watchpoint_cond_with_dwarf(self):
+ def test_watchpoint_cond(self):
"""Test watchpoint condition."""
- self.buildDwarf(dictionary=self.d)
+ self.build(dictionary=self.d)
self.setTearDownCleanup(dictionary=self.d)
- self.watchpoint_condition()
- def watchpoint_condition(self):
- """Do watchpoint condition 'global==5'."""
exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py b/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py
index 92a3c1b..307be3a 100644
--- a/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py
+++ b/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py
@@ -10,46 +10,19 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test that adding, deleting and modifying watchpoints sends the appropriate events."""
- self.buildDsym()
- self.step_over_stepping()
-
- @python_api_test
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_with_dwarf_and_python_api(self):
- """Test that adding, deleting and modifying watchpoints sends the appropriate events."""
- self.buildDwarf()
- self.step_over_stepping()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line numbers that we will step to in main:
self.main_source = "main.c"
- def GetWatchpointEvent (self, event_type):
- # We added a watchpoint so we should get a watchpoint added event.
- event = lldb.SBEvent()
- success = self.listener.WaitForEvent (1, event)
- self.assertTrue(success == True, "Successfully got watchpoint event")
- self.assertTrue (lldb.SBWatchpoint.EventIsWatchpointEvent(event), "Event is a watchpoint event.")
- found_type = lldb.SBWatchpoint.GetWatchpointEventTypeFromEvent (event)
- self.assertTrue (found_type == event_type, "Event is not correct type, expected: %d, found: %d"%(event_type, found_type))
- # There shouldn't be another event waiting around:
- found_event = self.listener.PeekAtNextEventForBroadcasterWithType (self.target_bcast, lldb.SBTarget.eBroadcastBitBreakpointChanged, event)
- if found_event:
- print "Found an event I didn't expect: ", event
-
- self.assertTrue (not found_event, "Only one event per change.")
-
- def step_over_stepping(self):
- """Use Python APIs to test stepping over and hitting breakpoints."""
+ @python_api_test
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
+ def test_with_python_api(self):
+ """Test that adding, deleting and modifying watchpoints sends the appropriate events."""
+ self.build()
+
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -97,6 +70,21 @@
local_watch.SetCondition ("1 == 2")
self.GetWatchpointEvent (lldb.eWatchpointEventTypeConditionChanged)
+ def GetWatchpointEvent (self, event_type):
+ # We added a watchpoint so we should get a watchpoint added event.
+ event = lldb.SBEvent()
+ success = self.listener.WaitForEvent (1, event)
+ self.assertTrue(success == True, "Successfully got watchpoint event")
+ self.assertTrue (lldb.SBWatchpoint.EventIsWatchpointEvent(event), "Event is a watchpoint event.")
+ found_type = lldb.SBWatchpoint.GetWatchpointEventTypeFromEvent (event)
+ self.assertTrue (found_type == event_type, "Event is not correct type, expected: %d, found: %d"%(event_type, found_type))
+ # There shouldn't be another event waiting around:
+ found_event = self.listener.PeekAtNextEventForBroadcasterWithType (self.target_bcast, lldb.SBTarget.eBroadcastBitBreakpointChanged, event)
+ if found_event:
+ print "Found an event I didn't expect: ", event
+
+ self.assertTrue (not found_event, "Only one event per change.")
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
index 2d3d1be..eaa05e8 100644
--- a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
+++ b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
@@ -12,23 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_watchlocation_with_dsym_using_watchpoint_set(self):
- """Test watching a location with 'watchpoint set expression -w write -s size' option."""
- self.buildDsym()
- self.setTearDownCleanup()
- self.watchlocation_using_watchpoint_set()
-
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_watchlocation_with_dwarf_using_watchpoint_set(self):
- """Test watching a location with 'watchpoint set expression -w write -s size' option."""
- self.buildDwarf()
- self.setTearDownCleanup()
- self.watchlocation_using_watchpoint_set()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -40,8 +23,13 @@
self.violating_func = "do_bad_thing_with_location";
# Build dictionary to have unique executable names for each test method.
- def watchlocation_using_watchpoint_set(self):
- """Test watching a location with '-s size' option."""
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
+ def test_watchlocation_using_watchpoint_set(self):
+ """Test watching a location with 'watchpoint set expression -w write -s size' option."""
+ self.build()
+ self.setTearDownCleanup()
+
exe = os.path.join(os.getcwd(), 'a.out')
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py
index cf6be16..9683c88 100644
--- a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py
+++ b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py
@@ -12,12 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- def test_error_cases_with_watchpoint_set(self):
- """Test error cases with the 'watchpoint set' command."""
- self.buildDwarf()
- self.setTearDownCleanup()
- self.error_cases_with_watchpoint_set()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -27,8 +21,11 @@
self.line = line_number(self.source, '// Set break point at this line.')
# Build dictionary to have unique executable names for each test method.
- def error_cases_with_watchpoint_set(self):
+ def test_error_cases_with_watchpoint_set(self):
"""Test error cases with the 'watchpoint set' command."""
+ self.build()
+ self.setTearDownCleanup()
+
exe = os.path.join(os.getcwd(), 'a.out')
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/help/TestHelp.py b/lldb/test/help/TestHelp.py
index 00589e4..b30c143 100644
--- a/lldb/test/help/TestHelp.py
+++ b/lldb/test/help/TestHelp.py
@@ -13,6 +13,7 @@
mydir = TestBase.compute_mydir(__file__)
+ @no_debug_info_test
def test_simplehelp(self):
"""A simple test of 'help' command and its output."""
self.expect("help",
@@ -24,12 +25,14 @@
self.expect("help", matching=True,
substrs = ['next'])
+ @no_debug_info_test
def test_help_on_help(self):
"""Testing the help on the help facility."""
self.expect("help help", matching=True,
substrs = ['--hide-aliases',
'--hide-user-commands'])
+ @no_debug_info_test
def version_number_string(self):
"""Helper function to find the version number string of lldb."""
plist = os.path.join(os.environ["LLDB_SRC"], "resources", "LLDB-Info.plist")
@@ -64,12 +67,13 @@
# Use None to signify that we are not able to grok the version number.
return None
-
+ @no_debug_info_test
def test_help_arch(self):
"""Test 'help arch' which should list of supported architectures."""
self.expect("help arch",
substrs = ['arm', 'x86_64', 'i386'])
+ @no_debug_info_test
def test_help_version(self):
"""Test 'help version' and 'version' commands."""
self.expect("help version",
@@ -85,11 +89,13 @@
self.expect("version",
patterns = search_regexp)
+ @no_debug_info_test
def test_help_should_not_crash_lldb(self):
"""Command 'help disasm' should not crash lldb."""
self.runCmd("help disasm", check=False)
self.runCmd("help unsigned-integer")
+ @no_debug_info_test
def test_help_should_not_hang_emacsshell(self):
"""Command 'settings set term-width 0' should not hang the help command."""
self.expect("settings set term-width 0",
@@ -99,12 +105,14 @@
self.expect("help",
startstr = 'Debugger commands:')
+ @no_debug_info_test
def test_help_breakpoint_set(self):
"""Test that 'help breakpoint set' does not print out redundant lines of:
'breakpoint set [-s <shlib-name>] ...'."""
self.expect("help breakpoint set", matching=False,
substrs = ['breakpoint set [-s <shlib-name>]'])
+ @no_debug_info_test
def test_help_image_dump_symtab_should_not_crash(self):
"""Command 'help image dump symtab' should not crash lldb."""
# 'image' is an alias for 'target modules'.
@@ -112,6 +120,7 @@
substrs = ['dump symtab',
'sort-order'])
+ @no_debug_info_test
def test_help_image_du_sym_is_ambiguous(self):
"""Command 'help image du sym' is ambiguous and spits out the list of candidates."""
self.expect("help image du sym",
@@ -120,17 +129,20 @@
'symfile',
'symtab'])
+ @no_debug_info_test
def test_help_image_du_line_should_work(self):
"""Command 'help image du line' is not ambiguous and should work."""
# 'image' is an alias for 'target modules'.
self.expect("help image du line",
substrs = ['Dump the line table for one or more compilation units'])
+ @no_debug_info_test
def test_help_target_variable_syntax(self):
"""Command 'help target variable' should display <variable-name> ..."""
self.expect("help target variable",
substrs = ['<variable-name> [<variable-name> [...]]'])
+ @no_debug_info_test
def test_help_watchpoint_and_its_args(self):
"""Command 'help watchpoint', 'help watchpt-id', and 'help watchpt-id-list' should work."""
self.expect("help watchpoint",
@@ -140,6 +152,7 @@
self.expect("help watchpt-id-list",
substrs = ['<watchpt-id-list>'])
+ @no_debug_info_test
def test_help_watchpoint_set(self):
"""Test that 'help watchpoint set' prints out 'expression' and 'variable'
as the possible subcommands."""
diff --git a/lldb/test/lang/c/anonymous/TestAnonymous.py b/lldb/test/lang/c/anonymous/TestAnonymous.py
index 6637909..da0ef5b 100644
--- a/lldb/test/lang/c/anonymous/TestAnonymous.py
+++ b/lldb/test/lang/c/anonymous/TestAnonymous.py
@@ -10,105 +10,9 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_expr_nest_with_dsym(self):
- self.buildDsym()
- self.expr_nest()
-
- @dsym_test
- def test_expr_child_with_dsym(self):
- self.buildDsym()
- self.expr_child()
-
- @dsym_test
- def test_expr_grandchild_with_dsym(self):
- self.buildDsym()
- self.expr_grandchild()
-
- @dsym_test
- def test_expr_parent_with_dsym(self):
- self.buildDsym()
- self.expr_parent()
-
- @dsym_test
- def test_expr_null_with_dsym(self):
- self.buildDsym()
- self.expr_null()
-
- @dsym_test
- def test_child_by_name_with_dsym(self):
- self.buildDsym()
- self.child_by_name()
-
@skipIfIcc # llvm.org/pr15036: LLDB generates an incorrect AST layout for an anonymous struct when DWARF is generated by ICC
- @dwarf_test
- def test_expr_nest_with_dwarf(self):
- self.buildDwarf()
- self.expr_nest()
-
- @dwarf_test
- def test_expr_child_with_dwarf(self):
- self.buildDwarf()
- self.expr_child()
-
- @skipIfIcc # llvm.org/pr15036: This particular regression was introduced by r181498
- @dwarf_test
- def test_expr_grandchild_with_dwarf(self):
- self.buildDwarf()
- self.expr_grandchild()
-
- @dwarf_test
- def test_expr_parent_with_dwarf(self):
- self.buildDwarf()
- self.expr_parent()
-
- @expectedFailureWindows('llvm.org/pr21550')
- @dwarf_test
- def test_expr_null_with_dwarf(self):
- self.buildDwarf()
- self.expr_null()
-
- @dwarf_test
- def test_child_by_name_with_dwarf(self):
- self.buildDwarf()
- self.child_by_name()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line numbers to break in main.c.
- self.source = 'main.c'
- self.line0 = line_number(self.source, '// Set breakpoint 0 here.')
- self.line1 = line_number(self.source, '// Set breakpoint 1 here.')
- self.line2 = line_number(self.source, '// Set breakpoint 2 here.')
-
- def common_setup(self, line):
-
- # Set debugger into synchronous mode
- self.dbg.SetAsync(False)
-
- # Create a target
- exe = os.path.join(os.getcwd(), "a.out")
- target = self.dbg.CreateTarget(exe)
- self.assertTrue(target, VALID_TARGET)
-
- # Set breakpoints inside and outside methods that take pointers to the containing struct.
- lldbutil.run_break_set_by_file_and_line (self, self.source, line, num_expected_locations=1, loc_exact=True)
-
- # Now launch the process, and do not stop at entry point.
- process = target.LaunchSimple (None, None, self.get_process_working_directory())
- self.assertTrue(process, PROCESS_IS_VALID)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['stopped',
- 'stop reason = breakpoint'])
-
- # The breakpoint should have a hit count of 1.
- self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
- substrs = [' resolved, hit count = 1'])
-
- def expr_nest(self):
+ def test_expr_nest(self):
+ self.build()
self.common_setup(self.line0)
# These should display correctly.
@@ -118,7 +22,8 @@
self.expect("expression n->b", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["= 2"])
- def expr_child(self):
+ def test_expr_child(self):
+ self.build()
self.common_setup(self.line1)
# These should display correctly.
@@ -128,7 +33,9 @@
self.expect("expression c->grandchild.b", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["= 2"])
- def expr_grandchild(self):
+ @skipIfIcc # llvm.org/pr15036: This particular regression was introduced by r181498
+ def test_expr_grandchild(self):
+ self.build()
self.common_setup(self.line2)
# These should display correctly.
@@ -138,7 +45,8 @@
self.expect("expression g.child.b", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["= 2"])
- def expr_parent(self):
+ def test_expr_parent(self):
+ self.build()
if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
self.skipTest("llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
self.common_setup(self.line2)
@@ -150,7 +58,9 @@
self.expect("expression z.y", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["(type_y) $", "dummy = 2"])
- def expr_null(self):
+ @expectedFailureWindows('llvm.org/pr21550')
+ def test_expr_null(self):
+ self.build()
self.common_setup(self.line2)
# This should fail because pz is 0, but it succeeds on OS/X.
@@ -158,7 +68,8 @@
# Note that this can also trigger llvm.org/pr15036 when run interactively at the lldb command prompt.
self.expect("expression *(type_z *)pz", error = True)
- def child_by_name(self):
+ def test_child_by_name(self):
+ self.build()
# Set debugger into synchronous mode
self.dbg.SetAsync(False)
@@ -197,6 +108,41 @@
if not error.Success() or value != 0:
self.fail ("failed to get the correct value for element a in n")
+ def setUp(self):
+ # Call super's setUp().
+ TestBase.setUp(self)
+ # Find the line numbers to break in main.c.
+ self.source = 'main.c'
+ self.line0 = line_number(self.source, '// Set breakpoint 0 here.')
+ self.line1 = line_number(self.source, '// Set breakpoint 1 here.')
+ self.line2 = line_number(self.source, '// Set breakpoint 2 here.')
+
+ def common_setup(self, line):
+
+ # Set debugger into synchronous mode
+ self.dbg.SetAsync(False)
+
+ # Create a target
+ exe = os.path.join(os.getcwd(), "a.out")
+ target = self.dbg.CreateTarget(exe)
+ self.assertTrue(target, VALID_TARGET)
+
+ # Set breakpoints inside and outside methods that take pointers to the containing struct.
+ lldbutil.run_break_set_by_file_and_line (self, self.source, line, num_expected_locations=1, loc_exact=True)
+
+ # Now launch the process, and do not stop at entry point.
+ process = target.LaunchSimple (None, None, self.get_process_working_directory())
+ self.assertTrue(process, PROCESS_IS_VALID)
+
+ # The stop reason of the thread should be breakpoint.
+ self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+ substrs = ['stopped',
+ 'stop reason = breakpoint'])
+
+ # The breakpoint should have a hit count of 1.
+ self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
+ substrs = [' resolved, hit count = 1'])
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/lang/c/array_types/TestArrayTypes.py b/lldb/test/lang/c/array_types/TestArrayTypes.py
index 6a54555..e159efc 100644
--- a/lldb/test/lang/c/array_types/TestArrayTypes.py
+++ b/lldb/test/lang/c/array_types/TestArrayTypes.py
@@ -10,42 +10,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test 'frame variable var_name' on some variables with array types."""
- self.buildDsym()
- self.array_types()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Use Python APIs to inspect variables with array types."""
- self.buildDsym()
- self.array_types_python()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test 'frame variable var_name' on some variables with array types."""
- self.buildDwarf()
- self.array_types()
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Use Python APIs to inspect variables with array types."""
- self.buildDwarf()
- self.array_types_python()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.c', '// Set break point at this line.')
- def array_types(self):
+ def test_and_run_command(self):
"""Test 'frame variable var_name' on some variables with array types."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -92,8 +65,10 @@
self.expect("frame variable --show-types long_6", VARIABLES_DISPLAYED_CORRECTLY,
startstr = '(long [6])')
- def array_types_python(self):
+ @python_api_test
+ def test_and_python_api(self):
"""Use Python APIs to inspect variables with array types."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/c/bitfields/TestBitfields.py b/lldb/test/lang/c/bitfields/TestBitfields.py
index 1ae77fc..090b319 100644
--- a/lldb/test/lang/c/bitfields/TestBitfields.py
+++ b/lldb/test/lang/c/bitfields/TestBitfields.py
@@ -9,45 +9,17 @@
class BitfieldsTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test 'frame variable ...' on a variable with bitfields."""
- self.buildDsym()
- self.bitfields_variable()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Use Python APIs to inspect a bitfields variable."""
- self.buildDsym()
- self.bitfields_variable_python()
-
- @dwarf_test
- @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
- def test_with_dwarf_and_run_command(self):
- """Test 'frame variable ...' on a variable with bitfields."""
- self.buildDwarf()
- self.bitfields_variable()
-
- @python_api_test
- @dwarf_test
- @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
- def test_with_dwarf_and_python_api(self):
- """Use Python APIs to inspect a bitfields variable."""
- self.buildDwarf()
- self.bitfields_variable_python()
-
+
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.c', '// Set break point at this line.')
- def bitfields_variable(self):
+ @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
+ def test_and_run_command(self):
"""Test 'frame variable ...' on a variable with bitfields."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -120,8 +92,11 @@
self.expect("expr (more_bits.d)", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ['uint8_t', '\\0'])
- def bitfields_variable_python(self):
+ @python_api_test
+ @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
+ def test_and_python_api(self):
"""Use Python APIs to inspect a bitfields variable."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/c/blocks/TestBlocks.py b/lldb/test/lang/c/blocks/TestBlocks.py
index 1a247e9..6dd4bec 100644
--- a/lldb/test/lang/c/blocks/TestBlocks.py
+++ b/lldb/test/lang/c/blocks/TestBlocks.py
@@ -11,50 +11,25 @@
mydir = TestBase.compute_mydir(__file__)
lines = []
- @dsym_test
- @unittest2.expectedFailure("rdar://problem/10413887 - Call blocks in expressions")
- def test_expr_with_dsym(self):
- self.buildDsym()
- self.expr()
-
- @unittest2.expectedFailure("rdar://problem/10413887 - Call blocks in expressions")
- @dwarf_test
- def test_expr_with_dwarf(self):
- self.buildDwarf()
- self.expr()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line numbers to break at.
self.lines.append(line_number('main.c', '// Set breakpoint 0 here.'))
self.lines.append(line_number('main.c', '// Set breakpoint 1 here.'))
-
- def common_setup(self):
+
+ @unittest2.expectedFailure("rdar://problem/10413887 - Call blocks in expressions")
+ def test_expr(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
- self.is_started = False
+ self.is_started = False
# Break inside the foo function which takes a bar_ptr argument.
- for line in self.lines:
+ for line in self.lines:
lldbutil.run_break_set_by_file_and_line (self, "main.c", line, num_expected_locations=1, loc_exact=True)
- def wait_for_breakpoint(self):
- if self.is_started == False:
- self.is_started = True
- self.runCmd("process launch", RUN_SUCCEEDED)
- else:
- self.runCmd("process continue", RUN_SUCCEEDED)
-
- # The stop reason of the thread should be breakpoint.
- self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['stopped',
- 'stop reason = breakpoint'])
-
- def expr(self):
- self.common_setup()
-
self.wait_for_breakpoint()
self.expect("expression a + b", VARIABLES_DISPLAYED_CORRECTLY,
@@ -68,6 +43,18 @@
# This should display correctly.
self.expect("expression (int)neg (-12)", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["= 12"])
+
+ def wait_for_breakpoint(self):
+ if self.is_started == False:
+ self.is_started = True
+ self.runCmd("process launch", RUN_SUCCEEDED)
+ else:
+ self.runCmd("process continue", RUN_SUCCEEDED)
+
+ # The stop reason of the thread should be breakpoint.
+ self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+ substrs = ['stopped',
+ 'stop reason = breakpoint'])
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/lang/c/const_variables/TestConstVariables.py b/lldb/test/lang/c/const_variables/TestConstVariables.py
index ba2182b..8954e49 100644
--- a/lldb/test/lang/c/const_variables/TestConstVariables.py
+++ b/lldb/test/lang/c/const_variables/TestConstVariables.py
@@ -10,12 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test interpreted and JITted expressions on constant values."""
- self.buildDsym()
- self.const_variable()
-
@expectedFailureAll(
oslist=["freebsd", "linux"],
compiler="clang", compiler_version=["<", "3.5"])
@@ -28,18 +22,9 @@
@expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
@expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
@expectedFailureWindows("llvm.org/pr24490: We shouldn't be using platform-specific names like `getpid` in tests")
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
+ def test_and_run_command(self):
"""Test interpreted and JITted expressions on constant values."""
- self.buildDwarf()
- self.const_variable()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def const_variable(self):
- """Test interpreted and JITted expressions on constant values."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/c/enum_types/TestEnumTypes.py b/lldb/test/lang/c/enum_types/TestEnumTypes.py
index 7ca36e1..96d2907 100644
--- a/lldb/test/lang/c/enum_types/TestEnumTypes.py
+++ b/lldb/test/lang/c/enum_types/TestEnumTypes.py
@@ -10,29 +10,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test 'image lookup -t days' and check for correct display and enum value printing."""
- self.buildDsym()
- self.image_lookup_for_enum_type()
-
- # rdar://problem/8394746
- # 'image lookup -t days' returns nothing with dwarf debug format.
- @dwarf_test
- def test_with_dwarf(self):
- """Test 'image lookup -t days' and check for correct display and enum value printing."""
- self.buildDwarf()
- self.image_lookup_for_enum_type()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.c', '// Set break point at this line.')
- def image_lookup_for_enum_type(self):
- """Test 'image lookup -t days' and check for correct display."""
+ def test(self):
+ """Test 'image lookup -t days' and check for correct display and enum value printing."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -80,6 +66,7 @@
self.expect("frame variable day", 'check for valid enumeration value',
substrs = [enum_value])
lldbutil.continue_to_breakpoint (self.process(), bkpt)
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/lang/c/forward/TestForwardDeclaration.py b/lldb/test/lang/c/forward/TestForwardDeclaration.py
index 6fb0eb9..9eb8ae6 100644
--- a/lldb/test/lang/c/forward/TestForwardDeclaration.py
+++ b/lldb/test/lang/c/forward/TestForwardDeclaration.py
@@ -10,25 +10,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
+ def test_and_run_command(self):
"""Display *bar_ptr when stopped on a function with forward declaration of struct bar."""
- self.buildDsym()
- self.forward_declaration()
-
- # rdar://problem/8648070
- # 'expression *bar_ptr' seg faults
- # rdar://problem/8546815
- # './dotest.py -v -t forward' fails for test_with_dwarf_and_run_command
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Display *bar_ptr when stopped on a function with forward declaration of struct bar."""
- self.buildDwarf()
- self.forward_declaration()
-
- def forward_declaration(self):
- """Display *bar_ptr when stopped on a function with forward declaration of struct bar."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/c/function_types/TestFunctionTypes.py b/lldb/test/lang/c/function_types/TestFunctionTypes.py
index 3426ae2..f8ac8a6 100644
--- a/lldb/test/lang/c/function_types/TestFunctionTypes.py
+++ b/lldb/test/lang/c/function_types/TestFunctionTypes.py
@@ -10,39 +10,50 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test 'callback' has function ptr type, then break on the function."""
- self.buildDsym()
- self.function_types()
-
- @dwarf_test
- def test_with_dwarf(self):
- """Test 'callback' has function ptr type, then break on the function."""
- self.buildDwarf()
- self.function_types()
-
- @skipUnlessDarwin
- @dsym_test
- def test_pointers_with_dsym(self):
- """Test that a function pointer to 'printf' works and can be called."""
- self.buildDsym()
- self.function_pointers()
-
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr21765")
- def test_pointers_with_dwarf(self):
- """Test that a function pointer to 'printf' works and can be called."""
- self.buildDwarf()
- self.function_pointers()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.c', '// Set break point at this line.')
+ def test(self):
+ """Test 'callback' has function ptr type, then break on the function."""
+ self.build()
+ self.runToBreakpoint()
+
+ # Check that the 'callback' variable display properly.
+ self.expect("frame variable --show-types callback", VARIABLES_DISPLAYED_CORRECTLY,
+ startstr = '(int (*)(const char *)) callback =')
+
+ # And that we can break on the callback function.
+ lldbutil.run_break_set_by_symbol (self, "string_not_empty", num_expected_locations=1, sym_exact=True)
+ self.runCmd("continue")
+
+ # Check that we do indeed stop on the string_not_empty function.
+ self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
+ substrs = ['a.out`string_not_empty',
+ 'stop reason = breakpoint'])
+
+ @expectedFailureWindows("llvm.org/pr21765")
+ def test_pointers(self):
+ """Test that a function pointer to 'printf' works and can be called."""
+ self.build()
+ self.runToBreakpoint()
+
+ self.expect("expr string_not_empty",
+ substrs = ['(int (*)(const char *)) $0 = ', '(a.out`'])
+
+ if self.platformIsDarwin():
+ regexps = ['lib.*\.dylib`printf']
+ else:
+ regexps = ['printf']
+ self.expect("expr (int (*)(const char*, ...))printf",
+ substrs = ['(int (*)(const char *, ...)) $1 = '],
+ patterns = regexps)
+
+ self.expect("expr $1(\"Hello world\\n\")",
+ startstr = '(int) $2 = 12')
+
def runToBreakpoint(self):
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -60,43 +71,6 @@
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
-
- def function_types(self):
- """Test 'callback' has function ptr type, then break on the function."""
-
- self.runToBreakpoint()
-
- # Check that the 'callback' variable display properly.
- self.expect("frame variable --show-types callback", VARIABLES_DISPLAYED_CORRECTLY,
- startstr = '(int (*)(const char *)) callback =')
-
- # And that we can break on the callback function.
- lldbutil.run_break_set_by_symbol (self, "string_not_empty", num_expected_locations=1, sym_exact=True)
- self.runCmd("continue")
-
- # Check that we do indeed stop on the string_not_empty function.
- self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['a.out`string_not_empty',
- 'stop reason = breakpoint'])
-
- def function_pointers(self):
- """Test that a function pointer to 'printf' works and can be called."""
-
- self.runToBreakpoint()
-
- self.expect("expr string_not_empty",
- substrs = ['(int (*)(const char *)) $0 = ', '(a.out`'])
-
- if self.platformIsDarwin():
- regexps = ['lib.*\.dylib`printf']
- else:
- regexps = ['printf']
- self.expect("expr (int (*)(const char*, ...))printf",
- substrs = ['(int (*)(const char *, ...)) $1 = '],
- patterns = regexps)
-
- self.expect("expr $1(\"Hello world\\n\")",
- startstr = '(int) $2 = 12')
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/lang/c/global_variables/TestGlobalVariables.py b/lldb/test/lang/c/global_variables/TestGlobalVariables.py
index 6a4478c..2300509 100644
--- a/lldb/test/lang/c/global_variables/TestGlobalVariables.py
+++ b/lldb/test/lang/c/global_variables/TestGlobalVariables.py
@@ -10,20 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test 'frame variable --scope --no-args' which omits args and shows scopes."""
- self.buildDsym()
- self.global_variables()
-
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr24764")
- def test_with_dwarf(self):
- """Test 'frame variable --scope --no-args' which omits args and shows scopes."""
- self.buildDwarf()
- self.global_variables()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -32,8 +18,11 @@
self.line = line_number(self.source, '// Set break point at this line.')
self.shlib_names = ["a"]
- def global_variables(self):
+ @expectedFailureWindows("llvm.org/pr24764")
+ def test(self):
"""Test 'frame variable --scope --no-args' which omits args and shows scopes."""
+ self.build()
+
# Create a target by the debugger.
target = self.dbg.CreateTarget("a.out")
self.assertTrue(target, VALID_TARGET)
diff --git a/lldb/test/lang/c/modules/TestCModules.py b/lldb/test/lang/c/modules/TestCModules.py
index df47202..1ac8484 100644
--- a/lldb/test/lang/c/modules/TestCModules.py
+++ b/lldb/test/lang/c/modules/TestCModules.py
@@ -14,35 +14,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- @expectedFailureDarwin('http://llvm.org/pr24302')
- def test_expr_with_dsym(self):
- self.buildDsym()
- self.expr()
-
- @dwarf_test
@skipIfFreeBSD
@expectedFailureDarwin('http://llvm.org/pr24302')
@expectedFailureLinux('http://llvm.org/pr23456') # 'fopen' has unknown return type
@expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
- def test_expr_with_dwarf(self):
- self.buildDwarf()
- self.expr()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.line = line_number('main.c', '// Set breakpoint 0 here.')
-
- def applies(self):
+ def test_expr(self):
if platform.system() == "Darwin" and platform.release() < StrictVersion('12.0.0'):
- return False
+ self.skipTest()
- return True
-
- def common_setup(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -60,12 +40,6 @@
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
- def expr(self):
- if not self.applies():
- return
-
- self.common_setup()
-
self.expect("expr @import Darwin; 3", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["int", "3"])
@@ -80,6 +54,12 @@
self.expect("expr stdin", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["(FILE *)", "0x"])
+
+ def setUp(self):
+ # Call super's setUp().
+ TestBase.setUp(self)
+ # Find the line number to break inside main().
+ self.line = line_number('main.c', '// Set breakpoint 0 here.')
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/lang/c/register_variables/TestRegisterVariables.py b/lldb/test/lang/c/register_variables/TestRegisterVariables.py
index 3891fd9..9274524 100644
--- a/lldb/test/lang/c/register_variables/TestRegisterVariables.py
+++ b/lldb/test/lang/c/register_variables/TestRegisterVariables.py
@@ -10,28 +10,12 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- @expectedFailureAll(
- oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
- def test_with_dsym_and_run_command(self):
- """Test expressions on register values."""
- self.buildDsym()
- self.const_variable()
-
- @dwarf_test
+ @expectedFailureAll(oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'], debug_info="dsym")
@expectedFailureClang(None, ['<', '3.5'])
@expectedFailureGcc(None, ['is', '4.8.2'])
- def test_with_dwarf_and_run_command(self):
+ def test_and_run_command(self):
"""Test expressions on register values."""
- self.buildDwarf()
- self.const_variable()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def const_variable(self):
- """Test expressions on register values."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/c/set_values/TestSetValues.py b/lldb/test/lang/c/set_values/TestSetValues.py
index 1f103b2..4e64a41 100644
--- a/lldb/test/lang/c/set_values/TestSetValues.py
+++ b/lldb/test/lang/c/set_values/TestSetValues.py
@@ -10,20 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test settings and readings of program variables."""
- self.buildDsym()
- self.set_values()
-
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr21765")
- def test_with_dwarf(self):
- """Test settings and readings of program variables."""
- self.buildDwarf()
- self.set_values()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -34,8 +20,10 @@
self.line4 = line_number('main.c', '// Set break point #4.')
self.line5 = line_number('main.c', '// Set break point #5.')
- def set_values(self):
+ @expectedFailureWindows("llvm.org/pr21765")
+ def test(self):
"""Test settings and readings of program variables."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/c/shared_lib/TestSharedLib.py b/lldb/test/lang/c/shared_lib/TestSharedLib.py
index ddc8643..f2a84af 100644
--- a/lldb/test/lang/c/shared_lib/TestSharedLib.py
+++ b/lldb/test/lang/c/shared_lib/TestSharedLib.py
@@ -9,29 +9,27 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_expr_with_dsym(self):
+ def test_expr(self):
"""Test that types work when defined in a shared library and forward-declared in the main executable"""
- self.buildDsym()
- self.expr()
+ if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
+ self.skipTest("llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
- @dwarf_test
- def test_expr_with_dwarf(self):
- """Test that types work when defined in a shared library and forward-declared in the main executable"""
- self.buildDwarf()
- self.expr()
+ self.build()
+ self.common_setup()
- @dsym_test
- def test_frame_variable_with_dsym(self):
- """Test that types work when defined in a shared library and forward-declared in the main executable"""
- self.buildDsym()
- self.frame_var()
+ # This should display correctly.
+ self.expect("expression --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
+ substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
- @dwarf_test
- def test_frame_variable_with_dwarf(self):
+ @unittest2.expectedFailure("rdar://problem/10704639")
+ def test_frame_variable(self):
"""Test that types work when defined in a shared library and forward-declared in the main executable"""
- self.buildDwarf()
- self.frame_var()
+ self.build()
+ self.common_setup()
+
+ # This should display correctly.
+ self.expect("frame variable --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
+ substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
def setUp(self):
# Call super's setUp().
@@ -67,27 +65,6 @@
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
-
- def expr(self):
- """Test that types work when defined in a shared library and forward-declared in the main executable"""
-
- if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
- self.skipTest("llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
-
- self.common_setup()
-
- # This should display correctly.
- self.expect("expression --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
- substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
-
- @unittest2.expectedFailure("rdar://problem/10704639")
- def frame_var(self):
- """Test that types work when defined in a shared library and forward-declared in the main executable"""
- self.common_setup()
-
- # This should display correctly.
- self.expect("frame variable --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
- substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py b/lldb/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
index 2d921e8..c6cd427 100644
--- a/lldb/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
+++ b/lldb/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
@@ -9,31 +9,29 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_expr_with_dsym(self):
- """Test that types work when defined in a shared library and forward-declared in the main executable"""
- self.buildDsym()
- self.expr()
-
- @dwarf_test
@expectedFailureWindows # Test crashes
- def test_expr_with_dwarf(self):
+ def test_expr(self):
"""Test that types work when defined in a shared library and forward-declared in the main executable"""
- self.buildDwarf()
- self.expr()
+ if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
+ self.skipTest("llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
- @dsym_test
- def test_frame_variable_with_dsym(self):
- """Test that types work when defined in a shared library and forward-declared in the main executable"""
- self.buildDsym()
- self.frame_var()
+ self.build()
+ self.common_setup()
- @dwarf_test
+ # This should display correctly.
+ self.expect("expression --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
+ substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
+
@expectedFailureWindows # Test crashes
- def test_frame_variable_with_dwarf(self):
+ @unittest2.expectedFailure("rdar://problem/10381325")
+ def test_frame_variable(self):
"""Test that types work when defined in a shared library and forward-declared in the main executable"""
- self.buildDwarf()
- self.frame_var()
+ self.build()
+ self.common_setup()
+
+ # This should display correctly.
+ self.expect("frame variable --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
+ substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
def setUp(self):
# Call super's setUp().
@@ -69,28 +67,6 @@
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
-
- def expr(self):
- """Test that types work when defined in a shared library and forward-declared in the main executable"""
-
- if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
- self.skipTest("llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
-
- self.common_setup()
-
- # This should display correctly.
- self.expect("expression --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
- substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
-
- @unittest2.expectedFailure
- # rdar://problem/10381325
- def frame_var(self):
- """Test that types work when defined in a shared library and forward-declared in the main executable"""
- self.common_setup()
-
- # This should display correctly.
- self.expect("frame variable --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
- substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py b/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py
index 4915f0e..11d639a 100644
--- a/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py
+++ b/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py
@@ -13,32 +13,19 @@
def getCategories(self):
return ['basic_process']
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
- self.buildDsym()
- self.step_over_stepping()
-
- @expectedFailureFreeBSD('llvm.org/pr17932')
- @expectedFailureLinux # llvm.org/pr14437
- @expectedFailureWindows("llvm.org/pr24777")
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
- self.buildDwarf()
- self.step_over_stepping()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line numbers that we will step to in main:
self.main_source = "main.c"
- def step_over_stepping(self):
- """Use Python APIs to test stepping over and hitting breakpoints."""
+ @expectedFailureFreeBSD('llvm.org/pr17932')
+ @expectedFailureLinux # llvm.org/pr14437
+ @expectedFailureWindows("llvm.org/pr24777")
+ @python_api_test
+ def test_and_python_api(self):
+ """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/c/stepping/TestThreadStepping.py b/lldb/test/lang/c/stepping/TestThreadStepping.py
index 13c8ce8..50322b8 100644
--- a/lldb/test/lang/c/stepping/TestThreadStepping.py
+++ b/lldb/test/lang/c/stepping/TestThreadStepping.py
@@ -13,19 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_step_out_with_dsym_and_run_command(self):
- """Exercise thread step-out and frame select followed by thread step-out."""
- self.buildDwarf()
- self.thread_step_out()
-
- @dwarf_test
- def test_step_out_with_dwarf_and_run_command(self):
- """Exercise thread step-out and frame select followed by thread step-out."""
- self.buildDwarf()
- self.thread_step_out()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -35,8 +22,9 @@
self.line3 = line_number('main.c', '// thread step-out while stopped at "c(2)"')
self.line4 = line_number('main.c', '// frame select 1, thread step-out while stopped at "c(3)"')
- def thread_step_out(self):
+ def test_step_out_with_run_command(self):
"""Exercise thread step-out and frame select followed by thread step-out."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/c/strings/TestCStrings.py b/lldb/test/lang/c/strings/TestCStrings.py
index 794be62..a2752df 100644
--- a/lldb/test/lang/c/strings/TestCStrings.py
+++ b/lldb/test/lang/c/strings/TestCStrings.py
@@ -9,31 +9,14 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Tests that C strings work as expected in expressions"""
- self.buildDsym()
- self.static_method_commands()
-
- @dwarf_test
@expectedFailureWindows("llvm.org/pr21765")
- def test_with_dwarf_and_run_command(self):
+ def test_with_run_command(self):
"""Tests that C strings work as expected in expressions"""
- self.buildDwarf()
- self.static_method_commands()
-
- def setUp(self):
- TestBase.setUp(self)
-
- def set_breakpoint(self, line):
- lldbutil.run_break_set_by_file_and_line (self, "main.c", line, num_expected_locations=1, loc_exact=True)
-
- def static_method_commands(self):
- """Tests that C strings work as expected in expressions"""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
- self.set_breakpoint(line_number('main.c', '// breakpoint 1'))
+ line = line_number('main.c', '// breakpoint 1')
+ lldbutil.run_break_set_by_file_and_line (self, "main.c", line, num_expected_locations=1, loc_exact=True)
self.runCmd("process launch", RUN_SUCCEEDED)
diff --git a/lldb/test/lang/c/tls_globals/TestTlsGlobals.py b/lldb/test/lang/c/tls_globals/TestTlsGlobals.py
index fd90900..564f069 100644
--- a/lldb/test/lang/c/tls_globals/TestTlsGlobals.py
+++ b/lldb/test/lang/c/tls_globals/TestTlsGlobals.py
@@ -10,22 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- @unittest2.expectedFailure("rdar://7796742")
- def test_with_dsym(self):
- """Test thread-local storage."""
- self.buildDsym()
- self.tls_globals()
-
- @dwarf_test
- @unittest2.expectedFailure("rdar://7796742")
- @skipIfWindows # TLS works differently on Windows, this would need to be implemented separately.
- def test_with_dwarf(self):
- """Test thread-local storage."""
- self.buildDwarf()
- self.tls_globals()
-
def setUp(self):
TestBase.setUp(self)
@@ -37,9 +21,11 @@
self.runCmd("settings set target.env-vars " + self.dylibPath + "=" + os.getcwd())
self.addTearDownHook(lambda: self.runCmd("settings remove target.env-vars " + self.dylibPath))
- def tls_globals(self):
+ @unittest2.expectedFailure("rdar://7796742")
+ @skipIfWindows # TLS works differently on Windows, this would need to be implemented separately.
+ def test(self):
"""Test thread-local storage."""
-
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/cpp/bool/TestCPPBool.py b/lldb/test/lang/cpp/bool/TestCPPBool.py
index fc1c574..9138217 100644
--- a/lldb/test/lang/cpp/bool/TestCPPBool.py
+++ b/lldb/test/lang/cpp/bool/TestCPPBool.py
@@ -9,32 +9,13 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
+ def test_with_run_command(self):
"""Test that bool types work in the expression parser"""
- self.buildDsym()
- self.static_method_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test that bool types work in the expression parser"""
- self.buildDwarf()
- self.static_method_commands()
-
- def setUp(self):
- TestBase.setUp(self)
-
- def set_breakpoint(self, line):
- # Some compilers (for example GCC 4.4.7 and 4.6.1) emit multiple locations for the statement with the ternary
- # operator in the test program, while others emit only 1.
- lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
-
- def static_method_commands(self):
- """Test that bool types work in the expression parser"""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
- self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
+ line = line_number('main.cpp', '// breakpoint 1')
+ lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
self.runCmd("process launch", RUN_SUCCEEDED)
diff --git a/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py b/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
index e38bd46..851b343 100644
--- a/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
+++ b/lldb/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
@@ -11,25 +11,9 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
+ def test(self):
"""Test a sequence of breakpoint command add, list, and delete."""
- self.buildDsym()
- self.cpp_breakpoints()
-
- @dwarf_test
- def test_with_dwarf(self):
- """Test a sequence of breakpoint command add, list, and delete."""
- self.buildDwarf()
- self.cpp_breakpoints()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def cpp_breakpoints (self):
- """Test a sequence of breakpoint command add, list, and delete."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target from the debugger.
diff --git a/lldb/test/lang/cpp/call-function/TestCallCPPFunction.py b/lldb/test/lang/cpp/call-function/TestCallCPPFunction.py
index 2db9e69..6adbcd6 100644
--- a/lldb/test/lang/cpp/call-function/TestCallCPPFunction.py
+++ b/lldb/test/lang/cpp/call-function/TestCallCPPFunction.py
@@ -10,26 +10,14 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test calling a function by basename"""
- self.buildDsym()
- self.call_cpp_function()
-
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
- def test_with_dwarf_and_run_command(self):
- """Test calling a function by basename"""
- self.buildDwarf()
- self.call_cpp_function()
-
def setUp(self):
TestBase.setUp(self)
self.line = line_number('main.cpp', '// breakpoint')
- def call_cpp_function(self):
+ @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
+ def test_with_run_command(self):
"""Test calling a function by basename"""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/lang/cpp/chained-calls/TestCppChainedCalls.py b/lldb/test/lang/cpp/chained-calls/TestCppChainedCalls.py
index 5a85c41..a6cf56c 100644
--- a/lldb/test/lang/cpp/chained-calls/TestCppChainedCalls.py
+++ b/lldb/test/lang/cpp/chained-calls/TestCppChainedCalls.py
@@ -6,22 +6,10 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- self.buildDsym()
- self.check()
-
- @dwarf_test
@expectedFailureWindows("llvm.org/pr21765")
- def test_with_dwarf_and_run_command(self):
- self.buildDwarf()
- self.check()
+ def test_with_run_command(self):
+ self.build()
- def setUp(self):
- TestBase.setUp(self)
-
- def check(self):
# Get main source file
src_file = "main.cpp"
src_file_spec = lldb.SBFileSpec(src_file)
diff --git a/lldb/test/lang/cpp/char1632_t/TestChar1632T.py b/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
index e415d83..f604c34 100644
--- a/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
+++ b/lldb/test/lang/cpp/char1632_t/TestChar1632T.py
@@ -13,21 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test that the C++11 support for char16_t and char32_t works correctly."""
- self.buildDsym()
- self.char1632()
-
- @expectedFailureIcc # ICC (13.1) does not emit the DW_TAG_base_type for char16_t and char32_t.
- @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
- @dwarf_test
- def test_with_dwarf(self):
- """Test that the C++11 support for char16_t and char32_t works correctly."""
- self.buildDwarf()
- self.char1632()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -35,8 +20,12 @@
self.source = 'main.cpp'
self.lines = [ line_number(self.source, '// breakpoint1'),
line_number(self.source, '// breakpoint2') ]
- def char1632(self):
+
+ @expectedFailureIcc # ICC (13.1) does not emit the DW_TAG_base_type for char16_t and char32_t.
+ @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
+ def test(self):
"""Test that the C++11 support for char16_t and char32_t works correctly."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/lang/cpp/class_static/TestStaticVariables.py b/lldb/test/lang/cpp/class_static/TestStaticVariables.py
index 25bf9d8..88aeb72 100644
--- a/lldb/test/lang/cpp/class_static/TestStaticVariables.py
+++ b/lldb/test/lang/cpp/class_static/TestStaticVariables.py
@@ -11,42 +11,6 @@
class StaticVariableTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
- failing_compilers = ['clang', 'gcc']
-
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that file and class static variables display correctly."""
- self.buildDsym()
- self.static_variable_commands()
-
- @expectedFailureWindows("llvm.org/pr24764")
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test that file and class static variables display correctly."""
- self.buildDwarf()
- self.static_variable_commands()
-
- @skipUnlessDarwin
- @expectedFailureClang(9980907)
- @expectedFailureGcc(9980907)
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test Python APIs on file and class static variables."""
- self.buildDsym()
- self.static_variable_python()
-
- @expectedFailureDarwin(9980907)
- @expectedFailureClang('Clang emits incomplete debug info.')
- @expectedFailureFreeBSD('llvm.org/pr20550 failing on FreeBSD-11')
- @expectedFailureGcc('GCC emits incomplete debug info.')
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test Python APIs on file and class static variables."""
- self.buildDwarf()
- self.static_variable_python()
def setUp(self):
# Call super's setUp().
@@ -54,8 +18,10 @@
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def static_variable_commands(self):
- """Test that that file and class static variables display correctly."""
+ @expectedFailureWindows("llvm.org/pr24764")
+ def test_with_run_command(self):
+ """Test that file and class static variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
@@ -79,8 +45,14 @@
self.expect("target variable A::g_points[1].x", VARIABLES_DISPLAYED_CORRECTLY,
startstr = "(int) A::g_points[1].x = 11")
- def static_variable_python(self):
+ @expectedFailureDarwin(9980907)
+ @expectedFailureClang('Clang emits incomplete debug info.')
+ @expectedFailureFreeBSD('llvm.org/pr20550 failing on FreeBSD-11')
+ @expectedFailureGcc('GCC emits incomplete debug info.')
+ @python_api_test
+ def test_with_python_api(self):
"""Test Python APIs on file and class static variables."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/cpp/class_types/TestClassTypes.py b/lldb/test/lang/cpp/class_types/TestClassTypes.py
index c0b8a24..2e9353b 100644
--- a/lldb/test/lang/cpp/class_types/TestClassTypes.py
+++ b/lldb/test/lang/cpp/class_types/TestClassTypes.py
@@ -11,79 +11,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test 'frame variable this' when stopped on a class constructor."""
- self.buildDsym()
- self.class_types()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Use Python APIs to create a breakpoint by (filespec, line)."""
- self.buildDsym()
- self.breakpoint_creation_by_filespec_python()
-
- # rdar://problem/8378863
- # "frame variable this" returns
- # error: unable to find any variables named 'this'
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test 'frame variable this' when stopped on a class constructor."""
- self.buildDwarf()
- self.class_types()
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Use Python APIs to create a breakpoint by (filespec, line)."""
- self.buildDwarf()
- self.breakpoint_creation_by_filespec_python()
-
- @skipUnlessDarwin
- # rdar://problem/8557478
- # test/class_types test failures: runCmd: expr this->m_c_int
- @dsym_test
- def test_with_dsym_and_expr_parser(self):
- """Test 'frame variable this' and 'expr this' when stopped inside a constructor."""
- self.buildDsym()
- self.class_types_expr_parser()
-
- # rdar://problem/8557478
- # test/class_types test failures: runCmd: expr this->m_c_int
- @dwarf_test
- def test_with_dwarf_and_expr_parser(self):
- """Test 'frame variable this' and 'expr this' when stopped inside a constructor."""
- self.buildDwarf()
- self.class_types_expr_parser()
-
- @skipUnlessDarwin
- # rdar://problem/8557478
- # test/class_types test failures: runCmd: expr this->m_c_int
- @dsym_test
- def test_with_dsym_and_constructor_name(self):
- """Test 'frame variable this' and 'expr this' when stopped inside a constructor."""
- self.buildDsym()
- self.class_types_constructor_name()
-
- # rdar://problem/8557478
- # test/class_types test failures: runCmd: expr this->m_c_int
- @dwarf_test
- def test_with_dwarf_and_constructor_name (self):
- """Test 'frame variable this' and 'expr this' when stopped inside a constructor."""
- self.buildDwarf()
- self.class_types_constructor_name()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break for main.cpp.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def class_types(self):
+ def test_with_run_command(self):
"""Test 'frame variable this' when stopped on a class constructor."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -113,8 +49,10 @@
substrs = ['C *',
' this = '])
- def breakpoint_creation_by_filespec_python(self):
+ @python_api_test
+ def test_with_python_api(self):
"""Use Python APIs to create a breakpoint by (filespec, line)."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -171,8 +109,9 @@
process.Continue()
- def class_types_expr_parser(self):
+ def test_with_expr_parser(self):
"""Test 'frame variable this' and 'expr this' when stopped inside a constructor."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -222,9 +161,9 @@
self.expect("expression this->m_c_int", VARIABLES_DISPLAYED_CORRECTLY,
patterns = ['\(int\) \$[0-9]+ = 66'])
-
- def class_types_constructor_name (self):
- """Check whether the constructor name has the class name prepended."""
+ def test_with_constructor_name (self):
+ """Test 'frame variable this' and 'expr this' when stopped inside a constructor."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py b/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
index 2e401147..866b100 100644
--- a/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
+++ b/lldb/test/lang/cpp/class_types/TestClassTypesDisassembly.py
@@ -11,35 +11,56 @@
class IterateFrameAndDisassembleTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
- failing_compilers = ['clang', 'gcc']
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
+ def test_and_run_command(self):
"""Disassemble each call frame when stopped on C's constructor."""
- self.buildDsym()
- self.disassemble_call_stack()
+ self.build()
+ self.breakOnCtor()
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Disassemble each call frame when stopped on C's constructor."""
- self.buildDwarf()
- self.disassemble_call_stack()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Disassemble each call frame when stopped on C's constructor."""
- self.buildDsym()
- self.disassemble_call_stack_python()
+ raw_output = self.res.GetOutput()
+ frameRE = re.compile(r"""
+ ^\s\sframe # heading for the frame info,
+ .* # wildcard, and
+ 0x[0-9a-f]{16} # the frame pc, and
+ \sa.out`(.+) # module`function, and
+ \s\+\s # the rest ' + ....'
+ """, re.VERBOSE)
+ for line in raw_output.split(os.linesep):
+ match = frameRE.search(line)
+ if match:
+ function = match.group(1)
+ #print "line:", line
+ #print "function:", function
+ self.runCmd("disassemble -n '%s'" % function)
@python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
+ def test_and_python_api(self):
"""Disassemble each call frame when stopped on C's constructor."""
- self.buildDwarf()
- self.disassemble_call_stack_python()
+ self.build()
+ self.breakOnCtor()
+
+ # Now use the Python API to get at each function on the call stack and
+ # disassemble it.
+ target = self.dbg.GetSelectedTarget()
+ process = target.GetProcess()
+ thread = process.GetThreadAtIndex(0)
+ depth = thread.GetNumFrames()
+ for i in range(depth - 1):
+ frame = thread.GetFrameAtIndex(i)
+ function = frame.GetFunction()
+ # Print the function header.
+ if self.TraceOn():
+ print
+ print function
+ if function:
+ # Get all instructions for this function and print them out.
+ insts = function.GetInstructions(target)
+ for inst in insts:
+ # We could simply do 'print inst' to print out the disassembly.
+ # But we want to print to stdout only if self.TraceOn() is True.
+ disasm = str(inst)
+ if self.TraceOn():
+ print disasm
def setUp(self):
# Call super's setUp().
@@ -69,54 +90,6 @@
# self.expect("thread backtrace", BACKTRACE_DISPLAYED_CORRECTLY,
# substrs = ['C::C'])
- def disassemble_call_stack(self):
- """Disassemble each call frame when stopped on C's constructor."""
- self.breakOnCtor()
-
- raw_output = self.res.GetOutput()
- frameRE = re.compile(r"""
- ^\s\sframe # heading for the frame info,
- .* # wildcard, and
- 0x[0-9a-f]{16} # the frame pc, and
- \sa.out`(.+) # module`function, and
- \s\+\s # the rest ' + ....'
- """, re.VERBOSE)
- for line in raw_output.split(os.linesep):
- match = frameRE.search(line)
- if match:
- function = match.group(1)
- #print "line:", line
- #print "function:", function
- self.runCmd("disassemble -n '%s'" % function)
-
- def disassemble_call_stack_python(self):
- """Disassemble each call frame when stopped on C's constructor."""
- self.breakOnCtor()
-
- # Now use the Python API to get at each function on the call stack and
- # disassemble it.
- target = self.dbg.GetSelectedTarget()
- process = target.GetProcess()
- thread = process.GetThreadAtIndex(0)
- depth = thread.GetNumFrames()
- for i in range(depth - 1):
- frame = thread.GetFrameAtIndex(i)
- function = frame.GetFunction()
- # Print the function header.
- if self.TraceOn():
- print
- print function
- if function:
- # Get all instructions for this function and print them out.
- insts = function.GetInstructions(target)
- for inst in insts:
- # We could simply do 'print inst' to print out the disassembly.
- # But we want to print to stdout only if self.TraceOn() is True.
- disasm = str(inst)
- if self.TraceOn():
- print disasm
-
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/lang/cpp/diamond/TestDiamond.py b/lldb/test/lang/cpp/diamond/TestDiamond.py
index b1c838c..308fb13 100644
--- a/lldb/test/lang/cpp/diamond/TestDiamond.py
+++ b/lldb/test/lang/cpp/diamond/TestDiamond.py
@@ -9,31 +9,10 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that virtual base classes work in when SBValue objects are used to explore the variable value"""
- self.buildDsym()
- self.diamong_inheritace()
-
- @dwarf_test
@expectedFailureWindows("llvm.org/pr24764")
- def test_with_dwarf_and_run_command(self):
+ def test_with_run_command(self):
"""Test that virtual base classes work in when SBValue objects are used to explore the variable value"""
- self.buildDwarf()
- self.diamong_inheritace()
-
- def setUp(self):
- TestBase.setUp(self)
-
- def set_breakpoint(self, line):
- # Some compilers (for example GCC 4.4.7 and 4.6.1) emit multiple locations for the statement with the ternary
- # operator in the test program, while others emit only 1.
- lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
-
- def diamong_inheritace(self):
- """Test that virtual base classes work in when SBValue objects are used to explore the variable value"""
-
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -56,6 +35,11 @@
self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex(0).GetValueAsUnsigned(0) == 12345, "ensure Derived2 from j1 is correct");
thread.StepOver()
self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex(0).GetValueAsUnsigned(0) == 12346, "ensure Derived2 from j2 is correct");
+
+ def set_breakpoint(self, line):
+ # Some compilers (for example GCC 4.4.7 and 4.6.1) emit multiple locations for the statement with the ternary
+ # operator in the test program, while others emit only 1.
+ lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
index 23a9fc5..431f19f 100644
--- a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
+++ b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py
@@ -13,38 +13,17 @@
mydir = TestBase.compute_mydir(__file__)
@unittest2.expectedFailure("rdar://problem/10808472 SBValue::Cast test case is failing (virtual inheritance)")
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_value_cast_with_dsym_and_virtual_inheritance(self):
+ def test_value_cast_with_virtual_inheritance(self):
"""Test SBValue::Cast(SBType) API for C++ types with virtual inheritance."""
- self.buildDsym(dictionary=self.d_virtual)
+ self.build(dictionary=self.d_virtual)
self.setTearDownCleanup(dictionary=self.d_virtual)
self.do_sbvalue_cast(self.exe_name)
- @unittest2.expectedFailure("rdar://problem/10808472 SBValue::Cast test case is failing (virtual inheritance)")
@python_api_test
- @dwarf_test
- def test_value_cast_with_dwarf_and_virtual_inheritance(self):
- """Test SBValue::Cast(SBType) API for C++ types with virtual inheritance."""
- self.buildDwarf(dictionary=self.d_virtual)
- self.setTearDownCleanup(dictionary=self.d_virtual)
- self.do_sbvalue_cast(self.exe_name)
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_value_cast_with_dsym_and_regular_inheritance(self):
+ def test_value_cast_with_regular_inheritance(self):
"""Test SBValue::Cast(SBType) API for C++ types with regular inheritance."""
- self.buildDsym(dictionary=self.d_regular)
- self.setTearDownCleanup(dictionary=self.d_regular)
- self.do_sbvalue_cast(self.exe_name)
-
- @python_api_test
- @dwarf_test
- def test_value_cast_with_dwarf_and_regular_inheritance(self):
- """Test SBValue::Cast(SBType) API for C++ types with regular inheritance."""
- self.buildDwarf(dictionary=self.d_regular)
+ self.build(dictionary=self.d_regular)
self.setTearDownCleanup(dictionary=self.d_regular)
self.do_sbvalue_cast(self.exe_name)
diff --git a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
index 838c7df..f7f9e67 100644
--- a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
+++ b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py
@@ -12,23 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_get_dynamic_vals_with_dsym(self):
- """Test fetching C++ dynamic values from pointers & references."""
- self.buildDsym(dictionary=self.getBuildFlags())
- self.do_get_dynamic_vals()
-
- @expectedFailureFreeBSD # FIXME: This needs to be root-caused.
- @expectedFailureWindows("llvm.org/pr24663")
- @python_api_test
- @dwarf_test
- def test_get_dynamic_vals_with_dwarf(self):
- """Test fetching C++ dynamic values from pointers & references."""
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.do_get_dynamic_vals()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -41,66 +24,12 @@
self.main_second_call_line = line_number('pass-to-base.cpp',
'// Break here and get real address of reallyA.')
-
- def examine_value_object_of_this_ptr (self, this_static, this_dynamic, dynamic_location):
-
- # Get "this" as its static value
-
- self.assertTrue (this_static)
- this_static_loc = int (this_static.GetValue(), 16)
-
- # Get "this" as its dynamic value
-
- self.assertTrue (this_dynamic)
- this_dynamic_typename = this_dynamic.GetTypeName()
- self.assertTrue (this_dynamic_typename.find('B') != -1)
- this_dynamic_loc = int (this_dynamic.GetValue(), 16)
-
- # Make sure we got the right address for "this"
-
- self.assertTrue (this_dynamic_loc == dynamic_location)
-
- # And that the static address is greater than the dynamic one
-
- self.assertTrue (this_static_loc > this_dynamic_loc)
-
- # Now read m_b_value which is only in the dynamic value:
-
- use_dynamic = lldb.eDynamicCanRunTarget
- no_dynamic = lldb.eNoDynamicValues
-
- this_dynamic_m_b_value = this_dynamic.GetChildMemberWithName('m_b_value', use_dynamic)
- self.assertTrue (this_dynamic_m_b_value)
-
- m_b_value = int (this_dynamic_m_b_value.GetValue(), 0)
- self.assertTrue (m_b_value == 10)
-
- # Make sure it is not in the static version
-
- this_static_m_b_value = this_static.GetChildMemberWithName('m_b_value', no_dynamic)
- self.assertFalse (this_static_m_b_value)
-
- # Okay, now let's make sure that we can get the dynamic type of a child element:
-
- contained_auto_ptr = this_dynamic.GetChildMemberWithName ('m_client_A', use_dynamic)
- self.assertTrue (contained_auto_ptr)
- contained_b = contained_auto_ptr.GetChildMemberWithName ('_M_ptr', use_dynamic)
- if not contained_b:
- contained_b = contained_auto_ptr.GetChildMemberWithName ('__ptr_', use_dynamic)
- self.assertTrue (contained_b)
-
- contained_b_static = contained_auto_ptr.GetChildMemberWithName ('_M_ptr', no_dynamic)
- if not contained_b_static:
- contained_b_static = contained_auto_ptr.GetChildMemberWithName ('__ptr_', no_dynamic)
- self.assertTrue (contained_b_static)
-
- contained_b_addr = int (contained_b.GetValue(), 16)
- contained_b_static_addr = int (contained_b_static.GetValue(), 16)
-
- self.assertTrue (contained_b_addr < contained_b_static_addr)
-
- def do_get_dynamic_vals(self):
- """Get argument vals for the call stack when stopped on a breakpoint."""
+ @expectedFailureFreeBSD # FIXME: This needs to be root-caused.
+ @expectedFailureWindows("llvm.org/pr24663")
+ @python_api_test
+ def test_get_dynamic_vals(self):
+ """Test fetching C++ dynamic values from pointers & references."""
+ self.build(dictionary=self.getBuildFlags())
exe = os.path.join(os.getcwd(), "a.out")
# Create a target from the debugger.
@@ -234,6 +163,62 @@
self.assertTrue (anotherA_loc == reallyA_loc)
self.assertTrue (anotherA_value.GetTypeName().find ('B') == -1)
+ def examine_value_object_of_this_ptr (self, this_static, this_dynamic, dynamic_location):
+ # Get "this" as its static value
+ self.assertTrue (this_static)
+ this_static_loc = int (this_static.GetValue(), 16)
+
+ # Get "this" as its dynamic value
+
+ self.assertTrue (this_dynamic)
+ this_dynamic_typename = this_dynamic.GetTypeName()
+ self.assertTrue (this_dynamic_typename.find('B') != -1)
+ this_dynamic_loc = int (this_dynamic.GetValue(), 16)
+
+ # Make sure we got the right address for "this"
+
+ self.assertTrue (this_dynamic_loc == dynamic_location)
+
+ # And that the static address is greater than the dynamic one
+
+ self.assertTrue (this_static_loc > this_dynamic_loc)
+
+ # Now read m_b_value which is only in the dynamic value:
+
+ use_dynamic = lldb.eDynamicCanRunTarget
+ no_dynamic = lldb.eNoDynamicValues
+
+ this_dynamic_m_b_value = this_dynamic.GetChildMemberWithName('m_b_value', use_dynamic)
+ self.assertTrue (this_dynamic_m_b_value)
+
+ m_b_value = int (this_dynamic_m_b_value.GetValue(), 0)
+ self.assertTrue (m_b_value == 10)
+
+ # Make sure it is not in the static version
+
+ this_static_m_b_value = this_static.GetChildMemberWithName('m_b_value', no_dynamic)
+ self.assertFalse (this_static_m_b_value)
+
+ # Okay, now let's make sure that we can get the dynamic type of a child element:
+
+ contained_auto_ptr = this_dynamic.GetChildMemberWithName ('m_client_A', use_dynamic)
+ self.assertTrue (contained_auto_ptr)
+ contained_b = contained_auto_ptr.GetChildMemberWithName ('_M_ptr', use_dynamic)
+ if not contained_b:
+ contained_b = contained_auto_ptr.GetChildMemberWithName ('__ptr_', use_dynamic)
+ self.assertTrue (contained_b)
+
+ contained_b_static = contained_auto_ptr.GetChildMemberWithName ('_M_ptr', no_dynamic)
+ if not contained_b_static:
+ contained_b_static = contained_auto_ptr.GetChildMemberWithName ('__ptr_', no_dynamic)
+ self.assertTrue (contained_b_static)
+
+ contained_b_addr = int (contained_b.GetValue(), 16)
+ contained_b_static_addr = int (contained_b_static.GetValue(), 16)
+
+ self.assertTrue (contained_b_addr < contained_b_static_addr)
+
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py b/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
index 014a441..e8072ef 100644
--- a/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
+++ b/lldb/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
@@ -10,108 +10,44 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_int8_t(self):
+ def test_int8_t(self):
"""Test C++11 enumeration class types as int8_t types."""
- self.buildDsym(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int8_t"'})
+ self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int8_t"'})
self.image_lookup_for_enum_type()
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_int16_t(self):
+ def test_int16_t(self):
"""Test C++11 enumeration class types as int16_t types."""
- self.buildDsym(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int16_t"'})
+ self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int16_t"'})
self.image_lookup_for_enum_type()
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_int32_t(self):
+ def test_int32_t(self):
"""Test C++11 enumeration class types as int32_t types."""
- self.buildDsym(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int32_t"'})
+ self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int32_t"'})
self.image_lookup_for_enum_type()
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_int64_t(self):
+ def test_int64_t(self):
"""Test C++11 enumeration class types as int64_t types."""
- self.buildDsym(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int64_t"'})
+ self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int64_t"'})
self.image_lookup_for_enum_type()
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_uint8_t(self):
+ def test_uint8_t(self):
"""Test C++11 enumeration class types as uint8_t types."""
- self.buildDsym(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint8_t"'})
+ self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint8_t"'})
self.image_lookup_for_enum_type()
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_uint16_t(self):
+ def test_uint16_t(self):
"""Test C++11 enumeration class types as uint16_t types."""
- self.buildDsym(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint16_t"'})
+ self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint16_t"'})
self.image_lookup_for_enum_type()
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_uint32_t(self):
+ def test_uint32_t(self):
"""Test C++11 enumeration class types as uint32_t types."""
- self.buildDsym(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint32_t"'})
+ self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint32_t"'})
self.image_lookup_for_enum_type()
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_uint64_t(self):
+ def test_uint64_t(self):
"""Test C++11 enumeration class types as uint64_t types."""
- self.buildDsym(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint64_t"'})
- self.image_lookup_for_enum_type()
-
- @dwarf_test
- def test_with_dwarf_int8_t(self):
- """Test C++11 enumeration class types as int8_t types."""
- self.buildDwarf(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int8_t"'})
- self.image_lookup_for_enum_type()
-
- @dwarf_test
- def test_with_dwarf_int16_t(self):
- """Test C++11 enumeration class types as int16_t types."""
- self.buildDwarf(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int16_t"'})
- self.image_lookup_for_enum_type()
-
- @dwarf_test
- def test_with_dwarf_int32_t(self):
- """Test C++11 enumeration class types as int32_t types."""
- self.buildDwarf(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int32_t"'})
- self.image_lookup_for_enum_type()
-
- @dwarf_test
- def test_with_dwarf_int64_t(self):
- """Test C++11 enumeration class types as int64_t types."""
- self.buildDwarf(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int64_t"'})
- self.image_lookup_for_enum_type()
-
- @dwarf_test
- def test_with_dwarf_uint8_t(self):
- """Test C++11 enumeration class types as uint8_t types."""
- self.buildDwarf(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint8_t"'})
- self.image_lookup_for_enum_type()
-
- @dwarf_test
- def test_with_dwarf_uint16_t(self):
- """Test C++11 enumeration class types as uint16_t types."""
- self.buildDwarf(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint16_t"'})
- self.image_lookup_for_enum_type()
-
- @dwarf_test
- def test_with_dwarf_uint32_t(self):
- """Test C++11 enumeration class types as uint32_t types."""
- self.buildDwarf(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint32_t"'})
- self.image_lookup_for_enum_type()
-
- @dwarf_test
- def test_with_dwarf_uint64_t(self):
- """Test C++11 enumeration class types as uint64_t types."""
- self.buildDwarf(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint64_t"'})
+ self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint64_t"'})
self.image_lookup_for_enum_type()
def setUp(self):
diff --git a/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py b/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
index c7af660..cc6805e 100644
--- a/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
+++ b/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
@@ -12,28 +12,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test lldb exception breakpoint command for CPP."""
- self.buildDsym()
- self.cpp_exceptions()
-
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support throw or catch
- def test_with_dwarf(self):
- """Test lldb exception breakpoint command for CPP."""
- self.buildDwarf()
- self.cpp_exceptions()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
self.source = 'exceptions.cpp'
self.catch_line = line_number(self.source, '// This is the line you should stop at for catch')
- def cpp_exceptions (self):
+ @expectedFailureWindows("llvm.org/pr24538") # clang-cl does not support throw or catch
+ def test(self):
"""Test lldb exception breakpoint command for CPP."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target from the debugger.
@@ -73,8 +61,7 @@
self.assertTrue (frame_functions.count ("intervening_function(int)") == 0, "At catch our intervening function is off the stack")
self.assertTrue (frame_functions.count ("catches_exception(int)") == 1, "At catch our catch function is on the stack")
-
-
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/lang/cpp/global_operators/TestCppGlobalOperators.py b/lldb/test/lang/cpp/global_operators/TestCppGlobalOperators.py
index 9ea49d6..6299116 100644
--- a/lldb/test/lang/cpp/global_operators/TestCppGlobalOperators.py
+++ b/lldb/test/lang/cpp/global_operators/TestCppGlobalOperators.py
@@ -9,22 +9,10 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- self.buildDsym()
- self.check()
-
- @dwarf_test
@expectedFailureWindows("llvm.org/pr21765")
- def test_with_dwarf_and_run_command(self):
- self.buildDwarf()
- self.check()
+ def test_with_run_command(self):
+ self.build()
- def setUp(self):
- TestBase.setUp(self)
-
- def check(self):
# Get main source file
src_file = "main.cpp"
src_file_spec = lldb.SBFileSpec(src_file)
diff --git a/lldb/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py b/lldb/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
index 09070924..3ea22f0 100644
--- a/lldb/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
+++ b/lldb/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
@@ -6,10 +6,9 @@
mydir = TestBase.compute_mydir(__file__)
- @dwarf_test
@skipIfGcc
- def test_with_dwarf_limit_debug_info(self):
- self.buildDwarf()
+ def test_limit_debug_info(self):
+ self.build()
frame = self.get_test_frame('limit')
value_f = frame.EvaluateExpression("f")
@@ -20,10 +19,9 @@
self.assertTrue(value_a.IsValid(), "'expr a' results in a valid SBValue object")
self.assertFalse(value_a.GetError().Success(), "'expr a' results in an error, but LLDB does not crash")
- @dwarf_test
@skipIfGcc
- def test_with_dwarf_partial_limit_debug_info(self):
- self.buildDwarf()
+ def test_partial_limit_debug_info(self):
+ self.build()
frame = self.get_test_frame('nolimit')
value_f = frame.EvaluateExpression("f")
@@ -34,9 +32,6 @@
self.assertTrue(value_a.IsValid(), "'expr a' results in a valid SBValue object")
self.assertTrue(value_a.GetError().Success(), "'expr a' is successful")
- def setUp(self):
- TestBase.setUp(self)
-
def get_test_frame(self, exe):
# Get main source file
src_file = "main.cpp"
diff --git a/lldb/test/lang/cpp/namespace/TestNamespace.py b/lldb/test/lang/cpp/namespace/TestNamespace.py
index 5a71398..fd59881 100644
--- a/lldb/test/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/test/lang/cpp/namespace/TestNamespace.py
@@ -12,22 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- # rdar://problem/8668674
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that anonymous and named namespace variables display correctly."""
- self.buildDsym()
- self.namespace_variable_commands()
-
- # rdar://problem/8668674
- @expectedFailureWindows("llvm.org/pr24764")
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test that anonymous and named namespace variables display correctly."""
- self.buildDwarf()
- self.namespace_variable_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -40,8 +24,11 @@
self.line_break = line_number('main.cpp',
'// Set break point at this line.')
- def namespace_variable_commands(self):
+ # rdar://problem/8668674
+ @expectedFailureWindows("llvm.org/pr24764")
+ def test_with_run_command(self):
"""Test that anonymous and named namespace variables display correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line_break, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/lang/cpp/nsimport/TestCppNsImport.py b/lldb/test/lang/cpp/nsimport/TestCppNsImport.py
index 64a1b10..076356d 100644
--- a/lldb/test/lang/cpp/nsimport/TestCppNsImport.py
+++ b/lldb/test/lang/cpp/nsimport/TestCppNsImport.py
@@ -9,25 +9,10 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Tests imported namespaces in C++."""
- self.buildDsym()
- self.check()
-
- @dwarf_test
@expectedFailureGcc(None, ['>=', '4.9'])
- def test_with_dwarf_and_run_command(self):
+ def test_with_run_command(self):
"""Tests imported namespaces in C++."""
- self.buildDwarf()
- self.check()
-
- def setUp(self):
- TestBase.setUp(self)
-
- def check(self):
- """Tests imported namespaces in C++."""
+ self.build()
# Get main source file
src_file = "main.cpp"
diff --git a/lldb/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py b/lldb/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
index af5a016..38cec0f 100644
--- a/lldb/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
+++ b/lldb/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
@@ -10,26 +10,14 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that functions with the same name are resolved correctly"""
- self.buildDsym()
- self.static_method_commands()
-
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
- def test_with_dwarf_and_run_command(self):
- """Test that functions with the same name are resolved correctly"""
- self.buildDwarf()
- self.static_method_commands()
-
def setUp(self):
TestBase.setUp(self)
self.line = line_number('main.cpp', '// breakpoint')
-
- def static_method_commands(self):
- """Test that static methods are properly distinguished from regular methods"""
+
+ @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
+ def test_with_run_command(self):
+ """Test that functions with the same name are resolved correctly"""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py b/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
index dc80a9d..23bf8a1 100644
--- a/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
+++ b/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py
@@ -27,51 +27,24 @@
mydir = TestBase.compute_mydir(__file__)
@unittest2.expectedFailure("rdar://18684408")
- @skipUnlessDarwin
- @dsym_test
- def test_expr1_with_dsym(self):
+ @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
+ def test_expr1(self):
"""Test that the expression parser returns proper Unicode strings."""
- self.buildDsym()
+ self.build()
self.rdar12991846(expr=1)
@unittest2.expectedFailure("rdar://18684408")
@expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
- @dwarf_test
- def test_expr1_with_dwarf(self):
+ def test_expr2(self):
"""Test that the expression parser returns proper Unicode strings."""
- self.buildDwarf()
- self.rdar12991846(expr=1)
-
- @unittest2.expectedFailure("rdar://18684408")
- @skipUnlessDarwin
- @dsym_test
- def test_expr2_with_dsym(self):
- """Test that the expression parser returns proper Unicode strings."""
- self.buildDsym()
+ self.build()
self.rdar12991846(expr=2)
@unittest2.expectedFailure("rdar://18684408")
@expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
- @dwarf_test
- def test_expr2_with_dwarf(self):
+ def test_expr3(self):
"""Test that the expression parser returns proper Unicode strings."""
- self.buildDwarf()
- self.rdar12991846(expr=2)
-
- @unittest2.expectedFailure("rdar://18684408")
- @skipUnlessDarwin
- @dsym_test
- def test_expr3_with_dsym(self):
- """Test that the expression parser returns proper Unicode strings."""
- self.buildDsym()
- self.rdar12991846(expr=3)
-
- @unittest2.expectedFailure("rdar://18684408")
- @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
- @dwarf_test
- def test_expr3_with_dwarf(self):
- """Test that the expression parser returns proper Unicode strings."""
- self.buildDwarf()
+ self.build()
self.rdar12991846(expr=3)
def setUp(self):
diff --git a/lldb/test/lang/cpp/rvalue-references/TestRvalueReferences.py b/lldb/test/lang/cpp/rvalue-references/TestRvalueReferences.py
index 7fcb599..ea9d135 100644
--- a/lldb/test/lang/cpp/rvalue-references/TestRvalueReferences.py
+++ b/lldb/test/lang/cpp/rvalue-references/TestRvalueReferences.py
@@ -10,30 +10,12 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that rvalues are supported in the C++ expression parser"""
- self.buildDsym()
- self.static_method_commands()
-
#rdar://problem/11479676
@expectedFailureIcc("ICC (13.1, 14-beta) do not emit DW_TAG_rvalue_reference_type.")
@expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
+ def test_with_run_command(self):
"""Test that rvalues are supported in the C++ expression parser"""
- self.buildDwarf()
- self.static_method_commands()
-
- def setUp(self):
- TestBase.setUp(self)
-
- def set_breakpoint(self, line):
- lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=True)
-
- def static_method_commands(self):
- """Test that rvalues are supported in the C++ expression parser"""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
@@ -62,6 +44,9 @@
self.expect("expression -- int &&k = 6; k",
startstr = "(int) $1 = 6")
+
+ def set_breakpoint(self, line):
+ lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=True)
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/lang/cpp/scope/TestCppScope.py b/lldb/test/lang/cpp/scope/TestCppScope.py
index 104d53f..4d5ea8b 100644
--- a/lldb/test/lang/cpp/scope/TestCppScope.py
+++ b/lldb/test/lang/cpp/scope/TestCppScope.py
@@ -10,23 +10,10 @@
mydir = TestBase.compute_mydir(__file__)
@expectedFailureDarwin
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- self.buildDsym()
- self.check()
-
- @expectedFailureDarwin
@expectedFailureWindows("llvm.org/pr24764")
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- self.buildDwarf()
- self.check()
+ def test_with_run_command(self):
+ self.build()
- def setUp(self):
- TestBase.setUp(self)
-
- def check(self):
# Get main source file
src_file = "main.cpp"
src_file_spec = lldb.SBFileSpec(src_file)
diff --git a/lldb/test/lang/cpp/signed_types/TestSignedTypes.py b/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
index 36c2b6d..9c1f683 100644
--- a/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
+++ b/lldb/test/lang/cpp/signed_types/TestSignedTypes.py
@@ -13,19 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test that variables with signed types display correctly."""
- self.buildDsym()
- self.signed_types()
-
- @dwarf_test
- def test_with_dwarf(self):
- """Test that variables with signed types display correctly."""
- self.buildDwarf()
- self.signed_types()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -33,7 +20,10 @@
self.source = 'main.cpp'
self.line = line_number(self.source, '// Set break point at this line.')
- def signed_types(self):
+ def test(self):
+ """Test that variables with signed types display correctly."""
+ self.build()
+
# Run in synchronous mode
self.dbg.SetAsync(False)
diff --git a/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py b/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
index 412234a..de85a57 100644
--- a/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
+++ b/lldb/test/lang/cpp/static_members/TestCPPStaticMembers.py
@@ -9,30 +9,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @unittest2.expectedFailure # llvm.org/pr15401
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that member variables have the correct layout, scope and qualifiers when stopped inside and outside C++ methods"""
- self.buildDsym()
- self.static_member_commands()
-
@unittest2.expectedFailure # llvm.org/pr15401
@expectedFailureWindows("llvm.org/pr21765")
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
+ def test_with_run_command(self):
"""Test that member variables have the correct layout, scope and qualifiers when stopped inside and outside C++ methods"""
- self.buildDwarf()
- self.static_member_commands()
-
- def setUp(self):
- TestBase.setUp(self)
-
- def set_breakpoint(self, line):
- lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=False)
-
- def static_member_commands(self):
- """Test that member variables have the correct layout, scope and qualifiers when stopped inside and outside C++ methods"""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
@@ -67,7 +48,10 @@
startstr = "(long) $6 = 2")
self.runCmd("process continue")
-
+
+ def set_breakpoint(self, line):
+ lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=False)
+
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/lang/cpp/static_methods/TestCPPStaticMethods.py b/lldb/test/lang/cpp/static_methods/TestCPPStaticMethods.py
index d585272..c44af75 100644
--- a/lldb/test/lang/cpp/static_methods/TestCPPStaticMethods.py
+++ b/lldb/test/lang/cpp/static_methods/TestCPPStaticMethods.py
@@ -10,26 +10,14 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that static methods are properly distinguished from regular methods"""
- self.buildDsym()
- self.static_method_commands()
-
- @dwarf_test
- @expectedFailureWindows
- def test_with_dwarf_and_run_command(self):
- """Test that static methods are properly distinguished from regular methods"""
- self.buildDwarf()
- self.static_method_commands()
-
def setUp(self):
TestBase.setUp(self)
self.line = line_number('main.cpp', '// Break at this line')
-
- def static_method_commands(self):
+
+ @expectedFailureWindows
+ def test_with_run_command(self):
"""Test that static methods are properly distinguished from regular methods"""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/lang/cpp/stl/TestSTL.py b/lldb/test/lang/cpp/stl/TestSTL.py
index 4a1b2e0..b74009f 100644
--- a/lldb/test/lang/cpp/stl/TestSTL.py
+++ b/lldb/test/lang/cpp/stl/TestSTL.py
@@ -12,39 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- # rdar://problem/10400981
- @unittest2.expectedFailure
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test some expressions involving STL data types."""
- self.buildDsym()
- self.step_stl_exprs()
-
- # rdar://problem/10400981
- @unittest2.expectedFailure
- @dwarf_test
- def test_with_dwarf(self):
- """Test some expressions involving STL data types."""
- self.buildDwarf()
- self.step_stl_exprs()
-
- @python_api_test
- @dsym_test
- @skipUnlessDarwin
- def test_SBType_template_aspects_with_dsym(self):
- """Test APIs for getting template arguments from an SBType."""
- self.buildDsym()
- self.sbtype_template_apis()
-
- @expectedFailureIcc # icc 13.1 and 14-beta do not emit DW_TAG_template_type_parameter
- @python_api_test
- @dwarf_test
- def test_SBType_template_aspects_with_dwarf(self):
- """Test APIs for getting template arguments from an SBType."""
- self.buildDwarf()
- self.sbtype_template_apis()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -52,8 +19,11 @@
self.source = 'main.cpp'
self.line = line_number(self.source, '// Set break point at this line.')
- def step_stl_exprs(self):
+ # rdar://problem/10400981
+ @unittest2.expectedFailure
+ def test(self):
"""Test some expressions involving STL data types."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# The following two lines, if uncommented, will enable loggings.
@@ -93,8 +63,11 @@
self.expect('expr associative_array["hello"]',
substrs = [' = 2'])
- def sbtype_template_apis(self):
+ @expectedFailureIcc # icc 13.1 and 14-beta do not emit DW_TAG_template_type_parameter
+ @python_api_test
+ def test_SBType_template_aspects(self):
"""Test APIs for getting template arguments from an SBType."""
+ self.build()
exe = os.path.join(os.getcwd(), 'a.out')
# Create a target by the debugger.
diff --git a/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py b/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
index eca9182..abcc300 100644
--- a/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
+++ b/lldb/test/lang/cpp/stl/TestStdCXXDisassembly.py
@@ -23,7 +23,7 @@
@unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
def test_stdcxx_disasm(self):
"""Do 'disassemble' on each and every 'Code' symbol entry from the std c++ lib."""
- self.buildDefault()
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/cpp/this/TestCPPThis.py b/lldb/test/lang/cpp/this/TestCPPThis.py
index 901202c..e4b5d61 100644
--- a/lldb/test/lang/cpp/this/TestCPPThis.py
+++ b/lldb/test/lang/cpp/this/TestCPPThis.py
@@ -9,35 +9,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- #rdar://problem/9962849
- #@expectedFailureClang
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that the appropriate member variables are available when stopped in C++ static, inline, and const methods"""
- self.buildDsym()
- self.static_method_commands()
-
#rdar://problem/9962849
@expectedFailureGcc # llvm.org/pr15439 The 'this' pointer isn't available during expression evaluation when stopped in an inlined member function.
@expectedFailureIcc # ICC doesn't emit correct DWARF inline debug info for inlined member functions
@expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
@expectedFailureWindows("llvm.org/pr24490: We shouldn't be using platform-specific names like `getpid` in tests")
- @dwarf_test
@expectedFlakeyClang(bugnumber='llvm.org/pr23012', compiler_version=['>=','3.6']) # failed with totclang - clang3.7
- def test_with_dwarf_and_run_command(self):
+ def test_with_run_command(self):
"""Test that the appropriate member variables are available when stopped in C++ static, inline, and const methods"""
- self.buildDwarf()
- self.static_method_commands()
-
- def setUp(self):
- TestBase.setUp(self)
-
- def set_breakpoint(self, line):
- lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=False)
-
- def static_method_commands(self):
- """Test that the appropriate member variables are available when stopped in C++ static, inline, and const methods"""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
@@ -68,6 +48,9 @@
self.expect("expression -- m_a",
startstr = "(int) $4 = 2")
+
+ def set_breakpoint(self, line):
+ lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=False)
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py b/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
index 799e2fd..c251563 100644
--- a/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
+++ b/lldb/test/lang/cpp/unique-types/TestUniqueTypes.py
@@ -11,19 +11,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test for unique types of std::vector<long> and std::vector<short>."""
- self.buildDsym()
- self.unique_types()
-
- @dwarf_test
- def test_with_dwarf(self):
- """Test for unique types of std::vector<long> and std::vector<short>."""
- self.buildDwarf()
- self.unique_types()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -31,8 +18,9 @@
self.line = line_number("main.cpp",
"// Set breakpoint here to verify that std::vector 'longs' and 'shorts' have unique types.")
- def unique_types(self):
+ def test(self):
"""Test for unique types of std::vector<long> and std::vector<short>."""
+ self.build()
compiler = self.getCompiler()
compiler_basename = os.path.basename(compiler)
diff --git a/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py b/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
index 5959d86..d49d3b8 100644
--- a/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
+++ b/lldb/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
@@ -13,27 +13,15 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test that variables with unsigned types display correctly."""
- self.buildDsym()
- self.unsigned_types()
-
- @dwarf_test
- def test_with_dwarf(self):
- """Test that variables with unsigned types display correctly."""
- self.buildDwarf()
- self.unsigned_types()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.cpp', '// Set break point at this line.')
- def unsigned_types(self):
+ def test(self):
"""Test that variables with unsigned types display correctly."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/cpp/virtual/TestVirtual.py b/lldb/test/lang/cpp/virtual/TestVirtual.py
index 797afaf..0904cfc 100644
--- a/lldb/test/lang/cpp/virtual/TestVirtual.py
+++ b/lldb/test/lang/cpp/virtual/TestVirtual.py
@@ -22,19 +22,6 @@
# Assert message.
PRINTF_OUTPUT_GROKKED = "The printf output from compiled code is parsed correctly"
- @skipIfWindows # Process::GetSTDOUT unsupported on Windows. This test should be re-written to use stdout re-direction
- @skipUnlessDarwin
- def test_virtual_madness_dsym(self):
- """Test that expression works correctly with virtual inheritance as well as virtual function."""
- self.buildDsym()
- self.virtual_madness_test()
-
- @expectedFailureIcc('llvm.org/pr16808') # lldb does not call the correct virtual function with icc
- def test_virtual_madness_dwarf(self):
- """Test that expression works correctly with virtual inheritance as well as virtual function."""
- self.buildDwarf()
- self.virtual_madness_test()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -42,8 +29,10 @@
self.source = 'main.cpp'
self.line = line_number(self.source, '// Set first breakpoint here.')
- def virtual_madness_test(self):
- """Test that variable expressions with basic types are evaluated correctly."""
+ @expectedFailureIcc('llvm.org/pr16808') # lldb does not call the correct virtual function with icc
+ def test_virtual_madness(self):
+ """Test that expression works correctly with virtual inheritance as well as virtual function."""
+ self.build()
# Bring the program to the point where we can issue a series of
# 'expression' command to compare against the golden output.
diff --git a/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py b/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
index 21b2c83..232cda7 100644
--- a/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
+++ b/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py
@@ -13,20 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
- """Test that C++ supports wchar_t correctly."""
- self.buildDsym()
- self.wchar_t()
-
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr24764")
- def test_with_dwarf(self):
- """Test that C++ supports wchar_t correctly."""
- self.buildDwarf()
- self.wchar_t()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -34,8 +20,10 @@
self.source = 'main.cpp'
self.line = line_number(self.source, '// Set break point at this line.')
- def wchar_t(self):
+ @expectedFailureWindows("llvm.org/pr24764")
+ def test(self):
"""Test that C++ supports wchar_t correctly."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/lang/go/goroutines/TestGoroutines.py b/lldb/test/lang/go/goroutines/TestGoroutines.py
index 055570b..05f6aa8 100644
--- a/lldb/test/lang/go/goroutines/TestGoroutines.py
+++ b/lldb/test/lang/go/goroutines/TestGoroutines.py
@@ -13,6 +13,7 @@
@python_api_test
@skipIfFreeBSD # llvm.org/pr24895 triggers assertion failure
@skipIfRemote # Not remote test suite ready
+ @no_debug_info_test
@skipUnlessGoInstalled
def test_goroutine_plugin(self):
"""Test goroutine as threads support."""
diff --git a/lldb/test/lang/go/types/TestGoASTContext.py b/lldb/test/lang/go/types/TestGoASTContext.py
index 3265ee9..ccfca85 100644
--- a/lldb/test/lang/go/types/TestGoASTContext.py
+++ b/lldb/test/lang/go/types/TestGoASTContext.py
@@ -13,6 +13,7 @@
@python_api_test
@skipIfFreeBSD # llvm.org/pr24895 triggers assertion failure
@skipIfRemote # Not remote test suit ready
+ @no_debug_info_test
@skipUnlessGoInstalled
def test_with_dsym_and_python_api(self):
"""Test GoASTContext dwarf parsing."""
diff --git a/lldb/test/lang/mixed/TestMixedLanguages.py b/lldb/test/lang/mixed/TestMixedLanguages.py
index 2f89fb2..5d4e284 100644
--- a/lldb/test/lang/mixed/TestMixedLanguages.py
+++ b/lldb/test/lang/mixed/TestMixedLanguages.py
@@ -11,7 +11,7 @@
def test_language_of_frame(self):
"""Test that the language defaults to the language of the current frame."""
- self.buildDefault()
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py b/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
index 844f981..281c155 100644
--- a/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
+++ b/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
@@ -10,26 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- # This test requires the 2.0 runtime, so it will fail on i386.
- @expectedFailurei386
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test printing the ivars of the self when captured in blocks"""
- self.buildDsym()
- self.ivars_in_blocks()
-
- @skipUnlessDarwin
- @python_api_test
- # This test requires the 2.0 runtime, so it will fail on i386.
- @expectedFailurei386
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test printing the ivars of the self when captured in blocks"""
- self.buildDwarf()
- self.ivars_in_blocks()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -38,8 +18,12 @@
self.class_source = "ivars-in-blocks.m"
self.class_source_file_spec = lldb.SBFileSpec(self.class_source)
- def ivars_in_blocks (self):
+ @skipUnlessDarwin
+ @python_api_test
+ @expectedFailurei386 # This test requires the 2.0 runtime, so it will fail on i386.
+ def test_with_python_api(self):
"""Test printing the ivars of the self when captured in blocks"""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/objc/forward-decl/TestForwardDecl.py b/lldb/test/lang/objc/forward-decl/TestForwardDecl.py
index 89ee974..4b21e35 100644
--- a/lldb/test/lang/objc/forward-decl/TestForwardDecl.py
+++ b/lldb/test/lang/objc/forward-decl/TestForwardDecl.py
@@ -10,18 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_expr_with_dsym(self):
- self.buildDsym()
- self.expr()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_expr_with_dwarf(self):
- self.buildDwarf()
- self.expr()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -30,7 +18,10 @@
self.line = line_number(self.source, '// Set breakpoint 0 here.')
self.shlib_names = ["Container"]
- def common_setup(self):
+ @skipUnlessDarwin
+ def test_expr(self):
+ self.build()
+
# Create a target by the debugger.
target = self.dbg.CreateTarget("a.out")
self.assertTrue(target, VALID_TARGET)
@@ -55,9 +46,6 @@
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
- def expr(self):
- self.common_setup()
-
# This should display correctly.
self.expect("expression [j getMember]", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["= 0x"])
diff --git a/lldb/test/lang/objc/foundation/TestConstStrings.py b/lldb/test/lang/objc/foundation/TestConstStrings.py
index ca644ba..a3780e0 100644
--- a/lldb/test/lang/objc/foundation/TestConstStrings.py
+++ b/lldb/test/lang/objc/foundation/TestConstStrings.py
@@ -9,26 +9,11 @@
from lldbtest import *
import lldbutil
-@skipUnlessDarwin
class ConstStringTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
d = {'OBJC_SOURCES': 'const-strings.m'}
- @dsym_test
- def test_break_with_dsym(self):
- """Test constant string generation amd comparison by the expression parser."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(self.d)
- self.objc_const_strings()
-
- @dwarf_test
- def test_break_with_dwarf(self):
- """Test constant string generation amd comparison by the expression parser."""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(self.d)
- self.objc_const_strings()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -36,8 +21,12 @@
self.main_source = "const-strings.m"
self.line = line_number(self.main_source, '// Set breakpoint here.')
- def objc_const_strings(self):
+ @skipUnlessDarwin
+ def test_break(self):
"""Test constant string generation amd comparison by the expression parser."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(self.d)
+
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py b/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py
index 4fa78d8..3fb6792 100644
--- a/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py
+++ b/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py
@@ -18,7 +18,7 @@
@unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
def test_foundation_disasm(self):
"""Do 'disassemble -n func' on each and every 'Code' symbol entry from the Foundation.framework."""
- self.buildDefault()
+ self.build()
# Enable synchronous mode
self.dbg.SetAsync(False)
@@ -61,21 +61,10 @@
self.runCmd('disassemble -n "%s"' % func)
- @dsym_test
- def test_simple_disasm_with_dsym(self):
+ def test_simple_disasm(self):
"""Test the lldb 'disassemble' command"""
- self.buildDsym()
- self.do_simple_disasm()
+ self.build()
- @dwarf_test
- def test_simple_disasm_with_dwarf(self):
- """Test the lldb 'disassemble' command"""
- self.buildDwarf()
- self.do_simple_disasm()
-
- def do_simple_disasm(self):
- """Do a bunch of simple disassemble commands."""
-
# Create a target by the debugger.
target = self.dbg.CreateTarget("a.out")
self.assertTrue(target, VALID_TARGET)
diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods.py b/lldb/test/lang/objc/foundation/TestObjCMethods.py
index 44aefdc..5be2e3c 100644
--- a/lldb/test/lang/objc/foundation/TestObjCMethods.py
+++ b/lldb/test/lang/objc/foundation/TestObjCMethods.py
@@ -16,50 +16,16 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_break_with_dsym(self):
+ def setUp(self):
+ # Call super's setUp().
+ TestBase.setUp(self)
+ # Find the line number to break inside main().
+ self.main_source = "main.m"
+ self.line = line_number(self.main_source, '// Set break point at this line.')
+
+ def test_break(self):
"""Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
- self.buildDsym()
- self.break_on_objc_methods()
-
- @dwarf_test
- def test_break_with_dwarf(self):
- """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
- self.buildDwarf()
- self.break_on_objc_methods()
-
- #@unittest2.expectedFailure
- # rdar://problem/8542091
- # rdar://problem/8492646
- @dsym_test
- def test_data_type_and_expr_with_dsym(self):
- """Lookup objective-c data types and evaluate expressions."""
- self.buildDsym()
- self.data_type_and_expr_objc()
-
- #@unittest2.expectedFailure
- # rdar://problem/8542091
- # rdar://problem/8492646
- @dwarf_test
- def test_data_type_and_expr_with_dwarf(self):
- """Lookup objective-c data types and evaluate expressions."""
- self.buildDwarf()
- self.data_type_and_expr_objc()
-
- @python_api_test
- @dsym_test
- def test_print_ivars_correctly_with_dsym (self):
- self.buildDsym()
- self.print_ivars_correctly()
-
- @python_api_test
- @dwarf_test
- def test_print_ivars_correctly_with_dwarf (self):
- self.buildDwarf()
- self.print_ivars_correctly()
-
- def break_on_objc_methods(self):
- """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -113,64 +79,12 @@
self.expect("thread backtrace", "Stop at -[NSAutoreleasePool release]",
substrs = ["Foundation`-[NSAutoreleasePool release]"])
- @dsym_test
- def test_expression_lookups_objc_dsym(self):
- """Test running an expression detect spurious debug info lookups (dSYM)."""
- self.buildDsym()
- self.expression_lookups_objc()
-
- @dwarf_test
- def test_expression_lookups_objc_dwarf(self):
- """Test running an expression detect spurious debug info lookups (DWARF)."""
- self.buildDwarf()
- self.expression_lookups_objc()
-
- def expression_lookups_objc (self):
- """Test running an expression and make sure we don't search all dwarf files for any internal names (anything that contains '__lldb')."""
- exe = os.path.join(os.getcwd(), "a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Stop at -[MyString initWithNSString:].
- lldbutil.run_break_set_by_symbol (self, '-[MyString initWithNSString:]', num_expected_locations=1, sym_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- global file_index
- # Log any DWARF lookups
- ++file_index
- logfile = os.path.join(os.getcwd(), "dwarf-lookups-" + self.getArchitecture() + "-" + str(file_index) + ".txt")
- self.runCmd("log enable -f %s dwarf lookups" % (logfile))
- self.runCmd("expr self")
- self.runCmd("log disable dwarf lookups")
-
- def cleanup():
- if os.path.exists (logfile):
- os.unlink (logfile)
-
- self.addTearDownHook(cleanup)
-
- if os.path.exists (logfile):
- f = open(logfile)
- lines = f.readlines()
- num_errors = 0
- for line in lines:
- if string.find(line, "$__lldb") != -1:
- if num_errors == 0:
- print "error: found spurious name lookups when evaluating an expression:"
- num_errors += 1
- print line,
- self.assertTrue(num_errors == 0, "Spurious lookups detected")
- f.close()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break inside main().
- self.main_source = "main.m"
- self.line = line_number(self.main_source, '// Set break point at this line.')
-
- def data_type_and_expr_objc(self):
+ #@unittest2.expectedFailure
+ # rdar://problem/8542091
+ # rdar://problem/8492646
+ def test_data_type_and_expr(self):
"""Lookup objective-c data types and evaluate expressions."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -258,9 +172,11 @@
self.expect("expression --object-description -- my", "Object description displayed correctly",
patterns = ["Hello from.*a.out.*with timestamp: "])
- # See: <rdar://problem/8717050> lldb needs to use the ObjC runtime symbols for ivar offsets
- # Only fails for the ObjC 2.0 runtime.
- def print_ivars_correctly(self) :
+ @python_api_test
+ def test_print_ivars_correctly (self):
+ self.build()
+ # See: <rdar://problem/8717050> lldb needs to use the ObjC runtime symbols for ivar offsets
+ # Only fails for the ObjC 2.0 runtime.
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -304,7 +220,45 @@
my_str_value = int(my_str_var.GetValue(), 0)
self.assertTrue(str_value == my_str_value, "Got the correct value for my->str")
+
+ def test_expression_lookups_objc(self):
+ """Test running an expression detect spurious debug info lookups (DWARF)."""
+ self.build()
+ exe = os.path.join(os.getcwd(), "a.out")
+ self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+ # Stop at -[MyString initWithNSString:].
+ lldbutil.run_break_set_by_symbol (self, '-[MyString initWithNSString:]', num_expected_locations=1, sym_exact=True)
+
+ self.runCmd("run", RUN_SUCCEEDED)
+
+ global file_index
+ # Log any DWARF lookups
+ ++file_index
+ logfile = os.path.join(os.getcwd(), "dwarf-lookups-" + self.getArchitecture() + "-" + str(file_index) + ".txt")
+ self.runCmd("log enable -f %s dwarf lookups" % (logfile))
+ self.runCmd("expr self")
+ self.runCmd("log disable dwarf lookups")
+ def cleanup():
+ if os.path.exists (logfile):
+ os.unlink (logfile)
+
+ self.addTearDownHook(cleanup)
+
+ if os.path.exists (logfile):
+ f = open(logfile)
+ lines = f.readlines()
+ num_errors = 0
+ for line in lines:
+ if string.find(line, "$__lldb") != -1:
+ if num_errors == 0:
+ print "error: found spurious name lookups when evaluating an expression:"
+ num_errors += 1
+ print line,
+ self.assertTrue(num_errors == 0, "Spurious lookups detected")
+ f.close()
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods2.py b/lldb/test/lang/objc/foundation/TestObjCMethods2.py
index 88fcfc1..59eb995 100644
--- a/lldb/test/lang/objc/foundation/TestObjCMethods2.py
+++ b/lldb/test/lang/objc/foundation/TestObjCMethods2.py
@@ -12,81 +12,7 @@
class FoundationTestCase2(TestBase):
mydir = TestBase.compute_mydir(__file__)
-
- @dsym_test
- def test_more_expr_commands_with_dsym(self):
- """More expression commands for objective-c."""
- self.buildDsym()
- self.more_expr_objc()
-
- @dwarf_test
- def test_more_expr_commands_with_dwarf(self):
- """More expression commands for objective-c."""
- self.buildDwarf()
- self.more_expr_objc()
-
- @dsym_test
- def test_NSArray_expr_commands_with_dsym(self):
- """Test expression commands for NSArray."""
- self.buildDsym()
- self.NSArray_expr()
-
- @dwarf_test
- def test_NSArray_expr_commands_with_dwarf(self):
- """Test expression commands for NSArray."""
- self.buildDwarf()
- self.NSArray_expr()
-
- @dsym_test
- def test_NSString_expr_commands_with_dsym(self):
- """Test expression commands for NSString."""
- self.buildDsym()
- self.NSString_expr()
-
- @dwarf_test
- def test_NSString_expr_commands_with_dwarf(self):
- """Test expression commands for NSString."""
- self.buildDwarf()
- self.NSString_expr()
-
- @dsym_test
- def test_MyString_dump_with_dsym(self):
- """Test dump of a known Objective-C object by dereferencing it."""
- self.buildDsym()
- self.MyString_dump()
-
- @dwarf_test
- def test_MyString_dump_with_dwarf(self):
- """Test dump of a known Objective-C object by dereferencing it."""
- self.buildDwarf()
- self.MyString_dump()
-
- @expectedFailurei386
- @dsym_test
- def test_NSError_po_with_dsym(self):
- """Test that po of the result of an unknown method doesn't require a cast."""
- self.buildDsym()
- self.NSError_po()
-
- @expectedFailurei386
- @dwarf_test
- def test_NSError_po_with_dwarf(self):
- """Test that po of the result of an unknown method doesn't require a cast."""
- self.buildDsym()
- self.NSError_po()
-
- @dsym_test
- def test_NSError_p_with_dsym(self):
- """Test that p of the result of an unknown method does require a cast."""
- self.buildDsym()
- self.NSError_p()
-
- @dwarf_test
- def test_NSError_p_with_dwarf(self):
- """Test that p of the result of an unknown method does require a cast."""
- self.buildDsym()
- self.NSError_p()
-
+
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -97,9 +23,10 @@
self.lines.append(line_number('main.m', '// Break here for NSString tests'))
self.lines.append(line_number('main.m', '// Break here for description test'))
self.lines.append(line_number('main.m', '// Set break point at this line'))
-
- def more_expr_objc(self):
+
+ def test_more_expr_commands(self):
"""More expression commands for objective-c."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -133,8 +60,9 @@
self.runCmd("process continue")
- def NSArray_expr(self):
+ def test_NSArray_expr_commands(self):
"""Test expression commands for NSArray."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -158,8 +86,9 @@
patterns = ["\(int\) \$.* = 3"])
self.runCmd("process continue")
- def NSString_expr(self):
+ def test_NSString_expr_commands(self):
"""Test expression commands for NSString."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -186,8 +115,9 @@
self.expect('expression str = [NSString stringWithCString: "new"]')
self.runCmd("process continue")
- def MyString_dump(self):
+ def test_MyString_dump(self):
"""Test dump of a known Objective-C object by dereferencing it."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -201,8 +131,10 @@
patterns = ["\(MyString\) \$.* = ", "\(MyBase\)", "\(NSObject\)", "\(Class\)"])
self.runCmd("process continue")
- def NSError_po(self):
+ @expectedFailurei386
+ def test_NSError_po(self):
"""Test that po of the result of an unknown method doesn't require a cast."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -215,9 +147,10 @@
self.expect('po [NSError errorWithDomain:@"Hello" code:35 userInfo:@{@"NSDescription" : @"be completed."}]',
substrs = ["Error Domain=Hello", "Code=35", "be completed."])
self.runCmd("process continue")
-
- def NSError_p(self):
+
+ def test_NSError_p(self):
"""Test that p of the result of an unknown method does require a cast."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py
index 39d69b8..0831032 100644
--- a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py
+++ b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py
@@ -12,28 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- # rdar://problem/10857337
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_find_global_variables_then_object_description_with_dsym(self):
- """Exercise SBTaget.FindGlobalVariables() API."""
- d = {'EXE': 'a.out'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.find_global_variables_then_object_description('a.out')
-
- # rdar://problem/10857337
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_find_global_variables_then_object_description_with_dwarf(self):
- """Exercise SBTarget.FindGlobalVariables() API."""
- d = {'EXE': 'b.out'}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.find_global_variables_then_object_description('b.out')
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -41,9 +19,15 @@
self.source = 'main.m'
self.line = line_number(self.source, '// Set break point at this line.')
- def find_global_variables_then_object_description(self, exe_name):
- """Exercise SBTaget.FindGlobalVariables() followed by SBValue.GetObjectDescription()."""
- exe = os.path.join(os.getcwd(), exe_name)
+ # rdar://problem/10857337
+ @skipUnlessDarwin
+ @python_api_test
+ def test_find_global_variables_then_object_description(self):
+ """Exercise SBTarget.FindGlobalVariables() API."""
+ d = {'EXE': 'b.out'}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+ exe = os.path.join(os.getcwd(), 'b.out')
# Create a target by the debugger.
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/objc/foundation/TestRuntimeTypes.py b/lldb/test/lang/objc/foundation/TestRuntimeTypes.py
index 20e38a6..55e9713 100644
--- a/lldb/test/lang/objc/foundation/TestRuntimeTypes.py
+++ b/lldb/test/lang/objc/foundation/TestRuntimeTypes.py
@@ -13,23 +13,12 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_break_with_dsym(self):
+ def test_break(self):
"""Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
- # This only applies to the v2 runtime
- if self.getArchitecture() == 'x86_64':
- self.buildDsym()
- self.runtime_types()
+ if self.getArchitecture() != 'x86_64':
+ self.skipTest("This only applies to the v2 runtime")
- @dwarf_test
- def test_break_with_dwarf(self):
- """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
- # This only applies to the v2 runtime
- if self.getArchitecture() == 'x86_64':
- self.buildDwarf()
- self.runtime_types()
-
- def runtime_types(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/objc/foundation/TestSymbolTable.py b/lldb/test/lang/objc/foundation/TestSymbolTable.py
index 70ca088..0d23816 100644
--- a/lldb/test/lang/objc/foundation/TestSymbolTable.py
+++ b/lldb/test/lang/objc/foundation/TestSymbolTable.py
@@ -25,21 +25,9 @@
]
@python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
+ def test_with_python_api(self):
"""Test symbol table access with Python APIs."""
- self.buildDsym()
- self.symtab_access_python()
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test symbol table access with Python APIs."""
- self.buildDwarf()
- self.symtab_access_python()
-
- def symtab_access_python(self):
- """Test symbol table access with Python APIs."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py b/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py
index a7d52b0..405aa31 100644
--- a/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py
+++ b/lldb/test/lang/objc/hidden-ivars/TestHiddenIvars.py
@@ -11,80 +11,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_expr_with_dsym(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.buildDsym()
- self.expr(False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_expr_stripped_with_dsym(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.buildDsym()
- self.expr(True)
-
- @skipUnlessDarwin
- @dwarf_test
- def test_expr_with_dwarf(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.buildDwarf()
- self.expr(False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_frame_variable_with_dsym(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.buildDsym()
- self.frame_var(False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_frame_variable_stripped_with_dsym(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.buildDsym()
- self.frame_var(True)
-
- @skipUnlessDarwin
- @dwarf_test
- def test_frame_variable_with_dwarf(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.buildDwarf()
- self.frame_var(False)
-
- @unittest2.expectedFailure("rdar://18683637")
- @skipUnlessDarwin
- @dsym_test
- def test_frame_variable_across_modules_with_dsym(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.buildDsym()
- self.frame_var_type_access_across_module()
-
- @unittest2.expectedFailure("rdar://18683637")
- @skipUnlessDarwin
- @dwarf_test
- def test_frame_variable_across_modules_with_dwarf(self):
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- else:
- self.buildDwarf()
- self.frame_var_type_access_across_module()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -94,6 +20,48 @@
# The makefile names of the shared libraries as they appear in DYLIB_NAME.
# The names should have no loading "lib" or extension as they will be localized
self.shlib_names = ["InternalDefiner"]
+
+ @skipUnlessDarwin
+ def test_expr_stripped(self):
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
+ else:
+ self.build()
+ self.expr(True)
+
+ @skipUnlessDarwin
+ def test_expr(self):
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
+ else:
+ self.build()
+ self.expr(False)
+
+ @skipUnlessDarwin
+ def test_frame_variable_stripped(self):
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
+ else:
+ self.build()
+ self.frame_var(True)
+
+ @skipUnlessDarwin
+ def test_frame_variable(self):
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
+ else:
+ self.build()
+ self.frame_var(False)
+
+ @unittest2.expectedFailure("rdar://18683637")
+ @skipUnlessDarwin
+ def test_frame_variable_across_modules(self):
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
+ else:
+ self.build()
+ self.common_setup(False)
+ self.expect("frame variable k->bar", VARIABLES_DISPLAYED_CORRECTLY, substrs = ["= 3"])
def common_setup(self, strip):
@@ -196,11 +164,6 @@
else:
self.expect("frame variable *k", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["foo = 2", "bar = 3", '_filteredDataSource = 0x', '"2 objects"'])
-
- def frame_var_type_access_across_module(self):
- self.common_setup(False)
-
- self.expect("frame variable k->bar", VARIABLES_DISPLAYED_CORRECTLY, substrs = ["= 3"])
if __name__ == '__main__':
diff --git a/lldb/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py b/lldb/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
index d908449..b614d75 100644
--- a/lldb/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
+++ b/lldb/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
@@ -22,23 +22,14 @@
mydir = TestBase.compute_mydir(__file__)
@skipUnlessDarwin
+ @no_debug_info_test
def test_imp_ivar_type(self):
"""Test that dynamically discovered ivars of type IMP do not crash LLDB"""
if self.getArchitecture() == 'i386':
# rdar://problem/9946499
self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
- self.buildReproCase()
- self.runTheTest()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def buildReproCase (self):
+
execute_command("make repro")
-
- def runTheTest(self):
- """MakeTest that dynamically discovered ivars of type IMP do not crash LLDB"""
def cleanup():
execute_command("make cleanup")
self.addTearDownHook(cleanup)
@@ -46,7 +37,6 @@
exe = os.path.join(os.getcwd(), "a.out")
# Create a target from the debugger.
-
target = self.dbg.CreateTarget (exe)
self.assertTrue(target, VALID_TARGET)
diff --git a/lldb/test/lang/objc/modules-auto-import/TestModulesAutoImport.py b/lldb/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
index b875dfc..8a11c24 100644
--- a/lldb/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
+++ b/lldb/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
@@ -14,37 +14,18 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- @unittest2.expectedFailure("rdar://problem/19991953")
- def test_expr_with_dsym(self):
- self.buildDsym()
- self.expr()
-
- @dwarf_test
- @skipIfFreeBSD
- @skipIfLinux
- @skipIfWindows
- @expectedFailureDarwin # clang: error: unknown argument: '-gmodules'
- def test_expr_with_dwarf(self):
- self.buildDwarf()
- self.expr()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.m', '// Set breakpoint 0 here.')
- def applies(self):
- if platform.system() != "Darwin":
- return False
- if StrictVersion('12.0.0') > platform.release():
- return False
-
- return True
-
- def common_setup(self):
+ @skipUnlessDarwin
+ @unittest2.expectedFailure("rdar://problem/19991953")
+ @expectedFailureDarwin # clang: error: unknown argument: '-gmodules'
+ @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion('12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
+ def test_expr(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -62,12 +43,6 @@
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
- def expr(self):
- if not self.applies():
- return
-
- self.common_setup()
-
self.runCmd("settings set target.auto-import-clang-modules true")
self.expect("p getpid()", VARIABLES_DISPLAYED_CORRECTLY,
diff --git a/lldb/test/lang/objc/modules-incomplete/TestIncompleteModules.py b/lldb/test/lang/objc/modules-incomplete/TestIncompleteModules.py
index b552fd5..60bb82d 100644
--- a/lldb/test/lang/objc/modules-incomplete/TestIncompleteModules.py
+++ b/lldb/test/lang/objc/modules-incomplete/TestIncompleteModules.py
@@ -14,36 +14,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- @unittest2.expectedFailure("rdar://20416388")
- def test_expr_with_dsym(self):
- self.buildDsym()
- self.expr()
-
- @dwarf_test
- @skipIfFreeBSD
- @skipIfLinux
- @unittest2.expectedFailure("rdar://20416388")
- def test_expr_with_dwarf(self):
- self.buildDwarf()
- self.expr()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.m', '// Set breakpoint 0 here.')
- def applies(self):
- if platform.system() != "Darwin":
- return False
- if StrictVersion('12.0.0') > platform.release():
- return False
-
- return True
-
- def common_setup(self):
+ @skipUnlessDarwin
+ @unittest2.expectedFailure("rdar://20416388")
+ @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion('12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
+ def test_expr(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -61,12 +42,6 @@
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
- def expr(self):
- if not self.applies():
- return
-
- self.common_setup()
-
self.runCmd("settings set target.clang-module-search-paths \"" + os.getcwd() + "\"")
self.expect("expr @import myModule; 3", VARIABLES_DISPLAYED_CORRECTLY,
diff --git a/lldb/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py b/lldb/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
index e74cd82..02ac9d7 100644
--- a/lldb/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
+++ b/lldb/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
@@ -14,35 +14,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_expr_with_dsym(self):
- self.buildDsym()
- self.expr()
-
- @dwarf_test
- @skipIfFreeBSD
- @skipIfLinux
- @skipIfWindows
- def test_expr_with_dwarf(self):
- self.buildDwarf()
- self.expr()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.m', '// Set breakpoint here.')
- def applies(self):
- if platform.system() != "Darwin":
- return False
- if StrictVersion('12.0.0') > platform.release():
- return False
-
- return True
-
- def common_setup(self):
+ @skipUnlessDarwin
+ @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion('12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
+ def test_expr(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -60,12 +41,6 @@
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
- def expr(self):
- if not self.applies():
- return
-
- self.common_setup()
-
self.runCmd("settings set target.clang-module-search-paths \"" + os.getcwd() + "\"")
self.expect("expr @import myModule; 3", VARIABLES_DISPLAYED_CORRECTLY,
diff --git a/lldb/test/lang/objc/modules/TestObjCModules.py b/lldb/test/lang/objc/modules/TestObjCModules.py
index 09a5bfa..b3a5d13 100644
--- a/lldb/test/lang/objc/modules/TestObjCModules.py
+++ b/lldb/test/lang/objc/modules/TestObjCModules.py
@@ -14,35 +14,20 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- @unittest2.expectedFailure("rdar://20416388")
- def test_expr_with_dsym(self):
- self.buildDsym()
- self.expr()
-
- @dwarf_test
- @skipUnlessDarwin
- @unittest2.expectedFailure("rdar://20416388")
- def test_expr_with_dwarf(self):
- self.buildDwarf()
- self.expr()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.m', '// Set breakpoint 0 here.')
- def applies(self):
- if platform.system() != "Darwin":
- return False
- if StrictVersion('12.0.0') > platform.release():
- return False
+ @skipUnlessDarwin
+ @unittest2.expectedFailure("rdar://20416388")
+ @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion('12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
+ def test_expr(self):
+ if not self.applies():
+ return
- return True
-
- def common_setup(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -60,12 +45,6 @@
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
- def expr(self):
- if not self.applies():
- return
-
- self.common_setup()
-
self.expect("expr @import Darwin; 3", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["int", "3"])
@@ -86,7 +65,7 @@
self.expect("p [NSURL URLWithString:@\"http://lldb.llvm.org\"].scheme", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["http"])
-
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/lang/objc/objc++/TestObjCXX.py b/lldb/test/lang/objc/objc++/TestObjCXX.py
index eeb2bc8..1ae73bd 100644
--- a/lldb/test/lang/objc/objc++/TestObjCXX.py
+++ b/lldb/test/lang/objc/objc++/TestObjCXX.py
@@ -12,25 +12,13 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_break_with_dsym(self):
- """Test ivars of Objective-C++ classes"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires Objective-C 2.0 runtime")
- self.buildDsym()
- self.do_testObjCXXClasses()
-
@skipUnlessDarwin
- @dwarf_test
- def test_break_with_dwarf(self):
+ def test_break(self):
"""Test ivars of Objective-C++ classes"""
if self.getArchitecture() == 'i386':
self.skipTest("requires Objective-C 2.0 runtime")
- self.buildDwarf()
- self.do_testObjCXXClasses()
- def do_testObjCXXClasses(self):
- """Test ivars of Objective-C++ classes"""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py b/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
index d732f67..f7d8d5b 100644
--- a/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
+++ b/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
@@ -12,36 +12,21 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_get_baseclass_with_dsym(self):
- """Test fetching ObjC base class info."""
- if self.getArchitecture() == 'i386':
- # rdar://problem/9946499
- self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
- self.buildDsym()
- self.do_get_baseclass_info()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_get_baseclass_with_dwarf(self):
- """Test fetching ObjC dynamic values."""
- if self.getArchitecture() == 'i386':
- # rdar://problem/9946499
- self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
- self.buildDwarf()
- self.do_get_baseclass_info()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
self.line = line_number('main.m', '// Set breakpoint here.')
- def do_get_baseclass_info(self):
- """Make sure we get dynamic values correctly both for compiled in classes and dynamic ones"""
+ @skipUnlessDarwin
+ @python_api_test
+ def test_get_baseclass(self):
+ """Test fetching ObjC dynamic values."""
+ if self.getArchitecture() == 'i386':
+ # rdar://problem/9946499
+ self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
+
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target from the debugger.
diff --git a/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py b/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
index ad48156..f07adb6 100644
--- a/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
+++ b/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
@@ -10,22 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
-
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test expression parser respect for ObjC built-in types."""
- self.buildDsym()
- self.objc_builtin_types()
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test expression parser respect for ObjC built-in types."""
- self.buildDwarf()
- self.objc_builtin_types()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -33,9 +17,12 @@
self.main_source = "main.cpp"
self.break_line = line_number(self.main_source, '// Set breakpoint here.')
+ @skipUnlessDarwin
+ @python_api_test
#<rdar://problem/10591460> [regression] Can't print ivar value: error: reference to 'id' is ambiguous
- def objc_builtin_types(self):
+ def test_with_python_api(self):
"""Test expression parser respect for ObjC built-in types."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py b/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py
index 550ce0e..8f816c5 100644
--- a/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py
+++ b/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py
@@ -12,36 +12,21 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_objc_checker_with_dsym(self):
- """Test that checkers catch unrecognized selectors"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires Objective-C 2.0 runtime")
- self.buildDsym()
- self.do_test_checkers()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_objc_checker_with_dwarf(self):
- """Test that checkers catch unrecognized selectors"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires Objective-C 2.0 runtime")
- self.buildDwarf()
- self.do_test_checkers()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break for main.c.
-
self.source_name = 'main.m'
- def do_test_checkers (self):
- """Make sure the dynamic checkers catch messages to unrecognized selectors"""
+ @skipUnlessDarwin
+ @python_api_test
+ def test_objc_checker(self):
+ """Test that checkers catch unrecognized selectors"""
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires Objective-C 2.0 runtime")
+
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target from the debugger.
diff --git a/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py b/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py
index b3929b9..27b0915 100644
--- a/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py
+++ b/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py
@@ -10,25 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
-
- @expectedFailurei386
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test calling functions in class methods."""
- self.buildDsym()
- self.objc_class_method()
-
- @skipUnlessDarwin
- @expectedFailurei386
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test calling functions in class methods."""
- self.buildDwarf()
- self.objc_class_method()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -36,9 +17,13 @@
self.main_source = "class.m"
self.break_line = line_number(self.main_source, '// Set breakpoint here.')
+ @skipUnlessDarwin
+ @expectedFailurei386
+ @python_api_test
#rdar://problem/9745789 "expression" can't call functions in class methods
- def objc_class_method(self):
- """Test calling class methods."""
+ def test_with_python_api(self):
+ """Test calling functions in class methods."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -65,7 +50,7 @@
cmd_value = frame.EvaluateExpression ("(int)[Foo doSomethingWithString:@\"Hello\"]")
self.assertTrue (cmd_value.IsValid())
- self.assertTrue (cmd_value.GetValueAsUnsigned() == 5)
+ self.assertTrue (cmd_value.GetValueAsUnsigned() == 5)
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py b/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
index fd3ae84..27f6da1 100644
--- a/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
+++ b/lldb/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
@@ -13,24 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- @skipIfi386
- def test_dyn_with_dsym(self):
- """Test that we are able to properly report a usable dynamic type."""
- d = {'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.dyn(self.exe_name)
-
- @dwarf_test
- @skipIfi386
- def test_dyn_with_dwarf(self):
- """Test that we are able to properly report a usable dynamic type."""
- d = {'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.dyn(self.exe_name)
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -40,9 +22,14 @@
self.main_source = "main.m"
self.line = line_number(self.main_source, '// Set breakpoint here.')
- def dyn(self, exe_name):
+ @skipIfi386
+ def test_dyn(self):
"""Test that we are able to properly report a usable dynamic type."""
- exe = os.path.join(os.getcwd(), exe_name)
+ d = {'EXE': self.exe_name}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+
+ exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, self.main_source, self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py b/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
index 61a69cb..37a7b07 100644
--- a/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
+++ b/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
@@ -12,30 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- @expectedFailureDarwin("llvm.org/pr20271 rdar://18684107")
- def test_get_dynamic_objc_vals_with_dsym(self):
- """Test fetching ObjC dynamic values."""
- if self.getArchitecture() == 'i386':
- # rdar://problem/9946499
- self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
- self.buildDsym()
- self.do_get_dynamic_vals()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- @expectedFailureDarwin("llvm.org/pr20271 rdar://18684107")
- def test_get_objc_dynamic_vals_with_dwarf(self):
- """Test fetching ObjC dynamic values."""
- if self.getArchitecture() == 'i386':
- # rdar://problem/9946499
- self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
- self.buildDwarf()
- self.do_get_dynamic_vals()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -49,15 +25,16 @@
self.main_before_setProperty_line = line_number(self.source_name,
'// Break here to see if we can step into real method.')
- def examine_SourceDerived_ptr (self, object):
- self.assertTrue (object)
- self.assertTrue (object.GetTypeName().find ('SourceDerived') != -1)
- derivedValue = object.GetChildMemberWithName ('_derivedValue')
- self.assertTrue (derivedValue)
- self.assertTrue (int (derivedValue.GetValue(), 0) == 30)
+ @skipUnlessDarwin
+ @python_api_test
+ @expectedFailureDarwin("llvm.org/pr20271 rdar://18684107")
+ def test_get_objc_dynamic_vals(self):
+ """Test fetching ObjC dynamic values."""
+ if self.getArchitecture() == 'i386':
+ # rdar://problem/9946499
+ self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
- def do_get_dynamic_vals(self):
- """Make sure we get dynamic values correctly both for compiled in classes and dynamic ones"""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target from the debugger.
@@ -188,6 +165,13 @@
self.examine_SourceDerived_ptr (object_dynamic)
+ def examine_SourceDerived_ptr (self, object):
+ self.assertTrue (object)
+ self.assertTrue (object.GetTypeName().find ('SourceDerived') != -1)
+ derivedValue = object.GetChildMemberWithName ('_derivedValue')
+ self.assertTrue (derivedValue)
+ self.assertTrue (int (derivedValue.GetValue(), 0) == 30)
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py b/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
index d03176b..98d6aa5 100644
--- a/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
+++ b/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
@@ -10,22 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test printing ObjC objects that use unbacked properties"""
- self.buildDsym()
- self.objc_ivar_offsets()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test printing ObjC objects that use unbacked properties"""
- self.buildDwarf()
- self.objc_ivar_offsets()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -33,8 +17,11 @@
self.main_source = "main.m"
self.stop_line = line_number(self.main_source, '// Set breakpoint here.')
- def objc_ivar_offsets(self):
- """Use Python APIs to test stepping into ObjC methods."""
+ @skipUnlessDarwin
+ @python_api_test
+ def test_with_python_api(self):
+ """Test printing ObjC objects that use unbacked properties"""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py b/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
index 56d9eb9..324744f 100644
--- a/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
+++ b/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
@@ -10,14 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test that we can find stripped Objective-C ivars in the runtime"""
- self.buildDsym()
- self.objc_ivar_offsets()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -25,8 +17,11 @@
self.main_source = "main.m"
self.stop_line = line_number(self.main_source, '// Set breakpoint here.')
- def objc_ivar_offsets(self):
+ @skipUnlessDarwin
+ @python_api_test
+ def test_with_python_api(self):
"""Test that we can find stripped Objective-C ivars in the runtime"""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out.stripped")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py b/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
index 29e86fa..97d8f92 100644
--- a/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
+++ b/lldb/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
@@ -14,39 +14,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- @expectedFailureAll(
- oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
- def test_expr_with_dsym(self):
- self.buildDsym()
- self.expr()
-
- @dwarf_test
- @skipIfFreeBSD
- @skipIfLinux
- @skipIfWindows
- @expectedFailureAll(
- oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
- def test_expr_with_dwarf(self):
- self.buildDwarf()
- self.expr()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number('main.m', '// Set breakpoint 0 here.')
- def applies(self):
- if platform.system() != "Darwin":
- return False
- if StrictVersion('12.0.0') > platform.release():
- return False
-
- return True
-
- def common_setup(self):
+ @skipUnlessDarwin
+ @expectedFailureAll(oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
+ @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion('12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
+ def test_expr(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -64,12 +42,6 @@
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
- def expr(self):
- if not self.applies():
- return
-
- self.common_setup()
-
self.expect("expr --object-description -- immutable_array[0]", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["foo"])
@@ -126,7 +98,6 @@
self.expect("expr -- @((char*)\"Hello world\" + 6)", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["NSString", "world"])
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py b/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py
index 507e29e..e6a5958 100644
--- a/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py
+++ b/lldb/test/lang/objc/objc-optimized/TestObjcOptimized.py
@@ -24,20 +24,9 @@
mymethod = "description"
method_spec = "-[%s %s]" % (myclass, mymethod)
- @dsym_test
- def test_break_with_dsym(self):
+ def test_break(self):
"""Test 'expr member' continues to work for optimized build."""
- self.buildDsym()
- self.objc_optimized()
-
- @dwarf_test
- def test_break_with_dwarf(self):
- """Test 'expr member' continues to work for optimized build."""
- self.buildDwarf()
- self.objc_optimized()
-
- def objc_optimized(self):
- """Test 'expr member' continues to work for optimized build."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/lang/objc/objc-property/TestObjCProperty.py b/lldb/test/lang/objc/objc-property/TestObjCProperty.py
index 842ada1..0ed0836 100644
--- a/lldb/test/lang/objc/objc-property/TestObjCProperty.py
+++ b/lldb/test/lang/objc/objc-property/TestObjCProperty.py
@@ -12,36 +12,21 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_objc_properties_with_dsym(self):
- """Test that expr uses the correct property getters and setters"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- self.buildDsym()
- self.do_test_properties()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_objc_properties_with_dwarf(self):
- """Test that expr uses the correct property getters and setters"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- self.buildDwarf()
- self.do_test_properties()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break for main.c.
-
self.source_name = 'main.m'
- def run_to_main (self):
+ @skipUnlessDarwin
+ @python_api_test
+ def test_objc_properties(self):
"""Test that expr uses the correct property getters and setters"""
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
+
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target from the debugger.
@@ -65,12 +50,6 @@
threads = lldbutil.get_threads_stopped_at_breakpoint (process, main_bkpt)
self.assertTrue (len(threads) == 1)
thread = threads[0]
- return thread
-
- def do_test_properties (self):
-
- thread = self.run_to_main()
-
frame = thread.GetFrameAtIndex(0)
mine = frame.FindVariable ("mine")
diff --git a/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py b/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
index 894fa22..664494e 100644
--- a/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
+++ b/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
@@ -10,17 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- #<rdar://problem/12042992>
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test calling functions in static methods with a stripped binary."""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- self.buildDsym()
- self.objc_static_method_stripped()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -28,9 +17,14 @@
self.main_source = "static.m"
self.break_line = line_number(self.main_source, '// Set breakpoint here.')
+ @skipUnlessDarwin
+ @python_api_test
#<rdar://problem/12042992>
- def objc_static_method_stripped(self):
+ def test_with_python_api(self):
"""Test calling functions in static methods with a stripped binary."""
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
+ self.build()
exe = os.path.join(os.getcwd(), "a.out.stripped")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py b/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
index 84f5210..c54d23b 100644
--- a/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
+++ b/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
@@ -10,24 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- #<rdar://problem/9745789> "expression" can't call functions in class methods
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test calling functions in static methods."""
- self.buildDsym()
- self.objc_static_method()
-
- @skipUnlessDarwin
- @python_api_test
- #<rdar://problem/9745789> "expression" can't call functions in class methods
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test calling functions in static methods."""
- self.buildDwarf()
- self.objc_static_method()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -35,9 +17,12 @@
self.main_source = "static.m"
self.break_line = line_number(self.main_source, '// Set breakpoint here.')
- #rdar://problem/9745789 "expression" can't call functions in class methods
- def objc_static_method(self):
+ @skipUnlessDarwin
+ @python_api_test
+ #<rdar://problem/9745789> "expression" can't call functions in class methods
+ def test_with_python_api(self):
"""Test calling functions in static methods."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py b/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py
index d93bae6..0fb8bce 100644
--- a/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py
+++ b/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py
@@ -13,22 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test stepping through ObjC method dispatch in various forms."""
- self.buildDsym()
- self.objc_stepping()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test stepping through ObjC method dispatch in various forms."""
- self.buildDwarf()
- self.objc_stepping()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -40,8 +24,11 @@
self.sourceBase_returnsStruct_start_line = line_number (self.main_source, '// SourceBase returnsStruct start line.')
self.stepped_past_nil_line = line_number (self.main_source, '// Step over nil should stop here.')
- def objc_stepping(self):
- """Use Python APIs to test stepping into ObjC methods."""
+ @skipUnlessDarwin
+ @python_api_test
+ def test_with_python_api(self):
+ """Test stepping through ObjC method dispatch in various forms."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py b/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
index 5e4106e..47d1ea4 100644
--- a/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
+++ b/lldb/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
@@ -10,22 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test passing structs to Objective-C methods."""
- self.buildDsym()
- self.objc_class_method()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test passing structs to Objective-C methods."""
- self.buildDwarf()
- self.objc_class_method()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -33,8 +17,11 @@
self.main_source = "test.m"
self.break_line = line_number(self.main_source, '// Set breakpoint here.')
- def objc_class_method(self):
+ @skipUnlessDarwin
+ @python_api_test
+ def test_with_python_api(self):
"""Test passing structs to Objective-C methods."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py b/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
index c884fe9..27a3c3e 100644
--- a/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
+++ b/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
@@ -10,22 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test calling functions in class methods."""
- self.buildDsym()
- self.objc_class_method()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test calling functions in class methods."""
- self.buildDwarf()
- self.objc_class_method()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -33,8 +17,11 @@
self.main_source = "test.m"
self.break_line = line_number(self.main_source, '// Set breakpoint here.')
- def objc_class_method(self):
- """Test calling class methods."""
+ @skipUnlessDarwin
+ @python_api_test
+ def test_with_python_api(self):
+ """Test calling functions in class methods."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/objc/objc-super/TestObjCSuper.py b/lldb/test/lang/objc/objc-super/TestObjCSuper.py
index faa97c2..1d1f43b 100644
--- a/lldb/test/lang/objc/objc-super/TestObjCSuper.py
+++ b/lldb/test/lang/objc/objc-super/TestObjCSuper.py
@@ -10,24 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @expectedFailurei386
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test calling methods on super."""
- self.buildDsym()
- self.objc_super()
-
- @skipUnlessDarwin
- @expectedFailurei386
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test calling methods on super."""
- self.buildDwarf()
- self.objc_super()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -35,8 +17,12 @@
self.main_source = "class.m"
self.break_line = line_number(self.main_source, '// Set breakpoint here.')
- def objc_super(self):
+ @skipUnlessDarwin
+ @expectedFailurei386
+ @python_api_test
+ def test_with_python_api(self):
"""Test calling methods on super."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/lang/objc/print-obj/TestPrintObj.py b/lldb/test/lang/objc/print-obj/TestPrintObj.py
index c3386bf..f6143b0 100644
--- a/lldb/test/lang/objc/print-obj/TestPrintObj.py
+++ b/lldb/test/lang/objc/print-obj/TestPrintObj.py
@@ -12,22 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_print_obj_with_dsym(self):
- """Test "print object" where another thread blocks the print object from making progress."""
- d = {'EXE': 'a.out'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.print_obj('a.out')
-
- @dwarf_test
- def test_print_obj_with_dwarf(self):
- """Test "print object" where another thread blocks the print object from making progress."""
- d = {'EXE': 'b.out'}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.print_obj('b.out')
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -36,7 +20,7 @@
# Find the line numbers to break at.
self.line = line_number(self.source, '// Set a breakpoint here.')
- def print_obj(self, exe_name):
+ def test_print_obj(self):
"""
Test "print object" where another thread blocks the print object from making progress.
@@ -45,7 +29,10 @@
try to get the lock already gotten by my_pthread_routime thread, it will
have to switch to running all threads, and that should then succeed.
"""
- exe = os.path.join(os.getcwd(), exe_name)
+ d = {'EXE': 'b.out'}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+ exe = os.path.join(os.getcwd(), 'b.out')
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
diff --git a/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py b/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
index ff860e1..b33741b 100644
--- a/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
+++ b/lldb/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
@@ -13,22 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_method_ret_BOOL_with_dsym(self):
- """Test that objective-c method returning BOOL works correctly."""
- d = {'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.objc_method_ret_BOOL(self.exe_name)
-
- @dwarf_test
- def test_method_ret_BOOL_with_dwarf(self):
- """Test that objective-c method returning BOOL works correctly."""
- d = {'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.objc_method_ret_BOOL(self.exe_name)
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -38,9 +22,13 @@
self.main_source = "main.m"
self.line = line_number(self.main_source, '// Set breakpoint here.')
- def objc_method_ret_BOOL(self, exe_name):
+ def test_method_ret_BOOL(self):
"""Test that objective-c method returning BOOL works correctly."""
- exe = os.path.join(os.getcwd(), exe_name)
+ d = {'EXE': self.exe_name}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+
+ exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py b/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py
index c8f4c1f..17d1015 100644
--- a/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py
+++ b/lldb/test/lang/objc/rdar-10967107/TestRdar10967107.py
@@ -13,22 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_cfrange_diff_cfgregoriandate_with_dsym(self):
- """Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued."""
- d = {'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.cfrange_diff_cfgregoriandate(self.exe_name)
-
- @dwarf_test
- def test_cfrange_diff_cfgregoriandate_with_dwarf(self):
- """Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued."""
- d = {'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.cfrange_diff_cfgregoriandate(self.exe_name)
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -38,9 +22,13 @@
self.main_source = "main.m"
self.line = line_number(self.main_source, '// Set breakpoint here.')
- def cfrange_diff_cfgregoriandate(self, exe_name):
+ def test_cfrange_diff_cfgregoriandate(self):
"""Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued."""
- exe = os.path.join(os.getcwd(), exe_name)
+ d = {'EXE': self.exe_name}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+
+ exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, self.main_source, self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py b/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py
index 0cbb738..14f85c4 100644
--- a/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py
+++ b/lldb/test/lang/objc/rdar-11355592/TestRdar11355592.py
@@ -13,22 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_charstar_dyntype_with_dsym(self):
- """Test that we do not attempt to make a dynamic type for a 'const char*'"""
- d = {'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.charstar_dyntype(self.exe_name)
-
- @dwarf_test
- def test_charstar_dyntype_with_dwarf(self):
- """Test that we do not attempt to make a dynamic type for a 'const char*'"""
- d = {'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.charstar_dyntype(self.exe_name)
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -38,9 +22,13 @@
self.main_source = "main.m"
self.line = line_number(self.main_source, '// Set breakpoint here.')
- def charstar_dyntype(self, exe_name):
+ def test_charstar_dyntype(self):
"""Test that we do not attempt to make a dynamic type for a 'const char*'"""
- exe = os.path.join(os.getcwd(), exe_name)
+ d = {'EXE': self.exe_name}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+
+ exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, self.main_source, self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py b/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py
index ddc94ef..d1d2292 100644
--- a/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py
+++ b/lldb/test/lang/objc/rdar-12408181/TestRdar12408181.py
@@ -13,22 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @dsym_test
- def test_nswindow_count_with_dsym(self):
- """Test that we are able to find out how many children NSWindow has."""
- d = {'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.nswindow_count(self.exe_name)
-
- @dwarf_test
- def test_nswindow_count_with_dwarf(self):
- """Test that we are able to find out how many children NSWindow has."""
- d = {'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.nswindow_count(self.exe_name)
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -38,9 +22,13 @@
self.main_source = "main.m"
self.line = line_number(self.main_source, '// Set breakpoint here.')
- def nswindow_count(self, exe_name):
+ def test_nswindow_count(self):
"""Test that we are able to find out how many children NSWindow has."""
- exe = os.path.join(os.getcwd(), exe_name)
+ d = {'EXE': self.exe_name}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+
+ exe = os.path.join(os.getcwd(), self.exe_name)
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, self.main_source, self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/lang/objc/real-definition/TestRealDefinition.py b/lldb/test/lang/objc/real-definition/TestRealDefinition.py
index 41f0b27..8557423 100644
--- a/lldb/test/lang/objc/real-definition/TestRealDefinition.py
+++ b/lldb/test/lang/objc/real-definition/TestRealDefinition.py
@@ -11,55 +11,11 @@
mydir = TestBase.compute_mydir(__file__)
@skipUnlessDarwin
- @dsym_test
- def test_frame_var_after_stop_at_interface_with_dsym(self):
+ def test_frame_var_after_stop_at_interface(self):
"""Test that we can find the implementation for an objective C type"""
if self.getArchitecture() == 'i386':
self.skipTest("requires modern objc runtime")
- self.buildDsym()
- self.stop_at_interface()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_frame_var_after_stop_at_interface_with_dwarf(self):
- """Test that we can find the implementation for an objective C type"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- self.buildDwarf()
- self.stop_at_interface()
-
- @skipUnlessDarwin
- @dsym_test
- def test_frame_var_after_stop_at_implementation_with_dsym(self):
- """Test that we can find the implementation for an objective C type"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- self.buildDsym()
- self.stop_at_implementation()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_frame_var_after_stop_at_implementation_with_dwarf(self):
- """Test that we can find the implementation for an objective C type"""
- if self.getArchitecture() == 'i386':
- self.skipTest("requires modern objc runtime")
- self.buildDwarf()
- self.stop_at_implementation()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def common_setup(self):
- exe = os.path.join(os.getcwd(), "a.out")
- self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
- # Break inside the foo function which takes a bar_ptr argument.
- line = line_number('main.m', '// Set breakpoint in main')
- lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
-
- def stop_at_interface(self):
- """Test that we can find the implementation for an objective C type when we stop in the interface"""
+ self.build()
self.common_setup()
line = line_number('Foo.m', '// Set breakpoint where Bar is an interface')
@@ -86,8 +42,12 @@
self.expect("frame variable foo->_bar->_hidden_ivar", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["(NSString *)", "foo->_bar->_hidden_ivar = 0x"])
- def stop_at_implementation(self):
- """Test that we can find the implementation for an objective C type when we stop in the implementation"""
+ @skipUnlessDarwin
+ def test_frame_var_after_stop_at_implementation(self):
+ """Test that we can find the implementation for an objective C type"""
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
+ self.build()
self.common_setup()
line = line_number('Bar.m', '// Set breakpoint where Bar is an implementation')
@@ -114,7 +74,14 @@
self.expect("frame variable foo->_bar->_hidden_ivar", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["(NSString *)", "foo->_bar->_hidden_ivar = 0x"])
-
+ def common_setup(self):
+ exe = os.path.join(os.getcwd(), "a.out")
+ self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+ # Break inside the foo function which takes a bar_ptr argument.
+ line = line_number('main.m', '// Set breakpoint in main')
+ lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/lang/objc/self/TestObjCSelf.py b/lldb/test/lang/objc/self/TestObjCSelf.py
index 1ed2283..239e2de 100644
--- a/lldb/test/lang/objc/self/TestObjCSelf.py
+++ b/lldb/test/lang/objc/self/TestObjCSelf.py
@@ -10,27 +10,9 @@
mydir = TestBase.compute_mydir(__file__)
@skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
+ def test_with_run_command(self):
"""Test that the appropriate member variables are available when stopped in Objective-C class and instance methods"""
- self.buildDsym()
- self.self_commands()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test that the appropriate member variables are available when stopped in Objective-C class and instance methods"""
- self.buildDwarf()
- self.self_commands()
-
- def setUp(self):
- TestBase.setUp(self)
-
- def set_breakpoint(self, line):
- lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
-
- def self_commands(self):
- """Test that the appropriate member variables are available when stopped in Objective-C class and instance methods"""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
self.set_breakpoint(line_number('main.m', '// breakpoint 1'))
@@ -50,6 +32,9 @@
self.expect("expression -- s_a",
startstr = "(int) $1 = 5")
+ def set_breakpoint(self, line):
+ lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/linux/builtin_trap/TestBuiltinTrap.py b/lldb/test/linux/builtin_trap/TestBuiltinTrap.py
index 2f8c3c2..b2870f1 100644
--- a/lldb/test/linux/builtin_trap/TestBuiltinTrap.py
+++ b/lldb/test/linux/builtin_trap/TestBuiltinTrap.py
@@ -13,32 +13,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test that LLDB handles a function with __builtin_trap correctly."""
- self.buildDsym()
- self.builtin_trap_unwind()
-
- @dwarf_test
- @expectedFailureAll("llvm.org/pr15936", compiler="gcc", compiler_version=["<=","4.6"])
- @expectedFailureAll(archs="arm", compiler="gcc", triple=".*-android") # gcc generates incorrect linetable
- @skipIfWindows
- def test_with_dwarf_and_run_command(self):
- """Test that LLDB handles a function with __builtin_trap correctly."""
- self.buildDwarf()
- self.builtin_trap_unwind()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def builtin_trap_unwind(self):
- """Test that LLDB handles unwinding a frame that contains a function
- with a __builtin_trap intrinsic.
- """
+ @expectedFailureAll("llvm.org/pr15936", compiler="gcc", compiler_version=["<=","4.6"])
+ @expectedFailureAll(archs="arm", compiler="gcc", triple=".*-android") # gcc generates incorrect linetable
+ def test_with_run_command(self):
+ """Test that LLDB handles a function with __builtin_trap correctly."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line,
@@ -61,8 +46,6 @@
# evaluate a local
self.expect('p foo', substrs = ['= 5'])
-
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py b/lldb/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py
index 6f15572..65c145f 100644
--- a/lldb/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py
+++ b/lldb/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py
@@ -19,12 +19,8 @@
@skipUnlessPlatform(['linux'])
@expectedFailureAndroid('llvm.org/pr24737', archs=['arm'])
- @dwarf_test
- def test_step_inst_with_dwarf(self):
- self.buildDwarf(dictionary=self.getBuildFlags())
- self.create_during_step_inst_test()
-
- def create_during_step_inst_test(self):
+ def test_step_inst(self):
+ self.build(dictionary=self.getBuildFlags())
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target and target.IsValid(), "Target is valid")
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py
index a55cde4..b59d692 100644
--- a/lldb/test/lldbtest.py
+++ b/lldb/test/lldbtest.py
@@ -520,6 +520,19 @@
wrapper.__benchmarks_test__ = True
return wrapper
+def no_debug_info_test(func):
+ """Decorate the item as a test what don't use any debug info. If this annotation is specified
+ then the test runner won't generate a separate test for each debug info format. """
+ if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+ raise Exception("@no_debug_info_test can only be used to decorate a test method")
+ @wraps(func)
+ def wrapper(self, *args, **kwargs):
+ return func(self, *args, **kwargs)
+
+ # Mark this function as such to separate them from the regular tests.
+ wrapper.__no_debug_info_test__ = True
+ return wrapper
+
def dsym_test(func):
"""Decorate the item as a dsym test."""
if isinstance(func, type) and issubclass(func, unittest2.TestCase):
@@ -628,27 +641,32 @@
else:
return expectedFailure_impl
-def expectedFailureCompiler(compiler, compiler_version=None, bugnumber=None):
- if compiler_version is None:
- compiler_version=['=', None]
- def fn(self):
- return compiler in self.getCompiler() and self.expectedCompilerVersion(compiler_version)
- return expectedFailure(fn, bugnumber)
-
# provide a function to xfail on defined oslist, compiler version, and archs
# if none is specified for any argument, that argument won't be checked and thus means for all
# for example,
# @expectedFailureAll, xfail for all platform/compiler/arch,
# @expectedFailureAll(compiler='gcc'), xfail for gcc on all platform/architecture
# @expectedFailureAll(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), xfail for gcc>=4.9 on linux with i386
-def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, triple=None):
+def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, triple=None, debug_info=None):
def fn(self):
return ((oslist is None or self.getPlatform() in oslist) and
(compiler is None or (compiler in self.getCompiler() and self.expectedCompilerVersion(compiler_version))) and
self.expectedArch(archs) and
- (triple is None or re.match(triple, lldb.DBG.GetSelectedPlatform().GetTriple())))
+ (triple is None or re.match(triple, lldb.DBG.GetSelectedPlatform().GetTriple())) and
+ (debug_info is None or self.debug_info in debug_info))
return expectedFailure(fn, bugnumber)
+def expectedFailureDwarf(bugnumber=None):
+ return expectedFailureAll(bugnumber==bugnumber, debug_info="dwarf")
+
+def expectedFailureDsym(bugnumber=None):
+ return expectedFailureAll(bugnumber==bugnumber, debug_info="dsym")
+
+def expectedFailureCompiler(compiler, compiler_version=None, bugnumber=None):
+ if compiler_version is None:
+ compiler_version=['=', None]
+ return expectedFailureAll(bugnumber=bugnumber, compiler=compiler, compiler_version=compiler_version)
+
# to XFAIL a specific clang versions, try this
# @expectedFailureClang('bugnumber', ['<=', '3.4'])
def expectedFailureClang(bugnumber=None, compiler_version=None):
@@ -671,10 +689,11 @@
def expectedFailurex86_64(bugnumber=None):
return expectedFailureArch('x86_64', bugnumber)
-def expectedFailureOS(oslist, bugnumber=None, compilers=None):
+def expectedFailureOS(oslist, bugnumber=None, compilers=None, debug_info=None):
def fn(self):
return (self.getPlatform() in oslist and
- self.expectedCompiler(compilers))
+ self.expectedCompiler(compilers) and
+ (debug_info is None or self.debug_info in debug_info))
return expectedFailure(fn, bugnumber)
def expectedFailureHostOS(oslist, bugnumber=None, compilers=None):
@@ -683,18 +702,18 @@
self.expectedCompiler(compilers))
return expectedFailure(fn, bugnumber)
-def expectedFailureDarwin(bugnumber=None, compilers=None):
+def expectedFailureDarwin(bugnumber=None, compilers=None, debug_info=None):
# For legacy reasons, we support both "darwin" and "macosx" as OS X triples.
- return expectedFailureOS(getDarwinOSTriples(), bugnumber, compilers)
+ return expectedFailureOS(getDarwinOSTriples(), bugnumber, compilers, debug_info=debug_info)
-def expectedFailureFreeBSD(bugnumber=None, compilers=None):
- return expectedFailureOS(['freebsd'], bugnumber, compilers)
+def expectedFailureFreeBSD(bugnumber=None, compilers=None, debug_info=None):
+ return expectedFailureOS(['freebsd'], bugnumber, compilers, debug_info=debug_info)
-def expectedFailureLinux(bugnumber=None, compilers=None):
- return expectedFailureOS(['linux'], bugnumber, compilers)
+def expectedFailureLinux(bugnumber=None, compilers=None, debug_info=None):
+ return expectedFailureOS(['linux'], bugnumber, compilers, debug_info=debug_info)
-def expectedFailureWindows(bugnumber=None, compilers=None):
- return expectedFailureOS(['windows'], bugnumber, compilers)
+def expectedFailureWindows(bugnumber=None, compilers=None, debug_info=None):
+ return expectedFailureOS(['windows'], bugnumber, compilers, debug_info=debug_info)
def expectedFailureHostWindows(bugnumber=None, compilers=None):
return expectedFailureHostOS(['windows'], bugnumber, compilers)
@@ -759,6 +778,16 @@
else:
return expectedFailure_impl
+def expectedFlakeyDwarf(bugnumber=None):
+ def fn(self):
+ return self.debug_info == "dwarf"
+ return expectedFlakey(fn, bugnumber)
+
+def expectedFlakeyDsym(bugnumber=None):
+ def fn(self):
+ return self.debug_info == "dwarf"
+ return expectedFlakey(fn, bugnumber)
+
def expectedFlakeyOS(oslist, bugnumber=None, compilers=None):
def fn(self):
return (self.getPlatform() in oslist and
@@ -1021,12 +1050,22 @@
# @skipIf(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), skip for gcc>=4.9 on linux with i386
# TODO: refactor current code, to make skipIfxxx functions to call this function
-def skipIf(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None):
+def skipIf(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, debug_info=None):
def fn(self):
return ((oslist is None or self.getPlatform() in oslist) and
(compiler is None or (compiler in self.getCompiler() and self.expectedCompilerVersion(compiler_version))) and
- self.expectedArch(archs))
- return skipTestIfFn(fn, bugnumber, skipReason="skipping because os:%s compiler: %s %s arch: %s"%(oslist, compiler, compiler_version, archs))
+ self.expectedArch(archs) and
+ (debug_info is None or self.debug_info in debug_info))
+ return skipTestIfFn(fn, bugnumber, skipReason="skipping because os:%s compiler: %s %s arch: %s debug info: %s"%(oslist, compiler, compiler_version, archs, debug_info))
+
+def skipIfDebugInfo(bugnumber=None, debug_info=None):
+ return skipIf(bugnumber=bugnumber, debug_info=debug_info)
+
+def skipIfDwarf(bugnumber=None):
+ return skipIfDebugInfo(bugnumber, ["dwarf"])
+
+def skipIfDsym(bugnumber=None):
+ return skipIfDebugInfo(bugnumber, ["dsym"])
def skipTestIfFn(expected_fn, bugnumber=None, skipReason=None):
def skipTestIfFn_impl(func):
@@ -2049,7 +2088,7 @@
print "Building LLDB Library (%s) from sources %s" % (lib_name, sources)
self.buildDefault(dictionary=d)
-
+
def buildProgram(self, sources, exe_name):
""" Platform specific way to build an executable from C/C++ sources. """
d = {'CXX_SOURCES' : sources,
@@ -2177,6 +2216,34 @@
else:
return ['libc++.1.dylib','libc++abi.dylib']
+# Metaclass for TestBase to change the list of test metods when a new TestCase is loaded.
+# We change the test methods to create a new test method for each test for each debug info we are
+# testing. The name of the new test method will be '<original-name>_<debug-info>' and with adding
+# the new test method we remove the old method at the same time.
+class LLDBTestCaseFactory(type):
+ def __new__(cls, name, bases, attrs):
+ newattrs = {}
+ for attrname, attrvalue in attrs.iteritems():
+ if attrname.startswith("test") and not getattr(attrvalue, "__no_debug_info_test__", False):
+ @dsym_test
+ def dsym_test_method(self, attrvalue=attrvalue):
+ self.debug_info = "dsym"
+ return attrvalue(self)
+ dsym_method_name = attrname + "_dsym"
+ dsym_test_method.__name__ = dsym_method_name
+ newattrs[dsym_method_name] = dsym_test_method
+
+ @dwarf_test
+ def dwarf_test_method(self, attrvalue=attrvalue):
+ self.debug_info = "dwarf"
+ return attrvalue(self)
+ dwarf_method_name = attrname + "_dwarf"
+ dwarf_test_method.__name__ = dwarf_method_name
+ newattrs[dwarf_method_name] = dwarf_test_method
+ else:
+ newattrs[attrname] = attrvalue
+ return super(LLDBTestCaseFactory, cls).__new__(cls, name, bases, newattrs)
+
class TestBase(Base):
"""
This abstract base class is meant to be subclassed. It provides default
@@ -2237,6 +2304,9 @@
# Can be overridden by the LLDB_TIME_WAIT_NEXT_LAUNCH environment variable.
timeWaitNextLaunch = 1.0;
+ # Setup the metaclass for this class to change the list of the test methods when a new class is loaded
+ __metaclass__ = LLDBTestCaseFactory
+
def doDelay(self):
"""See option -w of dotest.py."""
if ("LLDB_WAIT_BETWEEN_TEST_CASES" in os.environ and
@@ -2692,6 +2762,20 @@
print >> sbuf, str(method) + ":", result
return result
+ def build(self, architecture=None, compiler=None, dictionary=None, clean=True):
+ """Platform specific way to build the default binaries."""
+ if lldb.skip_build_and_cleanup:
+ return
+ module = builder_module()
+ if target_is_android():
+ dictionary = append_android_envs(dictionary)
+ if self.debug_info is None:
+ return self.buildDefault(architecture, compiler, dictionary, clean)
+ elif self.debug_info == "dsym":
+ return self.buildDsym(architecture, compiler, dictionary, clean)
+ elif self.debug_info == "dwarf":
+ return self.buildDwarf(architecture, compiler, dictionary, clean)
+
# =================================================
# Misc. helper methods for debugging test execution
# =================================================
diff --git a/lldb/test/logging/TestLogging.py b/lldb/test/logging/TestLogging.py
index f8e995c..a76c149 100644
--- a/lldb/test/logging/TestLogging.py
+++ b/lldb/test/logging/TestLogging.py
@@ -13,23 +13,18 @@
append_log_file = "lldb-commands-log-append.txt"
truncate_log_file = "lldb-commands-log-truncate.txt"
-
@classmethod
def classCleanup(cls):
"""Cleanup the test byproducts."""
cls.RemoveTempFile(cls.truncate_log_file)
cls.RemoveTempFile(cls.append_log_file)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym (self):
- self.buildDsym ()
- self.command_log_tests ("dsym")
-
- @dwarf_test
- def test_with_dwarf (self):
- self.buildDwarf ()
- self.command_log_tests ("dwarf")
+ def test (self):
+ self.build()
+ if self.debug_info == "dsym":
+ self.command_log_tests ("dsym")
+ else:
+ self.command_log_tests ("dwarf")
def command_log_tests (self, type):
exe = os.path.join (os.getcwd(), "a.out")
@@ -66,6 +61,7 @@
self.assertTrue(log_lines > 0, "Something was written to the log file.")
# Check that lldb truncates its log files
+ @no_debug_info_test
def test_log_truncate (self):
if (os.path.exists (self.truncate_log_file)):
os.remove (self.truncate_log_file)
@@ -87,6 +83,7 @@
self.assertTrue(string.find(contents, "bacon") == -1)
# Check that lldb can append to a log file
+ @no_debug_info_test
def test_log_append (self):
if (os.path.exists (self.append_log_file)):
os.remove (self.append_log_file)
@@ -106,7 +103,6 @@
# check that it is still there
self.assertTrue(string.find(contents, "bacon") == 0)
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py b/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
index 29ab55e..3907e44 100644
--- a/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
+++ b/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
@@ -16,6 +16,7 @@
TestBase.setUp(self)
self.source = 'main.c'
+ @no_debug_info_test # Prevent the genaration of the dwarf version of this test
def test_add_dsym_mid_execution(self):
"""Test that add-dsym mid-execution loads the symbols at the right place for a slid binary."""
self.buildDsym(clean=True)
diff --git a/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py b/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py
index f2a21c6..3ff481f 100644
--- a/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py
+++ b/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py
@@ -20,26 +20,11 @@
if not self.getCompiler().endswith('clang'):
self.skipTest("clang compiler only test")
- self.buildDefault()
- self.apple_types(dot_o=True)
-
- @skipUnlessDarwin
- def test_debug_info_for_apple_types_dsym(self):
- """Test that __apple_types section does get produced by dsymutil.
- This is supposed to succeed even with rdar://problem/11166975."""
-
- if not self.getCompiler().endswith('clang'):
- self.skipTest("clang compiler only test")
-
- self.buildDsym()
- self.apple_types(dot_o=False)
-
- def apple_types(self, dot_o):
- """Test that __apple_types section does get produced by clang."""
- if dot_o:
- exe = os.path.join(os.getcwd(), "main.o")
- else:
+ self.build()
+ if self.debug_info == "dsym":
exe = os.path.join(os.getcwd(), "a.out.dSYM/Contents/Resources/DWARF/a.out")
+ else:
+ exe = os.path.join(os.getcwd(), "main.o")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
diff --git a/lldb/test/macosx/indirect_symbol/TestIndirectSymbols.py b/lldb/test/macosx/indirect_symbol/TestIndirectSymbols.py
index e92b3c4..c28d047 100644
--- a/lldb/test/macosx/indirect_symbol/TestIndirectSymbols.py
+++ b/lldb/test/macosx/indirect_symbol/TestIndirectSymbols.py
@@ -10,30 +10,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test stepping and setting breakpoints in indirect and re-exported symbols."""
- self.buildDsym()
- self.indirect_stepping()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test stepping and setting breakpoints in indirect and re-exported symbols."""
- self.buildDwarf()
- self.indirect_stepping()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line numbers that we will step to in main:
self.main_source = "main.c"
- def indirect_stepping(self):
+ @skipUnlessDarwin
+ @python_api_test
+ def test_with_python_api(self):
"""Test stepping and setting breakpoints in indirect and re-exported symbols."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/macosx/order/TestOrderFile.py b/lldb/test/macosx/order/TestOrderFile.py
index 1e25e03..d8b7f37 100644
--- a/lldb/test/macosx/order/TestOrderFile.py
+++ b/lldb/test/macosx/order/TestOrderFile.py
@@ -13,21 +13,9 @@
mydir = TestBase.compute_mydir(__file__)
@skipUnlessDarwin
- @dsym_test
- def test_with_dsym(self):
+ def test(self):
"""Test debug symbols follow the correct order by the order file."""
- self.buildDsym()
- self.order_file()
-
- @skipUnlessDarwin
- @dwarf_test
- def test_with_dwarf(self):
- """Test debug symbols follow the correct order by the order file."""
- self.buildDwarf()
- self.order_file()
-
- def order_file(self):
- """Test debug symbols follow the correct order by the order file."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -44,7 +32,6 @@
self.runCmd("run", RUN_COMPLETED)
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/macosx/queues/TestQueues.py b/lldb/test/macosx/queues/TestQueues.py
index c6c7db6..d4f3ba9 100644
--- a/lldb/test/macosx/queues/TestQueues.py
+++ b/lldb/test/macosx/queues/TestQueues.py
@@ -12,19 +12,9 @@
@skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
+ def test_with_python_api(self):
"""Test queues inspection SB APIs."""
- self.buildDsym()
- self.queues()
- self.queues_with_libBacktraceRecording()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test queues inspection SB APIs."""
- self.buildDwarf()
+ self.build()
self.queues()
self.queues_with_libBacktraceRecording()
diff --git a/lldb/test/macosx/safe-to-func-call/TestSafeFuncCalls.py b/lldb/test/macosx/safe-to-func-call/TestSafeFuncCalls.py
index 73ae892..8299bd2 100644
--- a/lldb/test/macosx/safe-to-func-call/TestSafeFuncCalls.py
+++ b/lldb/test/macosx/safe-to-func-call/TestSafeFuncCalls.py
@@ -10,41 +10,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_python_api(self):
- """Test function call thread safety."""
- self.buildDsym()
- self.function_call_safety_check()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_python_api(self):
- """Test function call thread safety."""
- self.buildDwarf()
- self.function_call_safety_check()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line numbers that we will step to in main:
self.main_source = "main.c"
-
-
- def check_number_of_threads(self, process):
- self.assertTrue(process.GetNumThreads() == 2, "Check that the process has two threads when sitting at the stopper() breakpoint")
-
- def safe_to_call_func_on_main_thread (self, main_thread):
- self.assertTrue(main_thread.SafeToCallFunctions() == True, "It is safe to call functions on the main thread")
-
- def safe_to_call_func_on_select_thread (self, select_thread):
- self.assertTrue(select_thread.SafeToCallFunctions() == False, "It is not safe to call functions on the select thread")
-
- def function_call_safety_check(self):
- """Test function call safety checks"""
+ @skipUnlessDarwin
+ @python_api_test
+ def test_with_python_api(self):
+ """Test function call thread safety."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -74,6 +50,15 @@
self.safe_to_call_func_on_main_thread (main_thread)
self.safe_to_call_func_on_select_thread (select_thread)
+ def check_number_of_threads(self, process):
+ self.assertTrue(process.GetNumThreads() == 2, "Check that the process has two threads when sitting at the stopper() breakpoint")
+
+ def safe_to_call_func_on_main_thread (self, main_thread):
+ self.assertTrue(main_thread.SafeToCallFunctions() == True, "It is safe to call functions on the main thread")
+
+ def safe_to_call_func_on_select_thread (self, select_thread):
+ self.assertTrue(select_thread.SafeToCallFunctions() == False, "It is not safe to call functions on the select thread")
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/macosx/universal/TestUniversal.py b/lldb/test/macosx/universal/TestUniversal.py
index 9c2c789..7c3decf 100644
--- a/lldb/test/macosx/universal/TestUniversal.py
+++ b/lldb/test/macosx/universal/TestUniversal.py
@@ -23,7 +23,7 @@
def test_sbdebugger_create_target_with_file_and_target_triple(self):
"""Test the SBDebugger.CreateTargetWithFileAndTargetTriple() API."""
# Invoke the default build rule.
- self.buildDefault()
+ self.build()
# Note that "testit" is a universal binary.
exe = os.path.join(os.getcwd(), "testit")
@@ -44,7 +44,7 @@
from lldbutil import print_registers
# Invoke the default build rule.
- self.buildDefault()
+ self.build()
# Note that "testit" is a universal binary.
exe = os.path.join(os.getcwd(), "testit")
diff --git a/lldb/test/python_api/breakpoint/TestBreakpointAPI.py b/lldb/test/python_api/breakpoint/TestBreakpointAPI.py
index 0a4e7fa..764fe22 100644
--- a/lldb/test/python_api/breakpoint/TestBreakpointAPI.py
+++ b/lldb/test/python_api/breakpoint/TestBreakpointAPI.py
@@ -12,27 +12,10 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_breakpoint_is_valid_with_dsym(self):
+ def test_breakpoint_is_valid(self):
"""Make sure that if an SBBreakpoint gets deleted its IsValid returns false."""
- self.buildDsym()
- self.breakpoint_is_valid()
-
- @python_api_test
- @dwarf_test
- def test_breakpoint_is_valid_with_dwarf(self):
- """Make sure that if an SBBreakpoint gets deleted its IsValid returns false."""
- self.buildDwarf()
- self.breakpoint_is_valid ()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def breakpoint_is_valid(self):
- """Get an SBBreakpoint object, delete it from the target and make sure it is no longer valid."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/python_api/class_members/TestSBTypeClassMembers.py b/lldb/test/python_api/class_members/TestSBTypeClassMembers.py
index c3af671..1361c78 100644
--- a/lldb/test/python_api/class_members/TestSBTypeClassMembers.py
+++ b/lldb/test/python_api/class_members/TestSBTypeClassMembers.py
@@ -12,26 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym(self):
- """Test SBType APIs to fetch member function types."""
- d = {'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.type_api(self.exe_name)
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_with_dwarf(self):
- """Test SBType APIs to fetch member function types."""
- d = {'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.type_api(self.exe_name)
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -41,9 +21,14 @@
self.source = 'main.mm'
self.line = line_number(self.source, '// set breakpoint here')
- def type_api(self, exe_name):
+ @skipUnlessDarwin
+ @python_api_test
+ def test(self):
"""Test SBType APIs to fetch member function types."""
- exe = os.path.join(os.getcwd(), exe_name)
+ d = {'EXE': self.exe_name}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+ exe = os.path.join(os.getcwd(), self.exe_name)
# Create a target by the debugger.
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/python_api/debugger/TestDebuggerAPI.py b/lldb/test/python_api/debugger/TestDebuggerAPI.py
index 42dcc24..add7ead 100644
--- a/lldb/test/python_api/debugger/TestDebuggerAPI.py
+++ b/lldb/test/python_api/debugger/TestDebuggerAPI.py
@@ -4,7 +4,7 @@
import os
import lldb
-from lldbtest import TestBase, python_api_test
+from lldbtest import *
class DebuggerAPITestCase(TestBase):
@@ -12,6 +12,7 @@
mydir = TestBase.compute_mydir(__file__)
@python_api_test
+ @no_debug_info_test
def test_debugger_api_boundary_condition(self):
"""Exercise SBDebugger APIs with boundary conditions."""
self.dbg.HandleCommand(None)
diff --git a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
index 846e5fe..147ad8a 100644
--- a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
+++ b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
@@ -22,6 +22,7 @@
mydir = TestBase.compute_mydir(__file__)
@python_api_test
+ @no_debug_info_test
def test_SBAddress(self):
obj = lldb.SBAddress()
if self.TraceOn():
@@ -32,6 +33,7 @@
sb_address.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBBlock(self):
obj = lldb.SBBlock()
if self.TraceOn():
@@ -42,6 +44,7 @@
sb_block.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBBreakpoint(self):
obj = lldb.SBBreakpoint()
if self.TraceOn():
@@ -52,6 +55,7 @@
sb_breakpoint.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBBreakpointLocation(self):
obj = lldb.SBBreakpointLocation()
if self.TraceOn():
@@ -62,6 +66,7 @@
sb_breakpointlocation.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBBroadcaster(self):
obj = lldb.SBBroadcaster()
if self.TraceOn():
@@ -72,6 +77,7 @@
sb_broadcaster.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBCommandReturnObject(self):
"""SBCommandReturnObject object is valid after default construction."""
obj = lldb.SBCommandReturnObject()
@@ -80,6 +86,7 @@
self.assertTrue(obj)
@python_api_test
+ @no_debug_info_test
def test_SBCommunication(self):
obj = lldb.SBCommunication()
if self.TraceOn():
@@ -90,6 +97,7 @@
sb_communication.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBCompileUnit(self):
obj = lldb.SBCompileUnit()
if self.TraceOn():
@@ -100,6 +108,7 @@
sb_compileunit.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBDebugger(self):
obj = lldb.SBDebugger()
if self.TraceOn():
@@ -110,6 +119,7 @@
sb_debugger.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
# darwin: This test passes with swig 3.0.2, fails w/3.0.5 other tests fail with 2.0.12 http://llvm.org/pr23488
def test_SBError(self):
obj = lldb.SBError()
@@ -121,6 +131,7 @@
sb_error.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBEvent(self):
obj = lldb.SBEvent()
# This is just to test that typemap, as defined in lldb.swig, works.
@@ -145,6 +156,7 @@
sb_filespec.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBFrame(self):
obj = lldb.SBFrame()
if self.TraceOn():
@@ -155,6 +167,7 @@
sb_frame.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBFunction(self):
obj = lldb.SBFunction()
if self.TraceOn():
@@ -165,6 +178,7 @@
sb_function.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBInstruction(self):
obj = lldb.SBInstruction()
if self.TraceOn():
@@ -175,6 +189,7 @@
sb_instruction.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBInstructionList(self):
obj = lldb.SBInstructionList()
if self.TraceOn():
@@ -185,6 +200,7 @@
sb_instructionlist.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBLineEntry(self):
obj = lldb.SBLineEntry()
if self.TraceOn():
@@ -195,6 +211,7 @@
sb_lineentry.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBListener(self):
obj = lldb.SBListener()
if self.TraceOn():
@@ -205,6 +222,7 @@
sb_listener.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBModule(self):
obj = lldb.SBModule()
if self.TraceOn():
@@ -215,6 +233,7 @@
sb_module.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBProcess(self):
obj = lldb.SBProcess()
if self.TraceOn():
@@ -225,6 +244,7 @@
sb_process.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBSection(self):
obj = lldb.SBSection()
if self.TraceOn():
@@ -235,6 +255,7 @@
sb_section.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBStream(self):
"""SBStream object is valid after default construction."""
obj = lldb.SBStream()
@@ -243,6 +264,7 @@
self.assertTrue(obj)
@python_api_test
+ @no_debug_info_test
def test_SBStringList(self):
obj = lldb.SBStringList()
if self.TraceOn():
@@ -253,6 +275,7 @@
sb_stringlist.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBSymbol(self):
obj = lldb.SBSymbol()
if self.TraceOn():
@@ -263,6 +286,7 @@
sb_symbol.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBSymbolContext(self):
obj = lldb.SBSymbolContext()
if self.TraceOn():
@@ -273,6 +297,7 @@
sb_symbolcontext.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBSymbolContextList(self):
"""SBSymbolContextList object is valid after default construction."""
obj = lldb.SBSymbolContextList()
@@ -281,6 +306,7 @@
self.assertTrue(obj)
@python_api_test
+ @no_debug_info_test
def test_SBTarget(self):
obj = lldb.SBTarget()
if self.TraceOn():
@@ -291,6 +317,7 @@
sb_target.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBThread(self):
obj = lldb.SBThread()
if self.TraceOn():
@@ -301,6 +328,7 @@
sb_thread.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBType(self):
try:
obj = lldb.SBType()
@@ -319,6 +347,7 @@
sb_type.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBTypeList(self):
"""SBTypeList object is valid after default construction."""
obj = lldb.SBTypeList()
@@ -327,6 +356,7 @@
self.assertTrue(obj)
@python_api_test
+ @no_debug_info_test
def test_SBValue(self):
obj = lldb.SBValue()
if self.TraceOn():
@@ -337,6 +367,7 @@
sb_value.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBValueList(self):
obj = lldb.SBValueList()
if self.TraceOn():
@@ -347,6 +378,7 @@
sb_valuelist.fuzz_obj(obj)
@python_api_test
+ @no_debug_info_test
def test_SBWatchpoint(self):
obj = lldb.SBWatchpoint()
if self.TraceOn():
diff --git a/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py b/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
index 4a9cd7a..51da105 100644
--- a/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
+++ b/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
@@ -13,14 +13,10 @@
mydir = TestBase.compute_mydir(__file__)
@python_api_test
+ @no_debug_info_test
def test_disassemble_raw_data(self):
"""Test disassembling raw bytes with the API."""
- self.disassemble_raw_data()
-
- def disassemble_raw_data(self):
- """Test disassembling raw bytes with the API."""
# Create a target from the debugger.
-
target = self.dbg.CreateTargetWithFileAndTargetTriple ("", "x86_64")
self.assertTrue(target, VALID_TARGET)
diff --git a/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py b/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
index 3a7a0cb..4bd4367 100644
--- a/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
+++ b/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
@@ -14,14 +14,10 @@
@skipIf(True) # llvm.org/pr24575: all tests get ERRORs in dotest.py after this
@python_api_test
+ @no_debug_info_test
def test_disassemble_invalid_vst_1_64_raw_data(self):
"""Test disassembling invalid vst1.64 raw bytes with the API."""
- self.disassemble_invalid_vst_1_64_raw_data()
-
- def disassemble_invalid_vst_1_64_raw_data(self):
- """Test disassembling invalid vst1.64 raw bytes with the API."""
# Create a target from the debugger.
-
target = self.dbg.CreateTargetWithFileAndTargetTriple ("", "thumbv7")
self.assertTrue(target, VALID_TARGET)
diff --git a/lldb/test/python_api/event/TestEvents.py b/lldb/test/python_api/event/TestEvents.py
index 46841a8..cc74408 100644
--- a/lldb/test/python_api/event/TestEvents.py
+++ b/lldb/test/python_api/event/TestEvents.py
@@ -12,64 +12,18 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_listen_for_and_print_event_with_dsym(self):
- """Exercise SBEvent API."""
- self.buildDsym()
- self.do_listen_for_and_print_event()
-
- @python_api_test
- @dwarf_test
- @expectedFailureLinux("llvm.org/pr23730") # Flaky, fails ~1/10 cases
- @skipIfLinux # skip to avoid crashes
- def test_listen_for_and_print_event_with_dwarf(self):
- """Exercise SBEvent API."""
- self.buildDwarf()
- self.do_listen_for_and_print_event()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_wait_for_event_with_dsym(self):
- """Exercise SBListener.WaitForEvent() API."""
- self.buildDsym()
- self.do_wait_for_event()
-
- @python_api_test
- @dwarf_test
- def test_wait_for_event_with_dwarf(self):
- """Exercise SBListener.WaitForEvent() API."""
- self.buildDwarf()
- self.do_wait_for_event()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_add_listener_to_broadcaster_with_dsym(self):
- """Exercise some SBBroadcaster APIs."""
- self.buildDsym()
- self.do_add_listener_to_broadcaster()
-
- @skipIfFreeBSD # llvm.org/pr21325
- @python_api_test
- @dwarf_test
- @expectedFlakeyLinux("llvm.org/pr23617") # Flaky, fails ~1/10 cases
- @expectedFailureWindows("llvm.org/pr24778")
- def test_add_listener_to_broadcaster_with_dwarf(self):
- """Exercise some SBBroadcaster APIs."""
- self.buildDwarf()
- self.do_add_listener_to_broadcaster()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to of function 'c'.
self.line = line_number('main.c', '// Find the line number of function "c" here.')
- def do_listen_for_and_print_event(self):
- """Create a listener and use SBEvent API to print the events received."""
+ @python_api_test
+ @expectedFailureLinux("llvm.org/pr23730") # Flaky, fails ~1/10 cases
+ @skipIfLinux # skip to avoid crashes
+ def test_listen_for_and_print_event(self):
+ """Exercise SBEvent API."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.dbg.SetAsync(True)
@@ -143,8 +97,10 @@
# Wait until the 'MyListeningThread' terminates.
my_thread.join()
- def do_wait_for_event(self):
- """Get the listener associated with the debugger and exercise WaitForEvent API."""
+ @python_api_test
+ def test_wait_for_event(self):
+ """Exercise SBListener.WaitForEvent() API."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.dbg.SetAsync(True)
@@ -212,8 +168,13 @@
self.assertTrue(event,
"My listening thread successfully received an event")
- def do_add_listener_to_broadcaster(self):
- """Get the broadcaster associated with the process and wait for broadcaster events."""
+ @skipIfFreeBSD # llvm.org/pr21325
+ @python_api_test
+ @expectedFlakeyLinux("llvm.org/pr23617") # Flaky, fails ~1/10 cases
+ @expectedFailureWindows("llvm.org/pr24778")
+ def test_add_listener_to_broadcaster(self):
+ """Exercise some SBBroadcaster APIs."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.dbg.SetAsync(True)
@@ -320,7 +281,6 @@
self.assertTrue(self.state == 'stopped',
"Both expected state changed events received")
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/python_api/findvalue_duplist/TestSBFrameFindValue.py b/lldb/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
index 41d782e..a2a433f 100644
--- a/lldb/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
+++ b/lldb/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
@@ -10,29 +10,12 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_with_dsym_formatters_api(self):
+ def test_formatters_api(self):
"""Test that SBFrame::FindValue finds things but does not duplicate the entire variables list"""
- self.buildDsym()
+ self.build()
self.setTearDownCleanup()
- self.commands()
- @python_api_test
- @dwarf_test
- def test_with_dwarf_formatters_api(self):
- """Test that SBFrame::FindValue finds things but does not duplicate the entire variables list"""
- self.buildDwarf()
- self.setTearDownCleanup()
- self.commands()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def commands(self):
- """Test that SBFrame::FindValue finds things but does not duplicate the entire variables list"""
exe_name = "a.out"
exe = os.path.join(os.getcwd(), exe_name)
diff --git a/lldb/test/python_api/formatters/TestFormattersSBAPI.py b/lldb/test/python_api/formatters/TestFormattersSBAPI.py
index 68a07a1..804f504 100644
--- a/lldb/test/python_api/formatters/TestFormattersSBAPI.py
+++ b/lldb/test/python_api/formatters/TestFormattersSBAPI.py
@@ -10,36 +10,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_formatters_api(self):
- """Test Python APIs for working with formatters"""
- self.buildDsym()
- self.setTearDownCleanup()
- self.formatters()
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf_formatters_api(self):
- """Test Python APIs for working with formatters"""
- self.buildDwarf()
- self.setTearDownCleanup()
- self.formatters()
-
- @python_api_test
- def test_force_synth_off(self):
- """Test that one can have the public API return non-synthetic SBValues if desired"""
- self.buildDwarf(dictionary={'EXE':'no_synth'})
- self.setTearDownCleanup()
- self.force_synth_off()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
self.line = line_number('main.cpp', '// Set break point at this line.')
- def formatters(self):
+ @python_api_test
+ def test_formatters_api(self):
+ """Test Python APIs for working with formatters"""
+ self.build()
+ self.setTearDownCleanup()
+
"""Test Python APIs for working with formatters"""
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
@@ -307,8 +288,12 @@
self.expect("frame variable e2", substrs=["I am an empty Empty2"])
self.expect("frame variable e2", substrs=["I am an empty Empty2 {}"], matching=False)
- def force_synth_off(self):
+ @python_api_test
+ def test_force_synth_off(self):
"""Test that one can have the public API return non-synthetic SBValues if desired"""
+ self.build(dictionary={'EXE':'no_synth'})
+ self.setTearDownCleanup()
+
self.runCmd("file no_synth", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/python_api/frame/TestFrames.py b/lldb/test/python_api/frame/TestFrames.py
index bcde045..6519211 100644
--- a/lldb/test/python_api/frame/TestFrames.py
+++ b/lldb/test/python_api/frame/TestFrames.py
@@ -13,36 +13,11 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_get_arg_vals_for_call_stack_with_dsym(self):
- """Exercise SBFrame.GetVariables() API to get argument vals."""
- self.buildDsym()
- self.do_get_arg_vals()
-
- @python_api_test
- @dwarf_test
@expectedFailureWindows("llvm.org/pr24778")
- def test_get_arg_vals_for_call_stack_with_dwarf(self):
+ def test_get_arg_vals_for_call_stack(self):
"""Exercise SBFrame.GetVariables() API to get argument vals."""
- self.buildDwarf()
- self.do_get_arg_vals()
-
- @python_api_test
- def test_frame_api_boundary_condition(self):
- """Exercise SBFrame APIs with boundary condition inputs."""
- self.buildDefault()
- self.frame_api_boundary_condition()
-
- @python_api_test
- def test_frame_api_IsEqual(self):
- """Exercise SBFrame API IsEqual."""
- self.buildDefault()
- self.frame_api_IsEqual()
-
- def do_get_arg_vals(self):
- """Get argument vals for the call stack when stopped on a breakpoint."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
@@ -128,7 +103,10 @@
substrs = ["a((int)val=1, (char)ch='A')",
"a((int)val=3, (char)ch='A')"])
- def frame_api_boundary_condition(self):
+ @python_api_test
+ def test_frame_api_boundary_condition(self):
+ """Exercise SBFrame APIs with boundary condition inputs."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
@@ -164,8 +142,10 @@
frame.EvaluateExpression(None)
- def frame_api_IsEqual(self):
+ @python_api_test
+ def test_frame_api_IsEqual(self):
"""Exercise SBFrame API IsEqual."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/python_api/frame/inlines/TestInlinedFrame.py b/lldb/test/python_api/frame/inlines/TestInlinedFrame.py
index 217b87e..98bd8e6 100644
--- a/lldb/test/python_api/frame/inlines/TestInlinedFrame.py
+++ b/lldb/test/python_api/frame/inlines/TestInlinedFrame.py
@@ -12,23 +12,7 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_stop_at_outer_inline_with_dsym(self):
- """Exercise SBFrame.IsInlined() and SBFrame.GetFunctionName()."""
- self.buildDsym()
- self.do_stop_at_outer_inline()
-
- @python_api_test
- @dwarf_test
- def test_stop_at_outer_inline_with_dwarf(self):
- """Exercise SBFrame.IsInlined() and SBFrame.GetFunctionName()."""
- self.buildDwarf()
- self.do_stop_at_outer_inline()
-
def setUp(self):
-
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to of function 'c'.
@@ -36,8 +20,10 @@
self.first_stop = line_number(self.source, '// This should correspond to the first break stop.')
self.second_stop = line_number(self.source, '// This should correspond to the second break stop.')
- def do_stop_at_outer_inline(self):
+ @python_api_test
+ def test_stop_at_outer_inline(self):
"""Exercise SBFrame.IsInlined() and SBFrame.GetFunctionName()."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/python_api/function_symbol/TestDisasmAPI.py b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
index d7270ba..c8e079f 100644
--- a/lldb/test/python_api/function_symbol/TestDisasmAPI.py
+++ b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
@@ -12,21 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym(self):
- """Exercise getting SBAddress objects, disassembly, and SBAddress APIs."""
- self.buildDsym()
- self.disasm_and_address_api()
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf(self):
- """Exercise getting SBAddress objects, disassembly, and SBAddress APIs."""
- self.buildDwarf()
- self.disasm_and_address_api()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -34,8 +19,10 @@
self.line1 = line_number('main.c', '// Find the line number for breakpoint 1 here.')
self.line2 = line_number('main.c', '// Find the line number for breakpoint 2 here.')
- def disasm_and_address_api(self):
+ @python_api_test
+ def test(self):
"""Exercise getting SBAddress objects, disassembly, and SBAddress APIs."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
@@ -119,7 +106,6 @@
self.assertTrue(desc1 and desc2 and desc1 == desc2,
"SBAddress.GetDescription() API of sa1 and sa2 should return the same string")
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/python_api/function_symbol/TestSymbolAPI.py b/lldb/test/python_api/function_symbol/TestSymbolAPI.py
index 6a59ee3..b363c1a 100644
--- a/lldb/test/python_api/function_symbol/TestSymbolAPI.py
+++ b/lldb/test/python_api/function_symbol/TestSymbolAPI.py
@@ -12,22 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym(self):
- """Exercise some SBSymbol and SBAddress APIs."""
- self.buildDsym()
- self.symbol_and_address_api()
-
- @python_api_test
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr24778")
- def test_with_dwarf(self):
- """Exercise some SBSymbol and SBAddress APIs."""
- self.buildDwarf()
- self.symbol_and_address_api()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -35,8 +19,11 @@
self.line1 = line_number('main.c', '// Find the line number for breakpoint 1 here.')
self.line2 = line_number('main.c', '// Find the line number for breakpoint 2 here.')
- def symbol_and_address_api(self):
+ @python_api_test
+ @expectedFailureWindows("llvm.org/pr24778")
+ def test(self):
"""Exercise some SBSymbol and SBAddress APIs."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/python_api/hello_world/TestHelloWorld.py b/lldb/test/python_api/hello_world/TestHelloWorld.py
index e9cd778..8e586c8 100644
--- a/lldb/test/python_api/hello_world/TestHelloWorld.py
+++ b/lldb/test/python_api/hello_world/TestHelloWorld.py
@@ -9,82 +9,7 @@
class HelloWorldTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_process_launch_api(self):
- """Create target, breakpoint, launch a process, and then kill it.
-
- Use dsym info and process launch API.
- """
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_world_python()
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_process_launch_api(self):
- """Create target, breakpoint, launch a process, and then kill it.
-
- Use dwarf debug map and process launch API.
- """
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_world_python()
-
- @not_remote_testsuite_ready
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_attach_to_process_with_id_api(self):
- """Create target, spawn a process, and attach to it with process id.
-
- Use dsym info and attach to process with id API.
- """
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_world_attach_with_id_api()
-
- @python_api_test
- @dwarf_test
- @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly
- @expectedFailureWindows("llvm.org/pr24600")
- def test_with_dwarf_and_attach_to_process_with_id_api(self):
- """Create target, spawn a process, and attach to it with process id.
-
- Use dwarf map (no dsym) and attach to process with id API.
- """
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_world_attach_with_id_api()
-
- @not_remote_testsuite_ready
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_attach_to_process_with_name_api(self):
- """Create target, spawn a process, and attach to it with process name.
-
- Use dsym info and attach to process with name API.
- """
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_world_attach_with_name_api()
-
- @python_api_test
- @dwarf_test
- @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly
- @expectedFailureWindows("llvm.org/pr24600")
- def test_with_dwarf_and_attach_to_process_with_name_api(self):
- """Create target, spawn a process, and attach to it with process name.
-
- Use dwarf map (no dsym) and attach to process with name API.
- """
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.hello_world_attach_with_name_api()
-
+
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -101,9 +26,11 @@
# Call super's tearDown().
TestBase.tearDown(self)
- def hello_world_python(self):
+ @python_api_test
+ def test_with_process_launch_api(self):
"""Create target, breakpoint, launch a process, and then kill it."""
-
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
target = self.dbg.CreateTarget(self.exe)
breakpoint = target.BreakpointCreateByLocation("main.c", self.line1)
@@ -142,9 +69,13 @@
# The breakpoint should have a hit count of 1.
self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE)
- def hello_world_attach_with_id_api(self):
- """Create target, spawn a process, and attach to it by id."""
-
+ @python_api_test
+ @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly
+ @expectedFailureWindows("llvm.org/pr24600")
+ def test_with_attach_to_process_with_id_api(self):
+ """Create target, spawn a process, and attach to it with process id."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
target = self.dbg.CreateTarget(self.exe)
# Spawn a new process
@@ -167,9 +98,13 @@
substrs = ['main.c:%d' % self.line2,
'(int)argc=3'])
- def hello_world_attach_with_name_api(self):
- """Create target, spawn a process, and attach to it by name."""
-
+ @python_api_test
+ @expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly
+ @expectedFailureWindows("llvm.org/pr24600")
+ def test_with_attach_to_process_with_name_api(self):
+ """Create target, spawn a process, and attach to it with process name."""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
target = self.dbg.CreateTarget(self.exe)
# Spawn a new process
@@ -205,7 +140,6 @@
substrs = ['main.c:%d' % self.line2,
'(int)argc=3'])
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py b/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py
index c57535c..b617a61 100644
--- a/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py
+++ b/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py
@@ -9,29 +9,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_process_launch_api(self):
- """Test the SBCommandInterpreter APIs."""
- self.buildDsym()
- self.command_interpreter_api()
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_process_launch_api(self):
- """Test the SBCommandInterpreter APIs."""
- self.buildDwarf()
- self.command_interpreter_api()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break on inside main.cpp.
self.line = line_number('main.c', 'Hello world.')
- def command_interpreter_api(self):
+ @python_api_test
+ def test_with_process_launch_api(self):
"""Test the SBCommandInterpreter APIs."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py b/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py
index 22db4a4..4b0c460 100644
--- a/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py
+++ b/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py
@@ -21,10 +21,7 @@
@python_api_test
def test_frame_utils(self):
"""Test utility functions for the frame object."""
- self.buildDefault()
- self.frame_utils()
-
- def frame_utils(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
index 4d32d6d..124f703 100644
--- a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
+++ b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
@@ -22,22 +22,7 @@
@python_api_test
def test_lldb_iter_module(self):
"""Test module_iter works correctly for SBTarget -> SBModule."""
- self.buildDefault()
- self.lldb_iter_module()
-
- @python_api_test
- def test_lldb_iter_breakpoint(self):
- """Test breakpoint_iter works correctly for SBTarget -> SBBreakpoint."""
- self.buildDefault()
- self.lldb_iter_breakpoint()
-
- @python_api_test
- def test_lldb_iter_frame(self):
- """Test iterator works correctly for SBProcess->SBThread->SBFrame."""
- self.buildDefault()
- self.lldb_iter_frame()
-
- def lldb_iter_module(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -68,7 +53,10 @@
self.assertTrue(yours[i] == mine[i],
"UUID+FileSpec of yours[{0}] and mine[{0}] matches".format(i))
- def lldb_iter_breakpoint(self):
+ @python_api_test
+ def test_lldb_iter_breakpoint(self):
+ """Test breakpoint_iter works correctly for SBTarget -> SBBreakpoint."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -97,7 +85,10 @@
self.assertTrue(yours[i] == mine[i],
"ID of yours[{0}] and mine[{0}] matches".format(i))
- def lldb_iter_frame(self):
+ @python_api_test
+ def test_lldb_iter_frame(self):
+ """Test iterator works correctly for SBProcess->SBThread->SBFrame."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
index 4dc5dbe..32d660e 100644
--- a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
+++ b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
@@ -22,10 +22,7 @@
@expectedFailureWindows # Test crashes
def test_iter_registers(self):
"""Test iterator works correctly for lldbutil.iter_registers()."""
- self.buildDefault()
- self.iter_registers()
-
- def iter_registers(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py b/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py
index cd13d68..09945f5 100644
--- a/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py
+++ b/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py
@@ -23,12 +23,7 @@
@python_api_test
def test_stack_traces(self):
"""Test SBprocess and SBThread APIs with printing of the stack traces."""
- self.buildDefault()
- self.break_and_print_stacktraces()
-
- def break_and_print_stacktraces(self):
- """Break at main.cpp:68 and do a threads dump"""
-
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/python_api/module_section/TestModuleAndSection.py b/lldb/test/python_api/module_section/TestModuleAndSection.py
index 44a242d..78e4b22 100644
--- a/lldb/test/python_api/module_section/TestModuleAndSection.py
+++ b/lldb/test/python_api/module_section/TestModuleAndSection.py
@@ -16,22 +16,7 @@
@python_api_test
def test_module_and_section(self):
"""Test module and section APIs."""
- self.buildDefault()
- self.module_and_section()
-
- @python_api_test
- def test_module_and_section_boundary_condition(self):
- """Test module and section APIs by passing None when it expects a Python string."""
- self.buildDefault()
- self.module_and_section_boundary_condition()
-
- @python_api_test
- def test_module_compile_unit_iter(self):
- """Test module's compile unit iterator APIs."""
- self.buildDefault()
- self.module_compile_unit_iter()
-
- def module_and_section(self):
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -68,7 +53,10 @@
print INDENT2 + str(sym)
print INDENT2 + "symbol type: %s" % symbol_type_to_str(sym.GetType())
- def module_and_section_boundary_condition(self):
+ @python_api_test
+ def test_module_and_section_boundary_condition(self):
+ """Test module and section APIs by passing None when it expects a Python string."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -106,7 +94,10 @@
if sec1:
sec1.FindSubSection(None)
- def module_compile_unit_iter(self):
+ @python_api_test
+ def test_module_compile_unit_iter(self):
+ """Test module's compile unit iterator APIs."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -131,7 +122,6 @@
for cu in exe_module.compile_unit_iter():
print cu
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/python_api/objc_type/TestObjCType.py b/lldb/test/python_api/objc_type/TestObjCType.py
index ba3687a..9b8e915 100644
--- a/lldb/test/python_api/objc_type/TestObjCType.py
+++ b/lldb/test/python_api/objc_type/TestObjCType.py
@@ -12,29 +12,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym(self):
- """Test SBType for ObjC classes."""
- self.buildDsym()
- self.objc_sbtype_test()
-
- @skipUnlessDarwin
- @python_api_test
- @dwarf_test
- def test_with_dwarf(self):
- """Test SBType for ObjC classes."""
- self.buildDwarf()
- self.objc_sbtype_test()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
self.line = line_number("main.m", '// Break at this line')
- def objc_sbtype_test(self):
- """Exercise SBType and SBTypeList API."""
+ @skipUnlessDarwin
+ @python_api_test
+ def test(self):
+ """Test SBType for ObjC classes."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/python_api/process/TestProcessAPI.py b/lldb/test/python_api/process/TestProcessAPI.py
index 6bc255a..0aaeca6 100644
--- a/lldb/test/python_api/process/TestProcessAPI.py
+++ b/lldb/test/python_api/process/TestProcessAPI.py
@@ -12,71 +12,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_read_memory_with_dsym(self):
- """Test Python SBProcess.ReadMemory() API."""
- self.buildDsym()
- self.read_memory()
-
- @python_api_test
- @dwarf_test
- def test_read_memory_with_dwarf(self):
- """Test Python SBProcess.ReadMemory() API."""
- self.buildDwarf()
- self.read_memory()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_write_memory_with_dsym(self):
- """Test Python SBProcess.WriteMemory() API."""
- self.buildDsym()
- self.write_memory()
-
- @python_api_test
- @dwarf_test
- def test_write_memory_with_dwarf(self):
- """Test Python SBProcess.WriteMemory() API."""
- self.buildDwarf()
- self.write_memory()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_access_my_int_with_dsym(self):
- """Test access 'my_int' using Python SBProcess.GetByteOrder() and other APIs."""
- self.buildDsym()
- self.access_my_int()
-
- @python_api_test
- @dwarf_test
- def test_access_my_int_with_dwarf(self):
- """Test access 'my_int' using Python SBProcess.GetByteOrder() and other APIs."""
- self.buildDwarf()
- self.access_my_int()
-
- @python_api_test
- def test_remote_launch(self):
- """Test SBProcess.RemoteLaunch() API with a process not in eStateConnected, and it should fail."""
- self.buildDefault()
- self.remote_launch_should_fail()
-
- @python_api_test
- def test_get_num_supported_hardware_watchpoints(self):
- """Test SBProcess.GetNumSupportedHardwareWatchpoints() API with a process."""
- self.buildDefault()
- self.get_num_supported_hardware_watchpoints()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break inside main().
self.line = line_number("main.cpp", "// Set break point at this line and check variable 'my_char'.")
- def read_memory(self):
+ @python_api_test
+ def test_read_memory(self):
"""Test Python SBProcess.ReadMemory() API."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -156,8 +101,10 @@
if my_uint32 != 12345:
self.fail("Result from SBProcess.ReadUnsignedFromMemory() does not match our expected output")
- def write_memory(self):
+ @python_api_test
+ def test_write_memory(self):
"""Test Python SBProcess.WriteMemory() API."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -206,8 +153,10 @@
exe=False,
startstr = 'a')
- def access_my_int(self):
+ @python_api_test
+ def test_access_my_int(self):
"""Test access 'my_int' using Python SBProcess.GetByteOrder() and other APIs."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -294,8 +243,10 @@
for i in new_bytes:
print "byte:", i
- def remote_launch_should_fail(self):
+ @python_api_test
+ def test_remote_launch(self):
"""Test SBProcess.RemoteLaunch() API with a process not in eStateConnected, and it should fail."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
target = self.dbg.CreateTarget(exe)
@@ -312,8 +263,10 @@
success = process.RemoteLaunch(None, None, None, None, None, None, 0, False, error)
self.assertTrue(not success, "RemoteLaunch() should fail for process state != eStateConnected")
- def get_num_supported_hardware_watchpoints(self):
+ @python_api_test
+ def test_get_num_supported_hardware_watchpoints(self):
"""Test SBProcess.GetNumSupportedHardwareWatchpoints() API with a process."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/python_api/process/io/TestProcessIO.py b/lldb/test/python_api/process/io/TestProcessIO.py
index 66ac0bd..9bd3b82 100644
--- a/lldb/test/python_api/process/io/TestProcessIO.py
+++ b/lldb/test/python_api/process/io/TestProcessIO.py
@@ -10,86 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_stdin_by_api_with_dsym(self):
- """Exercise SBProcess.PutSTDIN()."""
- self.buildDsym()
- self.do_stdin_by_api()
-
- @skipIfWindows # stdio manipulation unsupported on Windows
- @python_api_test
- @dwarf_test
- def test_stdin_by_api_with_dwarf(self):
- """Exercise SBProcess.PutSTDIN()."""
- self.buildDwarf()
- self.do_stdin_by_api()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_stdin_redirection_with_dsym(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDIN without specifying STDOUT or STDERR."""
- self.buildDsym()
- self.do_stdin_redirection()
-
- @skipIfWindows # stdio manipulation unsupported on Windows
- @python_api_test
- @dwarf_test
- def test_stdin_redirection_with_dwarf(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDIN without specifying STDOUT or STDERR."""
- self.buildDwarf()
- self.do_stdin_redirection()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_stdout_redirection_with_dsym(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT without specifying STDIN or STDERR."""
- self.buildDsym()
- self.do_stdout_redirection()
-
- @skipIfWindows # stdio manipulation unsupported on Windows
- @python_api_test
- @dwarf_test
- def test_stdout_redirection_with_dwarf(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT without specifying STDIN or STDERR."""
- self.buildDwarf()
- self.do_stdout_redirection()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_stderr_redirection_with_dsym(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDERR without specifying STDIN or STDOUT."""
- self.buildDsym()
- self.do_stderr_redirection()
-
- @skipIfWindows # stdio manipulation unsupported on Windows
- @python_api_test
- @dwarf_test
- def test_stderr_redirection_with_dwarf(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDERR without specifying STDIN or STDOUT."""
- self.buildDwarf()
- self.do_stderr_redirection()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_stdout_stderr_redirection_with_dsym(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT and STDERR without redirecting STDIN."""
- self.buildDsym()
- self.do_stdout_stderr_redirection()
-
- @skipIfWindows # stdio manipulation unsupported on Windows
- @python_api_test
- @dwarf_test
- def test_stdout_stderr_redirection_with_dwarf(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT and STDERR without redirecting STDIN."""
- self.buildDwarf()
- self.do_stdout_stderr_redirection()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -104,6 +24,64 @@
self.error_file = os.path.join(self.get_process_working_directory(), "error.txt")
self.lines = ["Line 1", "Line 2", "Line 3"]
+ @skipIfWindows # stdio manipulation unsupported on Windows
+ @python_api_test
+ def test_stdin_by_api(self):
+ """Exercise SBProcess.PutSTDIN()."""
+ self.build()
+ self.create_target()
+ self.run_process(True)
+ output = self.process.GetSTDOUT(1000)
+ self.check_process_output(output, output)
+
+ @skipIfWindows # stdio manipulation unsupported on Windows
+ @python_api_test
+ def test_stdin_redirection(self):
+ """Exercise SBLaunchInfo::AddOpenFileAction() for STDIN without specifying STDOUT or STDERR."""
+ self.build()
+ self.create_target()
+ self.redirect_stdin()
+ self.run_process(False)
+ output = self.process.GetSTDOUT(1000)
+ self.check_process_output(output, output)
+
+ @skipIfWindows # stdio manipulation unsupported on Windows
+ @python_api_test
+ def test_stdout_redirection(self):
+ """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT without specifying STDIN or STDERR."""
+ self.build()
+ self.create_target()
+ self.redirect_stdout()
+ self.run_process(True)
+ output = self.read_output_file_and_delete()
+ error = self.process.GetSTDOUT(1000)
+ self.check_process_output(output, error)
+
+ @skipIfWindows # stdio manipulation unsupported on Windows
+ @python_api_test
+ def test_stderr_redirection(self):
+ """Exercise SBLaunchInfo::AddOpenFileAction() for STDERR without specifying STDIN or STDOUT."""
+ self.build()
+ self.create_target()
+ self.redirect_stderr()
+ self.run_process(True)
+ output = self.process.GetSTDOUT(1000)
+ error = self.read_error_file_and_delete()
+ self.check_process_output(output, error)
+
+ @skipIfWindows # stdio manipulation unsupported on Windows
+ @python_api_test
+ def test_stdout_stderr_redirection(self):
+ """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT and STDERR without redirecting STDIN."""
+ self.build()
+ self.create_target()
+ self.redirect_stdout()
+ self.redirect_stderr()
+ self.run_process(True)
+ output = self.read_output_file_and_delete()
+ error = self.read_error_file_and_delete()
+ self.check_process_output(output, error)
+
# target_file - path on local file system or remote file system if running remote
# local_file - path on local system
def read_file_and_delete(self, target_file, local_file):
@@ -168,61 +146,6 @@
def redirect_stderr(self):
'''Redirect STDERR (file descriptor 2) to use our error.txt file'''
self.launch_info.AddOpenFileAction(2, self.error_file, False, True);
-
- def do_stdin_redirection(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDIN without specifying STDOUT or STDERR."""
- self.create_target()
- self.redirect_stdin()
- self.run_process(False)
- output = self.process.GetSTDOUT(1000)
- self.check_process_output(output, output)
-
- def do_stdout_redirection(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT without specifying STDIN or STDERR."""
- self.create_target()
- self.redirect_stdout()
- self.run_process(True)
- output = self.read_output_file_and_delete()
- error = self.process.GetSTDOUT(1000)
- self.check_process_output(output, error)
-
- def do_stderr_redirection(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDERR without specifying STDIN or STDOUT."""
- self.create_target()
- self.redirect_stderr()
- self.run_process(True)
- output = self.process.GetSTDOUT(1000)
- error = self.read_error_file_and_delete()
- self.check_process_output(output, error)
-
- def do_stdout_stderr_redirection(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT and STDERR without redirecting STDIN."""
- self.create_target()
- self.redirect_stdout()
- self.redirect_stderr()
- self.run_process(True)
- output = self.read_output_file_and_delete()
- error = self.read_error_file_and_delete()
- self.check_process_output(output, error)
-
- def do_stdin_stdout_stderr_redirection(self):
- """Exercise SBLaunchInfo::AddOpenFileAction() for STDIN, STDOUT and STDERR."""
- # Make the input.txt file to use
- self.create_target()
- self.redirect_stdin()
- self.redirect_stdout()
- self.redirect_stderr()
- self.run_process(True)
- output = self.read_output_file_and_delete()
- error = self.read_error_file_and_delete()
- self.check_process_output(output, error)
-
- def do_stdin_by_api(self):
- """Launch a process and use SBProcess.PutSTDIN() to write data to it."""
- self.create_target()
- self.run_process(True)
- output = self.process.GetSTDOUT(1000)
- self.check_process_output(output, output)
def run_process(self, put_stdin):
'''Run the process to completion and optionally put lines to STDIN via the API if "put_stdin" is True'''
diff --git a/lldb/test/python_api/rdar-12481949/Test-rdar-12481949.py b/lldb/test/python_api/rdar-12481949/Test-rdar-12481949.py
index 4905785..7f9fb1c 100644
--- a/lldb/test/python_api/rdar-12481949/Test-rdar-12481949.py
+++ b/lldb/test/python_api/rdar-12481949/Test-rdar-12481949.py
@@ -13,27 +13,15 @@
# test for rdar://problem/12481949
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1."""
- self.buildDsym()
- self.rdar12481949_commands()
-
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1."""
- self.buildDwarf()
- self.rdar12481949_commands()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- def rdar12481949_commands(self):
+ def test_with_run_command(self):
"""Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
diff --git a/lldb/test/python_api/sbdata/TestSBData.py b/lldb/test/python_api/sbdata/TestSBData.py
index cb4c6ae..f3fd65b 100644
--- a/lldb/test/python_api/sbdata/TestSBData.py
+++ b/lldb/test/python_api/sbdata/TestSBData.py
@@ -11,42 +11,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_run_command(self):
- """Test the SBData APIs."""
- self.buildDsym()
- self.data_api()
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_run_command(self):
- """Test the SBData APIs."""
- self.buildDwarf()
- self.data_api()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to break on inside main.cpp.
self.line = line_number('main.cpp', '// set breakpoint here')
- def assert_data(self, func, arg, expected):
- """ Asserts func(SBError error, arg) == expected. """
- error = lldb.SBError()
- result = func(error, arg)
- if not error.Success():
- stream = lldb.SBStream()
- error.GetDescription(stream)
- self.assertTrue(error.Success(),
- "%s(error, %s) did not succeed: %s" % (func.__name__,
- arg,
- stream.GetData()))
- self.assertTrue(expected == result, "%s(error, %s) == %s != %s" % (func.__name__, arg, result, expected))
-
- def data_api(self):
+ @python_api_test
+ def test_with_run_command(self):
"""Test the SBData APIs."""
+ self.build()
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
@@ -357,6 +331,19 @@
self.assertTrue( fabs(data2.double[1] - 6.28) < 0.5, 'read_data_helper failure: set double data2[1] = 6.28')
self.assertTrue( fabs(data2.double[2] - 2.71) < 0.5, 'read_data_helper failure: set double data2[2] = 2.71')
+ def assert_data(self, func, arg, expected):
+ """ Asserts func(SBError error, arg) == expected. """
+ error = lldb.SBError()
+ result = func(error, arg)
+ if not error.Success():
+ stream = lldb.SBStream()
+ error.GetDescription(stream)
+ self.assertTrue(error.Success(),
+ "%s(error, %s) did not succeed: %s" % (func.__name__,
+ arg,
+ stream.GetData()))
+ self.assertTrue(expected == result, "%s(error, %s) == %s != %s" % (func.__name__, arg, result, expected))
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/python_api/sbvalue_persist/TestSBValuePersist.py b/lldb/test/python_api/sbvalue_persist/TestSBValuePersist.py
index 165129f..a5881db 100644
--- a/lldb/test/python_api/sbvalue_persist/TestSBValuePersist.py
+++ b/lldb/test/python_api/sbvalue_persist/TestSBValuePersist.py
@@ -10,30 +10,12 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym(self):
- """Test SBValue::Persist"""
- self.buildDsym()
- self.setTearDownCleanup()
- self.doTest()
-
@python_api_test
@expectedFailureWindows("llvm.org/pr24772")
- @dwarf_test
- def test_with_dwarf(self):
+ def test(self):
"""Test SBValue::Persist"""
- self.buildDwarf()
+ self.build()
self.setTearDownCleanup()
- self.doTest()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- def doTest(self):
- """Test SBValue::Persist"""
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_source_regexp (self, "break here")
diff --git a/lldb/test/python_api/section/TestSectionAPI.py b/lldb/test/python_api/section/TestSectionAPI.py
index 6c7b4f5..10870a8 100755
--- a/lldb/test/python_api/section/TestSectionAPI.py
+++ b/lldb/test/python_api/section/TestSectionAPI.py
@@ -9,40 +9,16 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_get_target_byte_size_with_dsym(self):
- d = {'EXE': 'a.out'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- target = self.create_simple_target('a.out')
-
- # find the .data section of the main module
- data_section = self.find_data_section(target)
-
- self.assertEquals(data_section.target_byte_size, 1)
-
- @python_api_test
- @dwarf_test
- def test_get_target_byte_size_with_dwarf(self):
+ def test_get_target_byte_size(self):
d = {'EXE': 'b.out'}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
- target = self.create_simple_target('b.out')
-
- # find the .data section of the main module
- data_section = self.find_data_section(target)
-
- self.assertEquals(data_section.target_byte_size, 1)
-
- def create_simple_target(self, fn):
- exe = os.path.join(os.getcwd(), fn)
+ exe = os.path.join(os.getcwd(), 'b.out')
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
- return target
- def find_data_section(self, target):
+ # find the .data section of the main module
mod = target.GetModuleAtIndex(0)
data_section = None
for s in mod.sections:
@@ -59,9 +35,8 @@
break
self.assertIsNotNone(data_section)
- return data_section
+ self.assertEquals(data_section.target_byte_size, 1)
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/python_api/signals/TestSignalsAPI.py b/lldb/test/python_api/signals/TestSignalsAPI.py
index 7474f43..f8c3db8 100644
--- a/lldb/test/python_api/signals/TestSignalsAPI.py
+++ b/lldb/test/python_api/signals/TestSignalsAPI.py
@@ -16,7 +16,7 @@
@skipIfWindows # Windows doesn't have signals
def test_ignore_signal(self):
"""Test Python SBUnixSignals.Suppress/Stop/Notify() API."""
- self.buildDefault()
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/python_api/symbol-context/TestSymbolContext.py b/lldb/test/python_api/symbol-context/TestSymbolContext.py
index 5cf3e68..a92315e 100644
--- a/lldb/test/python_api/symbol-context/TestSymbolContext.py
+++ b/lldb/test/python_api/symbol-context/TestSymbolContext.py
@@ -12,30 +12,17 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym(self):
- """Exercise SBSymbolContext API extensively."""
- self.buildDsym()
- self.symbol_context()
-
- @python_api_test
- @dwarf_test
- @expectedFailureWindows("llvm.org/pr24778")
- def test_with_dwarf(self):
- """Exercise SBSymbolContext API extensively."""
- self.buildDwarf()
- self.symbol_context()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line number to of function 'c'.
self.line = line_number('main.c', '// Find the line number of function "c" here.')
- def symbol_context(self):
- """Get an SBSymbolContext object and call its many methods."""
+ @python_api_test
+ @expectedFailureWindows("llvm.org/pr24778")
+ def test(self):
+ """Exercise SBSymbolContext API extensively."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/python_api/target/TestTargetAPI.py b/lldb/test/python_api/target/TestTargetAPI.py
index 8163440..a9f3590 100644
--- a/lldb/test/python_api/target/TestTargetAPI.py
+++ b/lldb/test/python_api/target/TestTargetAPI.py
@@ -12,15 +12,13 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_find_global_variables_with_dsym(self):
- """Exercise SBTaget.FindGlobalVariables() API."""
- d = {'EXE': 'a.out'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.find_global_variables('a.out')
+ def setUp(self):
+ # Call super's setUp().
+ TestBase.setUp(self)
+ # Find the line number to of function 'c'.
+ self.line1 = line_number('main.c', '// Find the line number for breakpoint 1 here.')
+ self.line2 = line_number('main.c', '// Find the line number for breakpoint 2 here.')
+ self.line_main = line_number("main.c", "// Set a break at entry to main.")
#rdar://problem/9700873
# Find global variable value fails for dwarf if inferior not started
@@ -30,185 +28,95 @@
# the inferior process does not exist yet. The radar has been updated.
#@unittest232.skip("segmentation fault -- skipping")
@python_api_test
- @dwarf_test
- def test_find_global_variables_with_dwarf(self):
+ def test_find_global_variables(self):
"""Exercise SBTarget.FindGlobalVariables() API."""
d = {'EXE': 'b.out'}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.find_global_variables('b.out')
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_find_functions_with_dsym(self):
- """Exercise SBTaget.FindFunctions() API."""
- d = {'EXE': 'a.out'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.find_functions('a.out')
-
- @python_api_test
- @dwarf_test
@expectedFailureWindows("llvm.org/pr24778")
- def test_find_functions_with_dwarf(self):
+ def test_find_functions(self):
"""Exercise SBTarget.FindFunctions() API."""
d = {'EXE': 'b.out'}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.find_functions('b.out')
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_get_description_with_dsym(self):
- """Exercise SBTaget.GetDescription() API."""
- self.buildDsym()
- self.get_description()
-
- @python_api_test
- @dwarf_test
- def test_get_description_with_dwarf(self):
+ def test_get_description(self):
"""Exercise SBTarget.GetDescription() API."""
- self.buildDwarf()
+ self.build()
self.get_description()
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_launch_new_process_and_redirect_stdout_with_dsym(self):
- """Exercise SBTaget.Launch() API."""
- self.buildDsym()
- self.launch_new_process_and_redirect_stdout()
-
- @python_api_test
- @dwarf_test
- def test_launch_new_process_and_redirect_stdout_with_dwarf(self):
+ def test_launch_new_process_and_redirect_stdout(self):
"""Exercise SBTarget.Launch() API."""
- self.buildDwarf()
+ self.build()
self.launch_new_process_and_redirect_stdout()
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_resolve_symbol_context_with_address_with_dsym(self):
- """Exercise SBTaget.ResolveSymbolContextForAddress() API."""
- self.buildDsym()
- self.resolve_symbol_context_with_address()
-
- @python_api_test
- @dwarf_test
- def test_resolve_symbol_context_with_address_with_dwarf(self):
+ def test_resolve_symbol_context_with_address(self):
"""Exercise SBTarget.ResolveSymbolContextForAddress() API."""
- self.buildDwarf()
+ self.build()
self.resolve_symbol_context_with_address()
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_get_platform_with_dsym(self):
- d = {'EXE': 'a.out'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- target = self.create_simple_target('a.out')
- platform = target.platform
- self.assertTrue(platform, VALID_PLATFORM)
-
- @python_api_test
- @dwarf_test
- def test_get_platform_with_dwarf(self):
+ def test_get_platform(self):
d = {'EXE': 'b.out'}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
target = self.create_simple_target('b.out')
platform = target.platform
self.assertTrue(platform, VALID_PLATFORM)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_get_data_byte_size_with_dsym(self):
- d = {'EXE': 'a.out'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- target = self.create_simple_target('a.out')
- self.assertEquals(target.data_byte_size, 1)
-
- @python_api_test
- @dwarf_test
- def test_get_data_byte_size_with_dwarf(self):
+ def test_get_data_byte_size(self):
d = {'EXE': 'b.out'}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
target = self.create_simple_target('b.out')
self.assertEquals(target.data_byte_size, 1)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_get_code_byte_size_with_dsym(self):
- d = {'EXE': 'a.out'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- target = self.create_simple_target('a.out')
- self.assertEquals(target.code_byte_size, 1)
-
- @python_api_test
- @dwarf_test
- def test_get_code_byte_size_with_dwarf(self):
+ def test_get_code_byte_size(self):
d = {'EXE': 'b.out'}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
target = self.create_simple_target('b.out')
self.assertEquals(target.code_byte_size, 1)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_resolve_file_address_with_dsym(self):
- d = {'EXE': 'a.out'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- target = self.create_simple_target('a.out')
- self.resolve_file_address(target)
-
- @python_api_test
- @dwarf_test
- def test_resolve_file_address_with_dwarf(self):
+ def test_resolve_file_address(self):
d = {'EXE': 'b.out'}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
target = self.create_simple_target('b.out')
- self.resolve_file_address(target)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_read_memory_with_dsym(self):
- d = {'EXE': 'a.out'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- target = self.create_simple_target('a.out')
- self.read_memory(target)
+ # find the file address in the .data section of the main
+ # module
+ data_section = self.find_data_section(target)
+ data_section_addr = data_section.file_addr
+
+ # resolve the above address, and compare the address produced
+ # by the resolution against the original address/section
+ res_file_addr = target.ResolveFileAddress(data_section_addr)
+ self.assertTrue(res_file_addr.IsValid())
+
+ self.assertEquals(data_section_addr, res_file_addr.file_addr)
+
+ data_section2 = res_file_addr.section
+ self.assertIsNotNone(data_section2)
+ self.assertEquals(data_section.name, data_section2.name)
@python_api_test
- @dwarf_test
- def test_read_memory_with_dwarf(self):
+ def test_read_memory(self):
d = {'EXE': 'b.out'}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
target = self.create_simple_target('b.out')
- self.read_memory(target)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to of function 'c'.
- self.line1 = line_number('main.c', '// Find the line number for breakpoint 1 here.')
- self.line2 = line_number('main.c', '// Find the line number for breakpoint 2 here.')
- self.line_main = line_number("main.c", "// Set a break at entry to main.")
-
- def read_memory(self, target):
breakpoint = target.BreakpointCreateByLocation("main.c", self.line_main)
self.assertTrue(breakpoint, VALID_BREAKPOINT)
@@ -234,23 +142,6 @@
self.assertTrue(target, VALID_TARGET)
return target
- def resolve_file_address(self, target):
- # find the file address in the .data section of the main
- # module
- data_section = self.find_data_section(target)
- data_section_addr = data_section.file_addr
-
- # resolve the above address, and compare the address produced
- # by the resolution against the original address/section
- res_file_addr = target.ResolveFileAddress(data_section_addr)
- self.assertTrue(res_file_addr.IsValid())
-
- self.assertEquals(data_section_addr, res_file_addr.file_addr)
-
- data_section2 = res_file_addr.section
- self.assertIsNotNone(data_section2)
- self.assertEquals(data_section.name, data_section2.name)
-
def find_data_section(self, target):
mod = target.GetModuleAtIndex(0)
data_section = None
diff --git a/lldb/test/python_api/thread/TestThreadAPI.py b/lldb/test/python_api/thread/TestThreadAPI.py
index d5b146d..8ace950 100644
--- a/lldb/test/python_api/thread/TestThreadAPI.py
+++ b/lldb/test/python_api/thread/TestThreadAPI.py
@@ -12,98 +12,44 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_get_process_with_dsym(self):
+ def test_get_process(self):
"""Test Python SBThread.GetProcess() API."""
- self.buildDsym()
+ self.build()
self.get_process()
@python_api_test
- @dwarf_test
- def test_get_process_with_dwarf(self):
- """Test Python SBThread.GetProcess() API."""
- self.buildDwarf()
- self.get_process()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_get_stop_description_with_dsym(self):
+ def test_get_stop_description(self):
"""Test Python SBThread.GetStopDescription() API."""
- self.buildDsym()
+ self.build()
self.get_stop_description()
@python_api_test
- @dwarf_test
- def test_get_stop_description_with_dwarf(self):
- """Test Python SBThread.GetStopDescription() API."""
- self.buildDwarf()
- self.get_stop_description()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_run_to_address_with_dsym(self):
+ def test_run_to_address(self):
"""Test Python SBThread.RunToAddress() API."""
- # We build a different executable than the default buildDwarf() does.
+ # We build a different executable than the default build() does.
d = {'CXX_SOURCES': 'main2.cpp', 'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.run_to_address(self.exe_name)
@python_api_test
- @dwarf_test
- def test_run_to_address_with_dwarf(self):
- """Test Python SBThread.RunToAddress() API."""
- # We build a different executable than the default buildDwarf() does.
- d = {'CXX_SOURCES': 'main2.cpp', 'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.run_to_address(self.exe_name)
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_step_out_of_malloc_into_function_b_with_dsym(self):
- """Test Python SBThread.StepOut() API to step out of a malloc call where the call site is at function b()."""
- # We build a different executable than the default buildDsym() does.
- d = {'CXX_SOURCES': 'main2.cpp', 'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.step_out_of_malloc_into_function_b(self.exe_name)
-
@expectedFailureFreeBSD # llvm.org/pr20476
- @python_api_test
@expectedFailureWindows # Test crashes
- @dwarf_test
- def test_step_out_of_malloc_into_function_b_with_dwarf(self):
+ def test_step_out_of_malloc_into_function_b(self):
"""Test Python SBThread.StepOut() API to step out of a malloc call where the call site is at function b()."""
- # We build a different executable than the default buildDwarf() does.
+ # We build a different executable than the default build() does.
d = {'CXX_SOURCES': 'main2.cpp', 'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.step_out_of_malloc_into_function_b(self.exe_name)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_step_over_3_times_with_dsym(self):
+ def test_step_over_3_times(self):
"""Test Python SBThread.StepOver() API."""
- # We build a different executable than the default buildDsym() does.
+ # We build a different executable than the default build() does.
d = {'CXX_SOURCES': 'main2.cpp', 'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.step_over_3_times(self.exe_name)
-
- @python_api_test
- @dwarf_test
- def test_step_over_3_times_with_dwarf(self):
- """Test Python SBThread.StepOver() API."""
- # We build a different executable than the default buildDwarf() does.
- d = {'CXX_SOURCES': 'main2.cpp', 'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
self.step_over_3_times(self.exe_name)
diff --git a/lldb/test/python_api/type/TestTypeList.py b/lldb/test/python_api/type/TestTypeList.py
index 19f178e..f790f5f 100644
--- a/lldb/test/python_api/type/TestTypeList.py
+++ b/lldb/test/python_api/type/TestTypeList.py
@@ -12,25 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym(self):
- """Exercise SBType and SBTypeList API."""
- d = {'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.type_and_typelist_api(self.exe_name)
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf(self):
- """Exercise SBType and SBTypeList API."""
- d = {'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.type_and_typelist_api(self.exe_name)
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -40,9 +21,13 @@
self.source = 'main.cpp'
self.line = line_number(self.source, '// Break at this line')
- def type_and_typelist_api(self, exe_name):
+ @python_api_test
+ def test(self):
"""Exercise SBType and SBTypeList API."""
- exe = os.path.join(os.getcwd(), exe_name)
+ d = {'EXE': self.exe_name}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+ exe = os.path.join(os.getcwd(), self.exe_name)
# Create a target by the debugger.
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/python_api/value/TestValueAPI.py b/lldb/test/python_api/value/TestValueAPI.py
index 7c5443d..3c67d69 100644
--- a/lldb/test/python_api/value/TestValueAPI.py
+++ b/lldb/test/python_api/value/TestValueAPI.py
@@ -12,26 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym(self):
- """Exercise some SBValue APIs."""
- d = {'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.value_api(self.exe_name)
-
- @expectedFailureWindows("llvm.org/pr24772")
- @python_api_test
- @dwarf_test
- def test_with_dwarf(self):
- """Exercise some SBValue APIs."""
- d = {'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.value_api(self.exe_name)
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -40,9 +20,14 @@
# Find the line number to of function 'c'.
self.line = line_number('main.c', '// Break at this line')
- def value_api(self, exe_name):
+ @expectedFailureWindows("llvm.org/pr24772")
+ @python_api_test
+ def test(self):
"""Exercise some SBValue APIs."""
- exe = os.path.join(os.getcwd(), exe_name)
+ d = {'EXE': self.exe_name}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+ exe = os.path.join(os.getcwd(), self.exe_name)
# Create a target by the debugger.
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/python_api/value/change_values/TestChangeValueAPI.py b/lldb/test/python_api/value/change_values/TestChangeValueAPI.py
index e5d2c5a..dd30c9d 100644
--- a/lldb/test/python_api/value/change_values/TestChangeValueAPI.py
+++ b/lldb/test/python_api/value/change_values/TestChangeValueAPI.py
@@ -12,26 +12,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_change_value_with_dsym(self):
- """Exercise the SBValue::SetValueFromCString API."""
- d = {'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.change_value_api(self.exe_name)
-
- @expectedFailureWindows("llvm.org/pr24772")
- @python_api_test
- @dwarf_test
- def test_change_value_with_dwarf(self):
- """Exercise the SBValue::SetValueFromCString API."""
- d = {'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.change_value_api(self.exe_name)
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -42,9 +22,14 @@
self.check_line = line_number('main.c', '// Stop here and check values')
self.end_line = line_number ('main.c', '// Set a breakpoint here at the end')
- def change_value_api(self, exe_name):
- """Exercise some SBValue APIs."""
- exe = os.path.join(os.getcwd(), exe_name)
+ @expectedFailureWindows("llvm.org/pr24772")
+ @python_api_test
+ def test_change_value(self):
+ """Exercise the SBValue::SetValueFromCString API."""
+ d = {'EXE': self.exe_name}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+ exe = os.path.join(os.getcwd(), self.exe_name)
# Create a target by the debugger.
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py b/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py
index 6a1224bc..2329c96 100644
--- a/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py
+++ b/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py
@@ -13,25 +13,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym(self):
- """Exercise SBValue API linked_list_iter."""
- d = {'EXE': self.exe_name}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.linked_list_api(self.exe_name)
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf(self):
- """Exercise SBValue API linked_list_iter."""
- d = {'EXE': self.exe_name}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.linked_list_api(self.exe_name)
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -40,9 +21,13 @@
# Find the line number to break at.
self.line = line_number('main.cpp', '// Break at this line')
- def linked_list_api(self, exe_name):
- """Exercise SBValue API linked_list-iter."""
- exe = os.path.join(os.getcwd(), exe_name)
+ @python_api_test
+ def test(self):
+ """Exercise SBValue API linked_list_iter."""
+ d = {'EXE': self.exe_name}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+ exe = os.path.join(os.getcwd(), self.exe_name)
# Create a target by the debugger.
target = self.dbg.CreateTarget(exe)
diff --git a/lldb/test/python_api/value_var_update/TestValueVarUpdate.py b/lldb/test/python_api/value_var_update/TestValueVarUpdate.py
index 8c597bc..76d4d64 100644
--- a/lldb/test/python_api/value_var_update/TestValueVarUpdate.py
+++ b/lldb/test/python_api/value_var_update/TestValueVarUpdate.py
@@ -10,23 +10,6 @@
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_with_dsym_and_process_launch_api(self):
- """Test SBValue::GetValueDidChange"""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.do_test()
-
- @python_api_test
- @dwarf_test
- def test_with_dwarf_and_process_launch_api(self):
- """Test SBValue::GetValueDidChange"""
- self.buildDwarf(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.do_test()
-
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
@@ -34,9 +17,11 @@
self.exe = os.path.join(os.getcwd(), self.testMethodName)
self.d = {'EXE': self.testMethodName}
- def do_test(self):
- """Create target, breakpoint, launch a process, and then kill it."""
-
+ @python_api_test
+ def test_with_process_launch_api(self):
+ """Test SBValue::GetValueDidChange"""
+ self.build(dictionary=self.d)
+ self.setTearDownCleanup(dictionary=self.d)
target = self.dbg.CreateTarget(self.exe)
breakpoint = target.BreakpointCreateBySourceRegex("break here", lldb.SBFileSpec("main.c"))
diff --git a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py
index 1fd4d44..9e464ad 100644
--- a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py
+++ b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py
@@ -20,25 +20,12 @@
# Find the line number to break inside main().
self.line = line_number(self.source, '// Set break point at this line.')
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_watch_val_with_dsym(self):
- """Exercise SBValue.Watch() API to set a watchpoint."""
- self.buildDsym()
- self.do_set_watchpoint()
-
- @python_api_test
- @dwarf_test
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_watch_val_with_dwarf(self):
+ def test_watch_val(self):
"""Exercise SBValue.Watch() API to set a watchpoint."""
- self.buildDwarf()
- self.do_set_watchpoint()
-
- def do_set_watchpoint(self):
- """Use SBFrame.WatchValue() to set a watchpoint and verify that the program stops later due to the watchpoint."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
index c58f2fd..6b4197b 100644
--- a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
+++ b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
@@ -20,25 +20,12 @@
# Find the line number to break inside main().
self.line = line_number(self.source, '// Set break point at this line.')
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_set_watch_ignore_count_with_dsym(self):
- """Test SBWatchpoint.SetIgnoreCount() API."""
- self.buildDsym()
- self.do_watchpoint_ignore_count()
-
- @python_api_test
- @dwarf_test
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_set_watch_ignore_count_with_dwarf(self):
+ def test_set_watch_ignore_count(self):
"""Test SBWatchpoint.SetIgnoreCount() API."""
- self.buildDwarf()
- self.do_watchpoint_ignore_count()
-
- def do_watchpoint_ignore_count(self):
- """Test SBWatchpoint.SetIgnoreCount() API."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIter.py b/lldb/test/python_api/watchpoint/TestWatchpointIter.py
index ea202a5..8a68779 100644
--- a/lldb/test/python_api/watchpoint/TestWatchpointIter.py
+++ b/lldb/test/python_api/watchpoint/TestWatchpointIter.py
@@ -20,25 +20,12 @@
# Find the line number to break inside main().
self.line = line_number(self.source, '// Set break point at this line.')
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_watch_iter_with_dsym(self):
- """Exercise SBTarget.watchpoint_iter() API to iterate on the available watchpoints."""
- self.buildDsym()
- self.do_watchpoint_iter()
-
- @python_api_test
- @dwarf_test
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_watch_iter_with_dwarf(self):
+ def test_watch_iter(self):
"""Exercise SBTarget.watchpoint_iter() API to iterate on the available watchpoints."""
- self.buildDwarf()
- self.do_watchpoint_iter()
-
- def do_watchpoint_iter(self):
- """Use SBTarget.watchpoint_iter() to do Pythonic iteration on the available watchpoints."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py b/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
index d643c8c..a1c0ce0 100644
--- a/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
+++ b/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
@@ -25,25 +25,12 @@
self.exe_name = self.testMethodName
self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
- @skipUnlessDarwin
- @dsym_test
- def test_watchpoint_cond_api_with_dsym(self):
- """Test watchpoint condition API."""
- self.buildDsym(dictionary=self.d)
- self.setTearDownCleanup(dictionary=self.d)
- self.watchpoint_condition_api()
-
- @dwarf_test
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_watchpoint_cond_api_with_dwarf(self):
+ def test_watchpoint_cond_api(self):
"""Test watchpoint condition API."""
- self.buildDwarf(dictionary=self.d)
+ self.build(dictionary=self.d)
self.setTearDownCleanup(dictionary=self.d)
- self.watchpoint_condition_api()
-
- def watchpoint_condition_api(self):
- """Do watchpoint condition API to set condition as 'global==5'."""
exe = os.path.join(os.getcwd(), self.exe_name)
# Create a target by the debugger.
diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
index b6db828..9830dd1 100644
--- a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
+++ b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
@@ -22,25 +22,12 @@
# This is for verifying that watch location works.
self.violating_func = "do_bad_thing_with_location";
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_watch_location_with_dsym(self):
- """Exercise SBValue.WatchPointee() API to set a watchpoint."""
- self.buildDsym()
- self.do_set_watchlocation()
-
- @python_api_test
- @dwarf_test
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
- def test_watch_location_with_dwarf(self):
+ def test_watch_location(self):
"""Exercise SBValue.WatchPointee() API to set a watchpoint."""
- self.buildDwarf()
- self.do_set_watchlocation()
-
- def do_set_watchlocation(self):
- """Use SBValue.WatchPointee() to set a watchpoint and verify that the program stops later due to the watchpoint."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
index 2cb2f38..d7635ae 100644
--- a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
+++ b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
@@ -22,41 +22,12 @@
# This is for verifying that watch location works.
self.violating_func = "do_bad_thing_with_location";
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_watch_address_with_dsym(self):
- """Exercise SBTarget.WatchAddress() API to set a watchpoint."""
- self.buildDsym()
- self.do_set_watchaddress()
-
- @python_api_test
- @dwarf_test
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446")
- def test_watch_address_with_dwarf(self):
+ def test_watch_address(self):
"""Exercise SBTarget.WatchAddress() API to set a watchpoint."""
- self.buildDwarf()
- self.do_set_watchaddress()
-
- @skipUnlessDarwin
- @python_api_test
- @dsym_test
- def test_watch_address_with_invalid_watch_size_with_dsym(self):
- """Exercise SBTarget.WatchAddress() API but pass an invalid watch_size."""
- self.buildDsym()
- self.do_set_watchaddress_with_invalid_watch_size()
-
- @python_api_test
- @dwarf_test
- @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- def test_watch_address_with_invalid_watch_size_with_dwarf(self):
- """Exercise SBTarget.WatchAddress() API but pass an invalid watch_size."""
- self.buildDwarf()
- self.do_set_watchaddress_with_invalid_watch_size()
-
- def do_set_watchaddress(self):
- """Use SBTarget.WatchAddress() to set a watchpoint and verify that the program stops later due to the watchpoint."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
@@ -114,8 +85,11 @@
# This finishes our test.
- def do_set_watchaddress_with_invalid_watch_size(self):
- """Use SBTarget.WatchAddress() to set a watchpoint with invalid watch_size and verify we get a meaningful error message."""
+ @python_api_test
+ @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
+ def test_watch_address_with_invalid_watch_size(self):
+ """Exercise SBTarget.WatchAddress() API but pass an invalid watch_size."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
# Create a target by the debugger.
diff --git a/lldb/test/settings/TestSettings.py b/lldb/test/settings/TestSettings.py
index 5083348..f430a9d 100644
--- a/lldb/test/settings/TestSettings.py
+++ b/lldb/test/settings/TestSettings.py
@@ -19,6 +19,7 @@
cls.RemoveTempFile("stderr.txt")
cls.RemoveTempFile("stdout.txt")
+ @no_debug_info_test
def test_apropos_should_also_search_settings_description(self):
"""Test that 'apropos' command should also search descriptions for the settings variables."""
@@ -27,6 +28,7 @@
"environment variables",
"executable's environment"])
+ @no_debug_info_test
def test_append_target_env_vars(self):
"""Test that 'append target.run-args' works."""
# Append the env-vars.
@@ -39,6 +41,7 @@
self.expect('settings show target.env-vars',
substrs = ['MY_ENV_VAR=YES'])
+ @no_debug_info_test
def test_insert_before_and_after_target_run_args(self):
"""Test that 'insert-before/after target.run-args' works."""
# Set the run-args first.
@@ -60,6 +63,7 @@
'[3]: "b"',
'[4]: "c"'])
+ @no_debug_info_test
def test_replace_target_run_args(self):
"""Test that 'replace target.run-args' works."""
# Set the run-args and then replace the index-0 element.
@@ -77,6 +81,7 @@
'[1]: "b"',
'[2]: "c"'])
+ @no_debug_info_test
def test_set_prompt(self):
"""Test that 'set prompt' actually changes the prompt."""
@@ -94,6 +99,7 @@
# Use '-r' option to reset to the original default prompt.
self.runCmd("settings clear prompt")
+ @no_debug_info_test
def test_set_term_width(self):
"""Test that 'set term-width' actually changes the term-width."""
@@ -110,7 +116,7 @@
#rdar://problem/10712130
def test_set_frame_format(self):
"""Test that 'set frame-format' with a backtick char in the format string works as well as fullpath."""
- self.buildDefault()
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -143,7 +149,7 @@
def test_set_auto_confirm(self):
"""Test that after 'set auto-confirm true', manual confirmation should not kick in."""
- self.buildDefault()
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -168,7 +174,7 @@
@skipUnlessArch(['x86_64', 'i386', 'i686'])
def test_disassembler_settings(self):
"""Test that user options for the disassembler take effect."""
- self.buildDefault()
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -199,22 +205,10 @@
self.expect("disassemble -n numberfn",
substrs = ["5ah"])
- @skipUnlessDarwin
- @dsym_test
- def test_run_args_and_env_vars_with_dsym(self):
- """Test that run-args and env-vars are passed to the launched process."""
- self.buildDsym()
- self.pass_run_args_and_env_vars()
-
- @dwarf_test
@expectedFailureWindows("llvm.org/pr24579")
- def test_run_args_and_env_vars_with_dwarf(self):
+ def test_run_args_and_env_vars(self):
"""Test that run-args and env-vars are passed to the launched process."""
- self.buildDwarf()
- self.pass_run_args_and_env_vars()
-
- def pass_run_args_and_env_vars(self):
- """Test that run-args and env-vars are passed to the launched process."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -244,7 +238,7 @@
@skipIfRemote # it doesn't make sense to send host env to remote target
def test_pass_host_env_vars(self):
"""Test that the host env vars are passed to the launched process."""
- self.buildDefault()
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -277,7 +271,7 @@
def test_set_error_output_path(self):
"""Test that setting target.error/output-path for the launched process works."""
- self.buildDefault()
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -328,6 +322,7 @@
self.expect(output, exe=False,
startstr = "This message should go to standard out.")
+ @no_debug_info_test
def test_print_dictionary_setting(self):
self.runCmd ("settings clear target.env-vars")
self.runCmd ("settings set target.env-vars [\"MY_VAR\"]=some-value")
@@ -335,6 +330,7 @@
substrs = [ "MY_VAR=some-value" ])
self.runCmd ("settings clear target.env-vars")
+ @no_debug_info_test
def test_print_array_setting(self):
self.runCmd ("settings clear target.run-args")
self.runCmd ("settings set target.run-args gobbledy-gook")
@@ -342,6 +338,7 @@
substrs = [ '[0]: "gobbledy-gook"' ])
self.runCmd ("settings clear target.run-args")
+ @no_debug_info_test
def test_settings_with_quotes (self):
self.runCmd ("settings clear target.run-args")
self.runCmd ("settings set target.run-args a b c")
@@ -368,6 +365,7 @@
self.expect ("settings show thread-format", 'thread-format (format-string) = "abc def "')
self.runCmd ('settings clear thread-format')
+ @no_debug_info_test
def test_settings_with_trailing_whitespace (self):
# boolean
@@ -450,6 +448,7 @@
substrs = [ 'disassembly-format (format-string) = "foo "'])
self.runCmd("settings clear disassembly-format", check=False)
+ @no_debug_info_test
def test_all_settings_exist (self):
self.expect ("settings show",
substrs = [ "auto-confirm",
diff --git a/lldb/test/settings/quoting/TestQuoting.py b/lldb/test/settings/quoting/TestQuoting.py
index 995f887..44fb01f 100644
--- a/lldb/test/settings/quoting/TestQuoting.py
+++ b/lldb/test/settings/quoting/TestQuoting.py
@@ -16,42 +16,53 @@
"""Cleanup the test byproducts."""
cls.RemoveTempFile("stdout.txt")
+ @no_debug_info_test
def test_no_quote(self):
self.do_test_args("a b c", "a\0b\0c\0")
@expectedFailureWindows("http://llvm.org/pr24557")
+ @no_debug_info_test
def test_single_quote(self):
self.do_test_args("'a b c'", "a b c\0")
+ @no_debug_info_test
def test_double_quote(self):
self.do_test_args('"a b c"', "a b c\0")
@expectedFailureWindows("http://llvm.org/pr24557")
+ @no_debug_info_test
def test_single_quote_escape(self):
self.do_test_args("'a b\\' c", "a b\\\0c\0")
@expectedFailureWindows("http://llvm.org/pr24557")
+ @no_debug_info_test
def test_double_quote_escape(self):
self.do_test_args('"a b\\" c"', 'a b" c\0')
@expectedFailureWindows("http://llvm.org/pr24557")
+ @no_debug_info_test
def test_double_quote_escape2(self):
self.do_test_args('"a b\\\\" c', 'a b\\\0c\0')
+ @no_debug_info_test
def test_single_in_double(self):
self.do_test_args('"a\'b"', "a'b\0")
@expectedFailureWindows("http://llvm.org/pr24557")
+ @no_debug_info_test
def test_double_in_single(self):
self.do_test_args("'a\"b'", 'a"b\0')
+ @no_debug_info_test
def test_combined(self):
self.do_test_args('"a b"c\'d e\'', 'a bcd e\0')
+ @no_debug_info_test
def test_bare_single(self):
self.do_test_args("a\\'b", "a'b\0")
@expectedFailureWindows("http://llvm.org/pr24557")
+ @no_debug_info_test
def test_bare_double(self):
self.do_test_args('a\\"b', 'a"b\0')
diff --git a/lldb/test/source-manager/TestSourceManager.py b/lldb/test/source-manager/TestSourceManager.py
index 5be75cb..c4f7131 100644
--- a/lldb/test/source-manager/TestSourceManager.py
+++ b/lldb/test/source-manager/TestSourceManager.py
@@ -28,21 +28,7 @@
@python_api_test
def test_display_source_python(self):
"""Test display of source using the SBSourceManager API."""
- self.buildDefault()
- self.display_source_python()
-
- def test_move_and_then_display_source(self):
- """Test that target.source-map settings work by moving main.c to hidden/main.c."""
- self.buildDefault()
- self.move_and_then_display_source()
-
- def test_modify_source_file_while_debugging(self):
- """Modify a source file while debugging the executable."""
- self.buildDefault()
- self.modify_source_file_while_debugging()
-
- def display_source_python(self):
- """Display source using the SBSourceManager API."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -81,8 +67,9 @@
stream.Print(None)
stream.RedirectToFile(None, True)
- def move_and_then_display_source(self):
+ def test_move_and_then_display_source(self):
"""Test that target.source-map settings work by moving main.c to hidden/main.c."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -108,8 +95,9 @@
self.expect("source list -n main", SOURCE_DISPLAYED_CORRECTLY,
substrs = ['Hello world'])
- def modify_source_file_while_debugging(self):
+ def test_modify_source_file_while_debugging(self):
"""Modify a source file while debugging the executable."""
+ self.build()
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
diff --git a/lldb/test/terminal/TestSTTYBeforeAndAfter.py b/lldb/test/terminal/TestSTTYBeforeAndAfter.py
index a671bf5..d3accca 100644
--- a/lldb/test/terminal/TestSTTYBeforeAndAfter.py
+++ b/lldb/test/terminal/TestSTTYBeforeAndAfter.py
@@ -20,6 +20,7 @@
cls.RemoveTempFile("child_read2.txt")
@expectedFailureHostWindows("llvm.org/pr22274: need a pexpect replacement for windows")
+ @no_debug_info_test
def test_stty_dash_a_before_and_afetr_invoking_lldb_command(self):
"""Test that 'stty -a' displays the same output before and after running the lldb command."""
import pexpect
diff --git a/lldb/test/tools/lldb-server/TestGdbRemoteAttach.py b/lldb/test/tools/lldb-server/TestGdbRemoteAttach.py
index 7bea891..dab3ff4 100644
--- a/lldb/test/tools/lldb-server/TestGdbRemoteAttach.py
+++ b/lldb/test/tools/lldb-server/TestGdbRemoteAttach.py
@@ -43,18 +43,16 @@
self.assertEqual(reported_pid, inferior.pid)
@debugserver_test
- @dsym_test
- def test_attach_with_vAttach_debugserver_dsym(self):
+ def test_attach_with_vAttach_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_attach_manually()
self.attach_with_vAttach()
@llgs_test
- @dwarf_test
- def test_attach_with_vAttach_llgs_dwarf(self):
+ def test_attach_with_vAttach_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_attach_manually()
self.attach_with_vAttach()
diff --git a/lldb/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py b/lldb/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
index e6b8cea..0a185b5 100644
--- a/lldb/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
+++ b/lldb/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
@@ -87,10 +87,9 @@
#
@llgs_test
- @dwarf_test
- def test_supports_auxv_llgs_dwarf(self):
+ def test_supports_auxv_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.supports_auxv()
@@ -103,18 +102,16 @@
# print "auxv contains {} entries".format(len(auxv_data) / (2*word_size))
@debugserver_test
- @dsym_test
- def test_auxv_data_is_correct_size_debugserver_dsym(self):
+ def test_auxv_data_is_correct_size_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.auxv_data_is_correct_size()
@llgs_test
- @dwarf_test
- def test_auxv_data_is_correct_size_llgs_dwarf(self):
+ def test_auxv_data_is_correct_size_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.auxv_data_is_correct_size()
@@ -143,18 +140,16 @@
# print "auxv dict: {}".format(auxv_dict)
@debugserver_test
- @dsym_test
- def test_auxv_keys_look_valid_debugserver_dsym(self):
+ def test_auxv_keys_look_valid_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.auxv_keys_look_valid()
@llgs_test
- @dwarf_test
- def test_auxv_keys_look_valid_llgs_dwarf(self):
+ def test_auxv_keys_look_valid_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.auxv_keys_look_valid()
@@ -190,18 +185,16 @@
self.assertEquals(auxv_dict_iterated, auxv_dict)
@debugserver_test
- @dsym_test
- def test_auxv_chunked_reads_work_debugserver_dsym(self):
+ def test_auxv_chunked_reads_work_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.auxv_chunked_reads_work()
@llgs_test
- @dwarf_test
- def test_auxv_chunked_reads_work_llgs_dwarf(self):
+ def test_auxv_chunked_reads_work_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.auxv_chunked_reads_work()
diff --git a/lldb/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py b/lldb/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
index 57189a9..06b103d 100644
--- a/lldb/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
+++ b/lldb/test/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
@@ -55,18 +55,16 @@
self.assertTrue(len(expedited_registers) > 0)
@debugserver_test
- @dsym_test
- def test_stop_notification_contains_any_registers_debugserver_dsym(self):
+ def test_stop_notification_contains_any_registers_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_any_registers()
@llgs_test
- @dwarf_test
- def test_stop_notification_contains_any_registers_llgs_dwarf(self):
+ def test_stop_notification_contains_any_registers_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_any_registers()
@@ -79,18 +77,16 @@
self.fail("expedited register number {} specified more than once ({} times)".format(reg_num, len(value)))
@debugserver_test
- @dsym_test
- def test_stop_notification_contains_no_duplicate_registers_debugserver_dsym(self):
+ def test_stop_notification_contains_no_duplicate_registers_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_no_duplicate_registers()
@llgs_test
- @dwarf_test
- def test_stop_notification_contains_no_duplicate_registers_llgs_dwarf(self):
+ def test_stop_notification_contains_no_duplicate_registers_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_no_duplicate_registers()
@@ -98,18 +94,16 @@
self.stop_notification_contains_generic_register("pc")
@debugserver_test
- @dsym_test
- def test_stop_notification_contains_pc_register_debugserver_dsym(self):
+ def test_stop_notification_contains_pc_register_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_pc_register()
@llgs_test
- @dwarf_test
- def test_stop_notification_contains_pc_register_llgs_dwarf(self):
+ def test_stop_notification_contains_pc_register_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_pc_register()
@@ -117,18 +111,16 @@
self.stop_notification_contains_generic_register("fp")
@debugserver_test
- @dsym_test
- def test_stop_notification_contains_fp_register_debugserver_dsym(self):
+ def test_stop_notification_contains_fp_register_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_fp_register()
@llgs_test
- @dwarf_test
- def test_stop_notification_contains_fp_register_llgs_dwarf(self):
+ def test_stop_notification_contains_fp_register_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_fp_register()
@@ -136,18 +128,16 @@
self.stop_notification_contains_generic_register("sp")
@debugserver_test
- @dsym_test
- def test_stop_notification_contains_sp_register_debugserver_dsym(self):
+ def test_stop_notification_contains_sp_register_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_sp_register()
@llgs_test
- @dwarf_test
- def test_stop_notification_contains_sp_register_llgs_dwarf(self):
+ def test_stop_notification_contains_sp_register_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.stop_notification_contains_sp_register()
diff --git a/lldb/test/tools/lldb-server/TestGdbRemoteKill.py b/lldb/test/tools/lldb-server/TestGdbRemoteKill.py
index 273ab35..459879e 100644
--- a/lldb/test/tools/lldb-server/TestGdbRemoteKill.py
+++ b/lldb/test/tools/lldb-server/TestGdbRemoteKill.py
@@ -36,18 +36,16 @@
self.assertFalse(lldbgdbserverutils.process_is_running(procs["inferior"].pid, False))
@debugserver_test
- @dsym_test
- def test_attach_commandline_kill_after_initial_stop_debugserver_dsym(self):
+ def test_attach_commandline_kill_after_initial_stop_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_attach()
self.attach_commandline_kill_after_initial_stop()
@llgs_test
- @dwarf_test
- def test_attach_commandline_kill_after_initial_stop_llgs_dwarf(self):
+ def test_attach_commandline_kill_after_initial_stop_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_attach()
self.attach_commandline_kill_after_initial_stop()
diff --git a/lldb/test/tools/lldb-server/TestGdbRemoteProcessInfo.py b/lldb/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
index b7db698..4aa9218 100644
--- a/lldb/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
+++ b/lldb/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
@@ -31,17 +31,15 @@
self.assertTrue(lldbgdbserverutils.process_is_running(pid, True))
@debugserver_test
- @dsym_test
- def test_qProcessInfo_returns_running_process_debugserver_dsym(self):
+ def test_qProcessInfo_returns_running_process_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.qProcessInfo_returns_running_process()
@llgs_test
- @dwarf_test
- def test_qProcessInfo_returns_running_process_llgs_dwarf(self):
+ def test_qProcessInfo_returns_running_process_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.qProcessInfo_returns_running_process()
def attach_commandline_qProcessInfo_reports_correct_pid(self):
@@ -64,18 +62,16 @@
self.assertEqual(reported_pid, procs["inferior"].pid)
@debugserver_test
- @dsym_test
- def test_attach_commandline_qProcessInfo_reports_correct_pid_debugserver_dsym(self):
+ def test_attach_commandline_qProcessInfo_reports_correct_pid_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_attach()
self.attach_commandline_qProcessInfo_reports_correct_pid()
@llgs_test
- @dwarf_test
- def test_attach_commandline_qProcessInfo_reports_correct_pid_llgs_dwarf(self):
+ def test_attach_commandline_qProcessInfo_reports_correct_pid_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_attach()
self.attach_commandline_qProcessInfo_reports_correct_pid()
@@ -97,17 +93,15 @@
self.assertTrue(endian in ["little", "big", "pdp"])
@debugserver_test
- @dsym_test
- def test_qProcessInfo_reports_valid_endian_debugserver_dsym(self):
+ def test_qProcessInfo_reports_valid_endian_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.qProcessInfo_reports_valid_endian()
@llgs_test
- @dwarf_test
- def test_qProcessInfo_reports_valid_endian_llgs_dwarf(self):
+ def test_qProcessInfo_reports_valid_endian_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.qProcessInfo_reports_valid_endian()
def qProcessInfo_contains_keys(self, expected_key_set):
@@ -152,26 +146,23 @@
@skipUnlessDarwin
@debugserver_test
- @dsym_test
def test_qProcessInfo_contains_cputype_cpusubtype_debugserver_darwin(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))
@skipUnlessPlatform(["linux"])
@llgs_test
- @dwarf_test
def test_qProcessInfo_contains_triple_llgs_linux(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.qProcessInfo_contains_keys(set(['triple']))
@skipUnlessDarwin
@debugserver_test
- @dsym_test
def test_qProcessInfo_does_not_contain_triple_debugserver_darwin(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
# We don't expect to see triple on darwin. If we do, we'll prefer triple
# to cputype/cpusubtype and skip some darwin-based ProcessGDBRemote ArchSpec setup
# for the remote Host and Process.
@@ -179,10 +170,9 @@
@skipUnlessPlatform(["linux"])
@llgs_test
- @dwarf_test
def test_qProcessInfo_does_not_contain_cputype_cpusubtype_llgs_linux(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.qProcessInfo_does_not_contain_keys(set(['cputype', 'cpusubtype']))
diff --git a/lldb/test/tools/lldb-server/TestGdbRemoteRegisterState.py b/lldb/test/tools/lldb-server/TestGdbRemoteRegisterState.py
index da5a896..a6d6222 100644
--- a/lldb/test/tools/lldb-server/TestGdbRemoteRegisterState.py
+++ b/lldb/test/tools/lldb-server/TestGdbRemoteRegisterState.py
@@ -92,38 +92,34 @@
self.assertEquals(final_reg_values, initial_reg_values)
@debugserver_test
- @dsym_test
- def test_grp_register_save_restore_works_with_suffix_debugserver_dsym(self):
+ def test_grp_register_save_restore_works_with_suffix_debugserver(self):
USE_THREAD_SUFFIX = True
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
@llgs_test
- @dwarf_test
- def test_grp_register_save_restore_works_with_suffix_llgs_dwarf(self):
+ def test_grp_register_save_restore_works_with_suffix_llgs(self):
USE_THREAD_SUFFIX = True
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
@debugserver_test
- @dsym_test
- def test_grp_register_save_restore_works_no_suffix_debugserver_dsym(self):
+ def test_grp_register_save_restore_works_no_suffix_debugserver(self):
USE_THREAD_SUFFIX = False
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
@llgs_test
- @dwarf_test
- def test_grp_register_save_restore_works_no_suffix_llgs_dwarf(self):
+ def test_grp_register_save_restore_works_no_suffix_llgs(self):
USE_THREAD_SUFFIX = False
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.grp_register_save_restore_works(USE_THREAD_SUFFIX)
diff --git a/lldb/test/tools/lldb-server/TestGdbRemoteSingleStep.py b/lldb/test/tools/lldb-server/TestGdbRemoteSingleStep.py
index df31648..53aa4b5 100644
--- a/lldb/test/tools/lldb-server/TestGdbRemoteSingleStep.py
+++ b/lldb/test/tools/lldb-server/TestGdbRemoteSingleStep.py
@@ -8,19 +8,17 @@
mydir = TestBase.compute_mydir(__file__)
@debugserver_test
- @dsym_test
- def test_single_step_only_steps_one_instruction_with_s_debugserver_dsym(self):
+ def test_single_step_only_steps_one_instruction_with_s_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(use_Hc_packet=True, step_instruction="s")
@llgs_test
- @dwarf_test
@expectedFailureAndroid(bugnumber="llvm.com/pr24739", archs=["arm", "aarch64"])
- def test_single_step_only_steps_one_instruction_with_s_llgs_dwarf(self):
+ def test_single_step_only_steps_one_instruction_with_s_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(use_Hc_packet=True, step_instruction="s")
diff --git a/lldb/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py b/lldb/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
index 55cff08..7e3f4dd 100644
--- a/lldb/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
+++ b/lldb/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
@@ -76,18 +76,16 @@
self.assertIsNotNone(context)
@debugserver_test
- @dsym_test
- def test_QListThreadsInStopReply_supported_debugserver_dsym(self):
+ def test_QListThreadsInStopReply_supported_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.QListThreadsInStopReply_supported()
@llgs_test
- @dwarf_test
- def test_QListThreadsInStopReply_supported_llgs_dwarf(self):
+ def test_QListThreadsInStopReply_supported_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.QListThreadsInStopReply_supported()
@@ -97,18 +95,16 @@
self.assertEquals(len(stop_reply_threads), thread_count)
@debugserver_test
- @dsym_test
- def test_stop_reply_reports_multiple_threads_debugserver_dsym(self):
+ def test_stop_reply_reports_multiple_threads_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.stop_reply_reports_multiple_threads(5)
@llgs_test
- @dwarf_test
- def test_stop_reply_reports_multiple_threads_llgs_dwarf(self):
+ def test_stop_reply_reports_multiple_threads_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.stop_reply_reports_multiple_threads(5)
@@ -118,18 +114,16 @@
self.assertEquals(len(stop_reply_threads), 0)
@debugserver_test
- @dsym_test
- def test_no_QListThreadsInStopReply_supplies_no_threads_debugserver_dsym(self):
+ def test_no_QListThreadsInStopReply_supplies_no_threads_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.no_QListThreadsInStopReply_supplies_no_threads(5)
@llgs_test
- @dwarf_test
- def test_no_QListThreadsInStopReply_supplies_no_threads_llgs_dwarf(self):
+ def test_no_QListThreadsInStopReply_supplies_no_threads_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.no_QListThreadsInStopReply_supplies_no_threads(5)
@@ -154,18 +148,16 @@
self.assertTrue(tid in stop_reply_threads)
@debugserver_test
- @dsym_test
- def test_stop_reply_reports_correct_threads_debugserver_dsym(self):
+ def test_stop_reply_reports_correct_threads_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.stop_reply_reports_correct_threads(5)
@llgs_test
- @dwarf_test
- def test_stop_reply_reports_correct_threads_llgs_dwarf(self):
+ def test_stop_reply_reports_correct_threads_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.stop_reply_reports_correct_threads(5)
diff --git a/lldb/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py b/lldb/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
index 112558b..915b1a1 100644
--- a/lldb/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
+++ b/lldb/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
@@ -80,18 +80,16 @@
self.assertEquals(len(stop_replies), thread_count)
@debugserver_test
- @dsym_test
- def test_qThreadStopInfo_works_for_multiple_threads_debugserver_dsym(self):
+ def test_qThreadStopInfo_works_for_multiple_threads_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_works_for_multiple_threads(self.THREAD_COUNT)
@llgs_test
- @dwarf_test
- def test_qThreadStopInfo_works_for_multiple_threads_llgs_dwarf(self):
+ def test_qThreadStopInfo_works_for_multiple_threads_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_works_for_multiple_threads(self.THREAD_COUNT)
@@ -109,18 +107,16 @@
self.assertEqual(with_stop_reason_count, 1)
@debugserver_test
- @dsym_test
- def test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt_debugserver_dsym(self):
+ def test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt(self.THREAD_COUNT)
@llgs_test
- @dwarf_test
- def test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt_llgs_dwarf(self):
+ def test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt(self.THREAD_COUNT)
@@ -135,19 +131,17 @@
@unittest2.skip("MacOSX doesn't have a default thread name")
@debugserver_test
- @dsym_test
- def test_qThreadStopInfo_has_valid_thread_names_debugserver_dsym(self):
+ def test_qThreadStopInfo_has_valid_thread_names_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_has_valid_thread_names(self.THREAD_COUNT, "a.out")
@skipUnlessPlatform(["linux"]) # test requires OS with set, equal thread names by default.
@llgs_test
- @dwarf_test
- def test_qThreadStopInfo_has_valid_thread_names_llgs_dwarf(self):
+ def test_qThreadStopInfo_has_valid_thread_names_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.qThreadStopInfo_has_valid_thread_names(self.THREAD_COUNT, "a.out")
diff --git a/lldb/test/tools/lldb-server/TestGdbRemote_vCont.py b/lldb/test/tools/lldb-server/TestGdbRemote_vCont.py
index 0306bcc..8716ee1 100644
--- a/lldb/test/tools/lldb-server/TestGdbRemote_vCont.py
+++ b/lldb/test/tools/lldb-server/TestGdbRemote_vCont.py
@@ -36,91 +36,80 @@
self.vCont_supports_mode("S")
@debugserver_test
- @dsym_test
- def test_vCont_supports_c_debugserver_dsym(self):
+ def test_vCont_supports_c_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.vCont_supports_c()
@llgs_test
- def test_vCont_supports_c_llgs_dwarf(self):
+ def test_vCont_supports_c_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.vCont_supports_c()
@debugserver_test
- @dsym_test
- def test_vCont_supports_C_debugserver_dsym(self):
+ def test_vCont_supports_C_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.vCont_supports_C()
@llgs_test
- @dwarf_test
- def test_vCont_supports_C_llgs_dwarf(self):
+ def test_vCont_supports_C_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.vCont_supports_C()
@debugserver_test
- @dsym_test
- def test_vCont_supports_s_debugserver_dsym(self):
+ def test_vCont_supports_s_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.vCont_supports_s()
@llgs_test
- @dwarf_test
- def test_vCont_supports_s_llgs_dwarf(self):
+ def test_vCont_supports_s_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.vCont_supports_s()
@debugserver_test
- @dsym_test
- def test_vCont_supports_S_debugserver_dsym(self):
+ def test_vCont_supports_S_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.vCont_supports_S()
@llgs_test
- @dwarf_test
- def test_vCont_supports_S_llgs_dwarf(self):
+ def test_vCont_supports_S_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.vCont_supports_S()
@debugserver_test
- @dsym_test
- def test_single_step_only_steps_one_instruction_with_Hc_vCont_s_debugserver_dsym(self):
+ def test_single_step_only_steps_one_instruction_with_Hc_vCont_s_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(use_Hc_packet=True, step_instruction="vCont;s")
@llgs_test
- @dwarf_test
@expectedFailureAndroid(bugnumber="llvm.com/pr24739", archs=["arm", "aarch64"])
- def test_single_step_only_steps_one_instruction_with_Hc_vCont_s_llgs_dwarf(self):
+ def test_single_step_only_steps_one_instruction_with_Hc_vCont_s_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(use_Hc_packet=True, step_instruction="vCont;s")
@debugserver_test
- @dsym_test
- def test_single_step_only_steps_one_instruction_with_vCont_s_thread_debugserver_dsym(self):
+ def test_single_step_only_steps_one_instruction_with_vCont_s_thread_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(use_Hc_packet=False, step_instruction="vCont;s:{thread}")
@llgs_test
- @dwarf_test
@expectedFailureAndroid(bugnumber="llvm.com/pr24739", archs=["arm", "aarch64"])
- def test_single_step_only_steps_one_instruction_with_vCont_s_thread_llgs_dwarf(self):
+ def test_single_step_only_steps_one_instruction_with_vCont_s_thread_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.single_step_only_steps_one_instruction(use_Hc_packet=False, step_instruction="vCont;s:{thread}")
diff --git a/lldb/test/tools/lldb-server/TestLldbGdbServer.py b/lldb/test/tools/lldb-server/TestLldbGdbServer.py
index 03dcc84..bbe8e77 100644
--- a/lldb/test/tools/lldb-server/TestLldbGdbServer.py
+++ b/lldb/test/tools/lldb-server/TestLldbGdbServer.py
@@ -116,17 +116,15 @@
self.expect_gdbremote_sequence()
@debugserver_test
- @dsym_test
- def test_start_inferior_debugserver_dsym(self):
+ def test_start_inferior_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.start_inferior()
@llgs_test
- @dwarf_test
- def test_start_inferior_llgs_dwarf(self):
+ def test_start_inferior_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.start_inferior()
def inferior_exit_0(self):
@@ -145,17 +143,15 @@
self.expect_gdbremote_sequence()
@debugserver_test
- @dsym_test
- def test_inferior_exit_0_debugserver_dsym(self):
+ def test_inferior_exit_0_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.inferior_exit_0()
@llgs_test
- @dwarf_test
- def test_inferior_exit_0_llgs_dwarf(self):
+ def test_inferior_exit_0_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.inferior_exit_0()
def inferior_exit_42(self):
@@ -179,17 +175,15 @@
self.expect_gdbremote_sequence()
@debugserver_test
- @dsym_test
- def test_inferior_exit_42_debugserver_dsym(self):
+ def test_inferior_exit_42_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.inferior_exit_42()
@llgs_test
- @dwarf_test
- def test_inferior_exit_42_llgs_dwarf(self):
+ def test_inferior_exit_42_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.inferior_exit_42()
def c_packet_works(self):
@@ -208,17 +202,15 @@
self.expect_gdbremote_sequence()
@debugserver_test
- @dsym_test
- def test_c_packet_works_debugserver_dsym(self):
+ def test_c_packet_works_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.c_packet_works()
@llgs_test
- @dwarf_test
- def test_c_packet_works_llgs_dwarf(self):
+ def test_c_packet_works_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.c_packet_works()
def inferior_print_exit(self):
@@ -242,17 +234,15 @@
self.assertIsNotNone(context)
@debugserver_test
- @dsym_test
- def test_inferior_print_exit_debugserver_dsym(self):
+ def test_inferior_print_exit_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.inferior_print_exit()
@llgs_test
- @dwarf_test
- def test_inferior_print_exit_llgs_dwarf(self):
+ def test_inferior_print_exit_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.inferior_print_exit()
def first_launch_stop_reply_thread_matches_first_qC(self):
@@ -275,17 +265,15 @@
self.expect_gdbremote_sequence()
@debugserver_test
- @dsym_test
- def test_first_launch_stop_reply_thread_matches_first_qC_debugserver_dsym(self):
+ def test_first_launch_stop_reply_thread_matches_first_qC_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.first_launch_stop_reply_thread_matches_first_qC()
@llgs_test
- @dwarf_test
- def test_first_launch_stop_reply_thread_matches_first_qC_llgs_dwarf(self):
+ def test_first_launch_stop_reply_thread_matches_first_qC_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.first_launch_stop_reply_thread_matches_first_qC()
def attach_commandline_continue_app_exits(self):
@@ -308,18 +296,16 @@
self.assertFalse(lldbgdbserverutils.process_is_running(procs["inferior"].pid, False))
@debugserver_test
- @dsym_test
- def test_attach_commandline_continue_app_exits_debugserver_dsym(self):
+ def test_attach_commandline_continue_app_exits_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_attach()
self.attach_commandline_continue_app_exits()
@llgs_test
- @dwarf_test
- def test_attach_commandline_continue_app_exits_llgs_dwarf(self):
+ def test_attach_commandline_continue_app_exits_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_attach()
self.attach_commandline_continue_app_exits()
@@ -346,17 +332,15 @@
self.assert_valid_reg_info(lldbgdbserverutils.parse_reg_info_response(reg_info_packet))
@debugserver_test
- @dsym_test
- def test_qRegisterInfo_returns_one_valid_result_debugserver_dsym(self):
+ def test_qRegisterInfo_returns_one_valid_result_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.qRegisterInfo_returns_one_valid_result()
@llgs_test
- @dwarf_test
- def test_qRegisterInfo_returns_one_valid_result_llgs_dwarf(self):
+ def test_qRegisterInfo_returns_one_valid_result_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.qRegisterInfo_returns_one_valid_result()
def qRegisterInfo_returns_all_valid_results(self):
@@ -379,17 +363,15 @@
self.assert_valid_reg_info(reg_info)
@debugserver_test
- @dsym_test
- def test_qRegisterInfo_returns_all_valid_results_debugserver_dsym(self):
+ def test_qRegisterInfo_returns_all_valid_results_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.qRegisterInfo_returns_all_valid_results()
@llgs_test
- @dwarf_test
- def test_qRegisterInfo_returns_all_valid_results_llgs_dwarf(self):
+ def test_qRegisterInfo_returns_all_valid_results_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.qRegisterInfo_returns_all_valid_results()
def qRegisterInfo_contains_required_generics(self):
@@ -426,17 +408,15 @@
self.assertTrue('flags' in generic_regs)
@debugserver_test
- @dsym_test
- def test_qRegisterInfo_contains_required_generics_debugserver_dsym(self):
+ def test_qRegisterInfo_contains_required_generics_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.qRegisterInfo_contains_required_generics()
@llgs_test
- @dwarf_test
- def test_qRegisterInfo_contains_required_generics_llgs_dwarf(self):
+ def test_qRegisterInfo_contains_required_generics_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.qRegisterInfo_contains_required_generics()
def qRegisterInfo_contains_at_least_one_register_set(self):
@@ -462,17 +442,15 @@
self.assertTrue(len(register_sets) >= 1)
@debugserver_test
- @dsym_test
- def test_qRegisterInfo_contains_at_least_one_register_set_debugserver_dsym(self):
+ def test_qRegisterInfo_contains_at_least_one_register_set_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.qRegisterInfo_contains_at_least_one_register_set()
@llgs_test
- @dwarf_test
- def test_qRegisterInfo_contains_at_least_one_register_set_llgs_dwarf(self):
+ def test_qRegisterInfo_contains_at_least_one_register_set_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.qRegisterInfo_contains_at_least_one_register_set()
def targetHasAVX(self):
@@ -518,10 +496,9 @@
self.assertEquals(self.targetHasAVX(), "Advanced Vector Extensions" in register_sets)
@llgs_test
- @dwarf_test
- def test_qRegisterInfo_contains_avx_registers_llgs_dwarf(self):
+ def test_qRegisterInfo_contains_avx_registers_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.qRegisterInfo_contains_avx_registers()
def qThreadInfo_contains_thread(self):
@@ -540,34 +517,30 @@
self.assertEqual(len(threads), 1)
@debugserver_test
- @dsym_test
- def test_qThreadInfo_contains_thread_launch_debugserver_dsym(self):
+ def test_qThreadInfo_contains_thread_launch_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.qThreadInfo_contains_thread()
@llgs_test
- @dwarf_test
- def test_qThreadInfo_contains_thread_launch_llgs_dwarf(self):
+ def test_qThreadInfo_contains_thread_launch_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.qThreadInfo_contains_thread()
@debugserver_test
- @dsym_test
- def test_qThreadInfo_contains_thread_attach_debugserver_dsym(self):
+ def test_qThreadInfo_contains_thread_attach_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_attach()
self.qThreadInfo_contains_thread()
@llgs_test
- @dwarf_test
- def test_qThreadInfo_contains_thread_attach_llgs_dwarf(self):
+ def test_qThreadInfo_contains_thread_attach_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_attach()
self.qThreadInfo_contains_thread()
@@ -600,34 +573,30 @@
self.assertEquals(threads[0], QC_thread_id)
@debugserver_test
- @dsym_test
- def test_qThreadInfo_matches_qC_launch_debugserver_dsym(self):
+ def test_qThreadInfo_matches_qC_launch_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.qThreadInfo_matches_qC()
@llgs_test
- @dwarf_test
- def test_qThreadInfo_matches_qC_launch_llgs_dwarf(self):
+ def test_qThreadInfo_matches_qC_launch_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.qThreadInfo_matches_qC()
@debugserver_test
- @dsym_test
- def test_qThreadInfo_matches_qC_attach_debugserver_dsym(self):
+ def test_qThreadInfo_matches_qC_attach_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_attach()
self.qThreadInfo_matches_qC()
@llgs_test
- @dwarf_test
- def test_qThreadInfo_matches_qC_attach_llgs_dwarf(self):
+ def test_qThreadInfo_matches_qC_attach_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_attach()
self.qThreadInfo_matches_qC()
@@ -673,34 +642,30 @@
reg_index += 1
@debugserver_test
- @dsym_test
- def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_debugserver_dsym(self):
+ def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
@llgs_test
- @dwarf_test
- def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_llgs_dwarf(self):
+ def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
@debugserver_test
- @dsym_test
- def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_debugserver_dsym(self):
+ def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_attach()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
@llgs_test
- @dwarf_test
- def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs_dwarf(self):
+ def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_attach()
self.p_returns_correct_data_size_for_each_qRegisterInfo()
@@ -734,34 +699,30 @@
self.assertEquals(int(context.get("thread_id"), 16), thread)
@debugserver_test
- @dsym_test
- def test_Hg_switches_to_3_threads_launch_debugserver_dsym(self):
+ def test_Hg_switches_to_3_threads_launch_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.Hg_switches_to_3_threads()
@llgs_test
- @dwarf_test
- def test_Hg_switches_to_3_threads_launch_llgs_dwarf(self):
+ def test_Hg_switches_to_3_threads_launch_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.Hg_switches_to_3_threads()
@debugserver_test
- @dsym_test
- def test_Hg_switches_to_3_threads_attach_debugserver_dsym(self):
+ def test_Hg_switches_to_3_threads_attach_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_attach()
self.Hg_switches_to_3_threads()
@llgs_test
- @dwarf_test
- def test_Hg_switches_to_3_threads_attach_llgs_dwarf(self):
+ def test_Hg_switches_to_3_threads_attach_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_attach()
self.Hg_switches_to_3_threads()
@@ -867,21 +828,19 @@
post_handle_thread_id = int(post_handle_thread_id, 16)
self.assertEquals(post_handle_thread_id, print_thread_id)
- @debugserver_test
- @dsym_test
@unittest2.expectedFailure()
- def test_Hc_then_Csignal_signals_correct_thread_launch_debugserver_dsym(self):
+ @debugserver_test
+ def test_Hc_then_Csignal_signals_correct_thread_launch_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
# Darwin debugserver translates some signals like SIGSEGV into some gdb expectations about fixed signal numbers.
self.Hc_then_Csignal_signals_correct_thread(self.TARGET_EXC_BAD_ACCESS)
@llgs_test
- @dwarf_test
- def test_Hc_then_Csignal_signals_correct_thread_launch_llgs_dwarf(self):
+ def test_Hc_then_Csignal_signals_correct_thread_launch_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.Hc_then_Csignal_signals_correct_thread(lldbutil.get_signal_number('SIGSEGV'))
@@ -932,18 +891,16 @@
self.assertEquals(read_contents, MEMORY_CONTENTS)
@debugserver_test
- @dsym_test
- def test_m_packet_reads_memory_debugserver_dsym(self):
+ def test_m_packet_reads_memory_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.m_packet_reads_memory()
@llgs_test
- @dwarf_test
- def test_m_packet_reads_memory_llgs_dwarf(self):
+ def test_m_packet_reads_memory_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.m_packet_reads_memory()
@@ -959,18 +916,16 @@
self.expect_gdbremote_sequence()
@debugserver_test
- @dsym_test
- def test_qMemoryRegionInfo_is_supported_debugserver_dsym(self):
+ def test_qMemoryRegionInfo_is_supported_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_is_supported()
@llgs_test
- @dwarf_test
- def test_qMemoryRegionInfo_is_supported_llgs_dwarf(self):
+ def test_qMemoryRegionInfo_is_supported_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_is_supported()
@@ -1022,18 +977,16 @@
self.assert_address_within_memory_region(code_address, mem_region_dict)
@debugserver_test
- @dsym_test
- def test_qMemoryRegionInfo_reports_code_address_as_executable_debugserver_dsym(self):
+ def test_qMemoryRegionInfo_reports_code_address_as_executable_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_code_address_as_executable()
@llgs_test
- @dwarf_test
- def test_qMemoryRegionInfo_reports_code_address_as_executable_llgs_dwarf(self):
+ def test_qMemoryRegionInfo_reports_code_address_as_executable_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_code_address_as_executable()
@@ -1085,18 +1038,16 @@
self.assert_address_within_memory_region(stack_address, mem_region_dict)
@debugserver_test
- @dsym_test
- def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_debugserver_dsym(self):
+ def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_stack_address_as_readable_writeable()
@llgs_test
- @dwarf_test
- def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_llgs_dwarf(self):
+ def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_stack_address_as_readable_writeable()
@@ -1149,18 +1100,16 @@
@debugserver_test
- @dsym_test
- def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_debugserver_dsym(self):
+ def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_heap_address_as_readable_writeable()
@llgs_test
- @dwarf_test
- def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_llgs_dwarf(self):
+ def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.qMemoryRegionInfo_reports_heap_address_as_readable_writeable()
@@ -1268,18 +1217,16 @@
self.assertIsNotNone(context)
@debugserver_test
- @dsym_test
- def test_software_breakpoint_set_and_remove_work_debugserver_dsym(self):
+ def test_software_breakpoint_set_and_remove_work_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.software_breakpoint_set_and_remove_work()
@llgs_test
- @dwarf_test
- def test_software_breakpoint_set_and_remove_work_llgs_dwarf(self):
+ def test_software_breakpoint_set_and_remove_work_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.software_breakpoint_set_and_remove_work()
@@ -1298,18 +1245,16 @@
self.assertTrue(len(supported_dict) > 0)
@debugserver_test
- @dsym_test
- def test_qSupported_returns_known_stub_features_debugserver_dsym(self):
+ def test_qSupported_returns_known_stub_features_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.qSupported_returns_known_stub_features()
@llgs_test
- @dwarf_test
- def test_qSupported_returns_known_stub_features_llgs_dwarf(self):
+ def test_qSupported_returns_known_stub_features_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.qSupported_returns_known_stub_features()
@@ -1358,18 +1303,16 @@
self.assertEquals(printed_message, TEST_MESSAGE + "X")
@debugserver_test
- @dsym_test
- def test_written_M_content_reads_back_correctly_debugserver_dsym(self):
+ def test_written_M_content_reads_back_correctly_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.written_M_content_reads_back_correctly()
@llgs_test
- @dwarf_test
- def test_written_M_content_reads_back_correctly_llgs_dwarf(self):
+ def test_written_M_content_reads_back_correctly_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.written_M_content_reads_back_correctly()
@@ -1404,18 +1347,16 @@
# Note: as of this moment, a hefty number of the GPR writes are failing with E32 (everything except rax-rdx, rdi, rsi, rbp).
# Come back to this. I have the test rigged to verify that at least some of the bit-flip writes work.
@debugserver_test
- @dsym_test
- def test_P_writes_all_gpr_registers_debugserver_dsym(self):
+ def test_P_writes_all_gpr_registers_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.P_writes_all_gpr_registers()
@llgs_test
- @dwarf_test
- def test_P_writes_all_gpr_registers_llgs_dwarf(self):
+ def test_P_writes_all_gpr_registers_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.P_writes_all_gpr_registers()
@@ -1512,18 +1453,16 @@
# Note: as of this moment, a hefty number of the GPR writes are failing with E32 (everything except rax-rdx, rdi, rsi, rbp).
@debugserver_test
- @dsym_test
- def test_P_and_p_thread_suffix_work_debugserver_dsym(self):
+ def test_P_and_p_thread_suffix_work_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.set_inferior_startup_launch()
self.P_and_p_thread_suffix_work()
@llgs_test
- @dwarf_test
- def test_P_and_p_thread_suffix_work_llgs_dwarf(self):
+ def test_P_and_p_thread_suffix_work_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.set_inferior_startup_launch()
self.P_and_p_thread_suffix_work()
diff --git a/lldb/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py b/lldb/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
index 11bccd3..2948aff 100644
--- a/lldb/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
+++ b/lldb/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
@@ -25,18 +25,16 @@
lldbutil.get_signal_number('SIGABRT'))
@debugserver_test
- @dsym_test
- def test_inferior_abort_received_debugserver_dsym(self):
+ def test_inferior_abort_received_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.inferior_abort_received()
@llgs_test
- @dwarf_test
# std::abort() on <= API 16 raises SIGSEGV - b.android.com/179836
@expectedFailureAndroid(api_levels=range(16 + 1))
- def test_inferior_abort_received_llgs_dwarf(self):
+ def test_inferior_abort_received_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.inferior_abort_received()
diff --git a/lldb/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py b/lldb/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
index 9f33038..322f41cd 100644
--- a/lldb/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
+++ b/lldb/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
@@ -26,15 +26,13 @@
self.assertEquals(int(hex_exit_code, 16), expected_signo)
@debugserver_test
- @dsym_test
- def test_inferior_seg_fault_received_debugserver_dsym(self):
+ def test_inferior_seg_fault_received_debugserver(self):
self.init_debugserver_test()
- self.buildDsym()
+ self.build()
self.inferior_seg_fault_received(self.GDB_REMOTE_STOP_CODE_BAD_ACCESS)
@llgs_test
- @dwarf_test
- def test_inferior_seg_fault_received_llgs_dwarf(self):
+ def test_inferior_seg_fault_received_llgs(self):
self.init_llgs_test()
- self.buildDwarf()
+ self.build()
self.inferior_seg_fault_received(lldbutil.get_signal_number('SIGSEGV'))
diff --git a/lldb/test/types/AbstractBase.py b/lldb/test/types/AbstractBase.py
index 0d12793..5b1d9b8 100644
--- a/lldb/test/types/AbstractBase.py
+++ b/lldb/test/types/AbstractBase.py
@@ -59,22 +59,19 @@
# variable #
#==========================================================================#
- def build_and_run(self, source, atoms, dsym=True, bc=False, qd=False):
- self.build_and_run_with_source_atoms_expr(source, atoms, expr=False, dsym=dsym, bc=bc, qd=qd)
+ def build_and_run(self, source, atoms, bc=False, qd=False):
+ self.build_and_run_with_source_atoms_expr(source, atoms, expr=False, bc=bc, qd=qd)
- def build_and_run_expr(self, source, atoms, dsym=True, bc=False, qd=False):
- self.build_and_run_with_source_atoms_expr(source, atoms, expr=True, dsym=dsym, bc=bc, qd=qd)
+ def build_and_run_expr(self, source, atoms, bc=False, qd=False):
+ self.build_and_run_with_source_atoms_expr(source, atoms, expr=True, bc=bc, qd=qd)
- def build_and_run_with_source_atoms_expr(self, source, atoms, expr, dsym=True, bc=False, qd=False):
+ def build_and_run_with_source_atoms_expr(self, source, atoms, expr, bc=False, qd=False):
# See also Makefile and basic_type.cpp:177.
if bc:
d = {'CXX_SOURCES': source, 'EXE': self.exe_name, 'CFLAGS_EXTRAS': '-DTEST_BLOCK_CAPTURED_VARS'}
else:
d = {'CXX_SOURCES': source, 'EXE': self.exe_name}
- if dsym:
- self.buildDsym(dictionary=d)
- else:
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
if expr:
self.generic_type_expr_tester(self.exe_name, atoms, blockCaptured=bc, quotedDisplay=qd)
diff --git a/lldb/test/types/HideTestFailures.py b/lldb/test/types/HideTestFailures.py
index 63facdf..38adfc5 100644
--- a/lldb/test/types/HideTestFailures.py
+++ b/lldb/test/types/HideTestFailures.py
@@ -39,103 +39,41 @@
# Call super's tearDown().
TestBase.tearDown(self)
- @skipUnlessDarwin
- def test_char_type_with_dsym(self):
+ def test_char_type(self):
"""Test that char-type variables are displayed correctly."""
d = {'CXX_SOURCES': 'char.cpp'}
- self.buildDsym(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
- self.char_type()
-
- def test_char_type_with_dwarf(self):
- """Test that char-type variables are displayed correctly."""
- d = {'CXX_SOURCES': 'char.cpp'}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.char_type()
-
- @skipUnlessDarwin
- def test_short_type_with_dsym(self):
- """Test that short-type variables are displayed correctly."""
- d = {'CXX_SOURCES': 'short.cpp'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.short_type()
-
- def test_short_type_with_dwarf(self):
- """Test that short-type variables are displayed correctly."""
- d = {'CXX_SOURCES': 'short.cpp'}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.short_type()
-
- @skipUnlessDarwin
- def test_int_type_with_dsym(self):
- """Test that int-type variables are displayed correctly."""
- d = {'CXX_SOURCES': 'int.cpp'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.int_type()
-
- def test_int_type_with_dwarf(self):
- """Test that int-type variables are displayed correctly."""
- d = {'CXX_SOURCES': 'int.cpp'}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.int_type()
-
- @skipUnlessDarwin
- def test_long_type_with_dsym(self):
- """Test that long-type variables are displayed correctly."""
- d = {'CXX_SOURCES': 'long.cpp'}
- print self.id()
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.long_type()
-
- def test_long_type_with_dwarf(self):
- """Test that long-type variables are displayed correctly."""
- d = {'CXX_SOURCES': 'long.cpp'}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.long_type()
-
- @skipUnlessDarwin
- def test_long_long_type_with_dsym(self):
- """Test that 'long long'-type variables are displayed correctly."""
- d = {'CXX_SOURCES': 'long_long.cpp'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.long_long_type()
-
- def test_long_long_type_with_dwarf(self):
- """Test that 'long long'-type variables are displayed correctly."""
- d = {'CXX_SOURCES': 'long_long.cpp'}
- self.buildDwarf(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- self.long_long_type()
-
- def char_type(self):
- """Test that char-type variables are displayed correctly."""
self.generic_type_tester(set(['char']), quotedDisplay=True)
- def int_type(self):
- """Test that int-type variables are displayed correctly."""
- self.generic_type_tester(set(['int']))
-
- def short_type(self):
+ def test_short_type(self):
"""Test that short-type variables are displayed correctly."""
+ d = {'CXX_SOURCES': 'short.cpp'}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
self.generic_type_tester(set(['short']))
- def long_type(self):
+ def test_int_type(self):
+ """Test that int-type variables are displayed correctly."""
+ d = {'CXX_SOURCES': 'int.cpp'}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
+ self.generic_type_tester(set(['int']))
+
+ def test_long_type(self):
"""Test that long-type variables are displayed correctly."""
+ d = {'CXX_SOURCES': 'long.cpp'}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
self.generic_type_tester(set(['long']))
- def long_long_type(self):
- """Test that long long-type variables are displayed correctly."""
+ def test_long_long_type(self):
+ """Test that 'long long'-type variables are displayed correctly."""
+ d = {'CXX_SOURCES': 'long_long.cpp'}
+ self.build(dictionary=d)
+ self.setTearDownCleanup(dictionary=d)
self.generic_type_tester(set(['long long']))
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/types/TestFloatTypes.py b/lldb/test/types/TestFloatTypes.py
index 7f403fe..ee2239b 100644
--- a/lldb/test/types/TestFloatTypes.py
+++ b/lldb/test/types/TestFloatTypes.py
@@ -19,42 +19,24 @@
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
- @skipUnlessDarwin
- @dsym_test
- def test_float_type_with_dsym(self):
+ def test_float_type(self):
"""Test that float-type variables are displayed correctly."""
self.build_and_run('float.cpp', set(['float']))
@skipUnlessDarwin
- @dsym_test
- def test_float_type_from_block_with_dsym(self):
+ def test_float_type_from_block(self):
"""Test that float-type variables are displayed correctly from a block."""
self.build_and_run('float.cpp', set(['float']), bc=True)
- @dwarf_test
- def test_float_type_with_dwarf(self):
- """Test that float-type variables are displayed correctly."""
- self.build_and_run('float.cpp', set(['float']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- @expectedFlakeyDarwin # failed 1/140 runs 'frame variable --show-types a_union_nonzero_ref.u.a' matches the output (from compiled code): 11001110
- def test_double_type_with_dsym(self):
+ def test_double_type(self):
"""Test that double-type variables are displayed correctly."""
self.build_and_run('double.cpp', set(['double']))
@skipUnlessDarwin
- @dsym_test
- def test_double_type_from_block_with_dsym(self):
+ def test_double_type_from_block(self):
"""Test that double-type variables are displayed correctly from a block."""
self.build_and_run('double.cpp', set(['double']), bc=True)
- @dwarf_test
- def test_double_type_with_dwarf(self):
- """Test that double-type variables are displayed correctly."""
- self.build_and_run('double.cpp', set(['double']), dsym=False)
-
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/types/TestFloatTypesExpr.py b/lldb/test/types/TestFloatTypesExpr.py
index 33ff0c5..27ae16e 100644
--- a/lldb/test/types/TestFloatTypesExpr.py
+++ b/lldb/test/types/TestFloatTypesExpr.py
@@ -22,41 +22,24 @@
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
- @skipUnlessDarwin
- @dsym_test
- def test_float_type_with_dsym(self):
+ def test_float_type(self):
"""Test that float-type variable expressions are evaluated correctly."""
self.build_and_run_expr('float.cpp', set(['float']))
@skipUnlessDarwin
- @dsym_test
- def test_float_type_from_block_with_dsym(self):
+ def test_float_type_from_block(self):
"""Test that float-type variables are displayed correctly from a block."""
self.build_and_run_expr('float.cpp', set(['float']), bc=True)
- @dwarf_test
- def test_float_type_with_dwarf(self):
- """Test that float-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('float.cpp', set(['float']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_double_type_with_dsym(self):
+ def test_double_type(self):
"""Test that double-type variable expressions are evaluated correctly."""
self.build_and_run_expr('double.cpp', set(['double']))
@skipUnlessDarwin
- @dsym_test
- def test_double_type_from_block_with_dsym(self):
+ def test_double_type_from_block(self):
"""Test that double-type variables are displayed correctly from a block."""
self.build_and_run_expr('double.cpp', set(['double']), bc=True)
- @dwarf_test
- def test_double_type_with_dwarf(self):
- """Test that double-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('double.cpp', set(['double']), dsym=False)
-
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
diff --git a/lldb/test/types/TestIntegerTypes.py b/lldb/test/types/TestIntegerTypes.py
index 58e8513..69b1af5 100644
--- a/lldb/test/types/TestIntegerTypes.py
+++ b/lldb/test/types/TestIntegerTypes.py
@@ -19,179 +19,96 @@
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
- @skipUnlessDarwin
- @dsym_test
- def test_char_type_with_dsym(self):
+ def test_char_type(self):
"""Test that char-type variables are displayed correctly."""
self.build_and_run('char.cpp', set(['char']), qd=True)
@skipUnlessDarwin
- @dsym_test
- def test_char_type_from_block_with_dsym(self):
+ def test_char_type_from_block(self):
"""Test that char-type variables are displayed correctly from a block."""
self.build_and_run('char.cpp', set(['char']), bc=True, qd=True)
- @dwarf_test
- def test_char_type_with_dwarf(self):
- """Test that char-type variables are displayed correctly."""
- self.build_and_run('char.cpp', set(['char']), dsym=False, qd=True)
-
- @skipUnlessDarwin
- @dsym_test
- def test_unsigned_char_type_with_dsym(self):
+ def test_unsigned_char_type(self):
"""Test that 'unsigned_char'-type variables are displayed correctly."""
self.build_and_run('unsigned_char.cpp', set(['unsigned', 'char']), qd=True)
@skipUnlessDarwin
- @dsym_test
- def test_unsigned_char_type_from_block_with_dsym(self):
+ def test_unsigned_char_type_from_block(self):
"""Test that 'unsigned char'-type variables are displayed correctly from a block."""
self.build_and_run('unsigned_char.cpp', set(['unsigned', 'char']), bc=True, qd=True)
- @dwarf_test
- def test_unsigned_char_type_with_dwarf(self):
- """Test that 'unsigned char'-type variables are displayed correctly."""
- self.build_and_run('unsigned_char.cpp', set(['unsigned', 'char']), dsym=False, qd=True)
-
- @skipUnlessDarwin
- @dsym_test
- def test_short_type_with_dsym(self):
+ def test_short_type(self):
"""Test that short-type variables are displayed correctly."""
self.build_and_run('short.cpp', set(['short']))
@skipUnlessDarwin
- @dsym_test
- def test_short_type_from_block_with_dsym(self):
+ def test_short_type_from_block(self):
"""Test that short-type variables are displayed correctly from a block."""
self.build_and_run('short.cpp', set(['short']), bc=True)
- @dwarf_test
- def test_short_type_with_dwarf(self):
- """Test that short-type variables are displayed correctly."""
- self.build_and_run('short.cpp', set(['short']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_unsigned_short_type_with_dsym(self):
+ def test_unsigned_short_type(self):
"""Test that 'unsigned_short'-type variables are displayed correctly."""
self.build_and_run('unsigned_short.cpp', set(['unsigned', 'short']))
@skipUnlessDarwin
- @dsym_test
- def test_unsigned_short_type_from_block_with_dsym(self):
+ def test_unsigned_short_type_from_block(self):
"""Test that 'unsigned short'-type variables are displayed correctly from a block."""
self.build_and_run('unsigned_short.cpp', set(['unsigned', 'short']), bc=True)
- @dwarf_test
- def test_unsigned_short_type_with_dwarf(self):
- """Test that 'unsigned short'-type variables are displayed correctly."""
- self.build_and_run('unsigned_short.cpp', set(['unsigned', 'short']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_int_type_with_dsym(self):
+ def test_int_type(self):
"""Test that int-type variables are displayed correctly."""
self.build_and_run('int.cpp', set(['int']))
@skipUnlessDarwin
- @dsym_test
- def test_int_type_from_block_with_dsym(self):
+ def test_int_type_from_block(self):
"""Test that int-type variables are displayed correctly from a block."""
- self.build_and_run('int.cpp', set(['int']), dsym=False)
+ self.build_and_run('int.cpp', set(['int']))
- @dwarf_test
- def test_int_type_with_dwarf(self):
- """Test that int-type variables are displayed correctly."""
- self.build_and_run('int.cpp', set(['int']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_unsigned_int_type_with_dsym(self):
+ def test_unsigned_int_type(self):
"""Test that 'unsigned_int'-type variables are displayed correctly."""
self.build_and_run('unsigned_int.cpp', set(['unsigned', 'int']))
@skipUnlessDarwin
- @dsym_test
- def test_unsigned_int_type_from_block_with_dsym(self):
+ def test_unsigned_int_type_from_block(self):
"""Test that 'unsigned int'-type variables are displayed correctly from a block."""
self.build_and_run('unsigned_int.cpp', set(['unsigned', 'int']), bc=True)
- @dwarf_test
- def test_unsigned_int_type_with_dwarf(self):
- """Test that 'unsigned int'-type variables are displayed correctly."""
- self.build_and_run('unsigned_int.cpp', set(['unsigned', 'int']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_long_type_with_dsym(self):
+ def test_long_type(self):
"""Test that long-type variables are displayed correctly."""
self.build_and_run('long.cpp', set(['long']))
@skipUnlessDarwin
- @dsym_test
- def test_long_type_from_block_with_dsym(self):
+ def test_long_type_from_block(self):
"""Test that long-type variables are displayed correctly from a block."""
self.build_and_run('long.cpp', set(['long']), bc=True)
- @dwarf_test
- def test_long_type_with_dwarf(self):
- """Test that long-type variables are displayed correctly."""
- self.build_and_run('long.cpp', set(['long']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_unsigned_long_type_with_dsym(self):
+ def test_unsigned_long_type(self):
"""Test that 'unsigned long'-type variables are displayed correctly."""
self.build_and_run('unsigned_long.cpp', set(['unsigned', 'long']))
@skipUnlessDarwin
- @dsym_test
- def test_unsigned_long_type_from_block_with_dsym(self):
+ def test_unsigned_long_type_from_block(self):
"""Test that 'unsigned_long'-type variables are displayed correctly from a block."""
self.build_and_run('unsigned_long.cpp', set(['unsigned', 'long']), bc=True)
- @dwarf_test
- def test_unsigned_long_type_with_dwarf(self):
- """Test that 'unsigned long'-type variables are displayed correctly."""
- self.build_and_run('unsigned_long.cpp', set(['unsigned', 'long']), dsym=False)
-
- # rdar://problem/8482903
- # test suite failure for types dir -- "long long" and "unsigned long long"
-
- @skipUnlessDarwin
- @dsym_test
- def test_long_long_type_with_dsym(self):
+ def test_long_long_type(self):
"""Test that 'long long'-type variables are displayed correctly."""
self.build_and_run('long_long.cpp', set(['long long']))
@skipUnlessDarwin
- @dsym_test
- def test_long_long_type_from_block_with_dsym(self):
+ def test_long_long_type_from_block(self):
"""Test that 'long_long'-type variables are displayed correctly from a block."""
self.build_and_run('long_long.cpp', set(['long long']), bc=True)
- @dwarf_test
- def test_long_long_type_with_dwarf(self):
- """Test that 'long long'-type variables are displayed correctly."""
- self.build_and_run('long_long.cpp', set(['long long']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_unsigned_long_long_type_with_dsym(self):
+ def test_unsigned_long_long_type(self):
"""Test that 'unsigned long long'-type variables are displayed correctly."""
self.build_and_run('unsigned_long_long.cpp', set(['unsigned', 'long long']))
@skipUnlessDarwin
- @dsym_test
- def test_unsigned_long_long_type_from_block_with_dsym(self):
+ def test_unsigned_long_long_type_from_block(self):
"""Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
self.build_and_run('unsigned_long_long.cpp', set(['unsigned', 'long long']), bc=True)
- @dwarf_test
- def test_unsigned_long_long_type_with_dwarf(self):
- """Test that 'unsigned long long'-type variables are displayed correctly."""
- self.build_and_run('unsigned_long_long.cpp', set(['unsigned', 'long long']), dsym=False)
-
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/types/TestIntegerTypesExpr.py b/lldb/test/types/TestIntegerTypesExpr.py
index 4cada92..3162c41 100644
--- a/lldb/test/types/TestIntegerTypesExpr.py
+++ b/lldb/test/types/TestIntegerTypesExpr.py
@@ -19,179 +19,96 @@
self.runCmd("settings set auto-confirm true")
self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
- @skipUnlessDarwin
- @dsym_test
- def test_char_type_with_dsym(self):
+ def test_char_type(self):
"""Test that char-type variable expressions are evaluated correctly."""
self.build_and_run_expr('char.cpp', set(['char']), qd=True)
@skipUnlessDarwin
- @dsym_test
- def test_char_type_from_block_with_dsym(self):
+ def test_char_type_from_block(self):
"""Test that char-type variables are displayed correctly from a block."""
self.build_and_run_expr('char.cpp', set(['char']), bc=True, qd=True)
- @dwarf_test
- def test_char_type_with_dwarf(self):
- """Test that char-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('char.cpp', set(['char']), dsym=False, qd=True)
-
- @skipUnlessDarwin
- @dsym_test
- def test_unsigned_char_type_with_dsym(self):
+ def test_unsigned_char_type(self):
"""Test that 'unsigned_char'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_char.cpp', set(['unsigned', 'char']), qd=True)
@skipUnlessDarwin
- @dsym_test
- def test_unsigned_char_type_from_block_with_dsym(self):
+ def test_unsigned_char_type_from_block(self):
"""Test that 'unsigned char'-type variables are displayed correctly from a block."""
self.build_and_run_expr('unsigned_char.cpp', set(['unsigned', 'char']), bc=True, qd=True)
- @dwarf_test
- def test_unsigned_char_type_with_dwarf(self):
- """Test that 'unsigned char'-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('unsigned_char.cpp', set(['unsigned', 'char']), dsym=False, qd=True)
-
- @skipUnlessDarwin
- @dsym_test
- def test_short_type_with_dsym(self):
+ def test_short_type(self):
"""Test that short-type variable expressions are evaluated correctly."""
self.build_and_run_expr('short.cpp', set(['short']))
@skipUnlessDarwin
- @dsym_test
- def test_short_type_from_block_with_dsym(self):
+ def test_short_type_from_block(self):
"""Test that short-type variables are displayed correctly from a block."""
self.build_and_run_expr('short.cpp', set(['short']), bc=True)
- @dwarf_test
- def test_short_type_with_dwarf(self):
- """Test that short-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('short.cpp', set(['short']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_unsigned_short_type_with_dsym(self):
+ def test_unsigned_short_type(self):
"""Test that 'unsigned_short'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_short.cpp', set(['unsigned', 'short']))
@skipUnlessDarwin
- @dsym_test
- def test_unsigned_short_type_from_block_with_dsym(self):
+ def test_unsigned_short_type_from_block(self):
"""Test that 'unsigned short'-type variables are displayed correctly from a block."""
self.build_and_run_expr('unsigned_short.cpp', set(['unsigned', 'short']), bc=True)
- @dwarf_test
- def test_unsigned_short_type_with_dwarf(self):
- """Test that 'unsigned short'-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('unsigned_short.cpp', set(['unsigned', 'short']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_int_type_with_dsym(self):
+ def test_int_type(self):
"""Test that int-type variable expressions are evaluated correctly."""
self.build_and_run_expr('int.cpp', set(['int']))
@skipUnlessDarwin
- @dsym_test
- def test_int_type_from_block_with_dsym(self):
+ def test_int_type_from_block(self):
"""Test that int-type variables are displayed correctly from a block."""
- self.build_and_run_expr('int.cpp', set(['int']), dsym=False)
+ self.build_and_run_expr('int.cpp', set(['int']))
- @dwarf_test
- def test_int_type_with_dwarf(self):
- """Test that int-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('int.cpp', set(['int']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_unsigned_int_type_with_dsym(self):
+ def test_unsigned_int_type(self):
"""Test that 'unsigned_int'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_int.cpp', set(['unsigned', 'int']))
@skipUnlessDarwin
- @dsym_test
- def test_unsigned_int_type_from_block_with_dsym(self):
+ def test_unsigned_int_type_from_block(self):
"""Test that 'unsigned int'-type variables are displayed correctly from a block."""
self.build_and_run_expr('unsigned_int.cpp', set(['unsigned', 'int']), bc=True)
- @dwarf_test
- def test_unsigned_int_type_with_dwarf(self):
- """Test that 'unsigned int'-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('unsigned_int.cpp', set(['unsigned', 'int']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_long_type_with_dsym(self):
+ def test_long_type(self):
"""Test that long-type variable expressions are evaluated correctly."""
self.build_and_run_expr('long.cpp', set(['long']))
@skipUnlessDarwin
- @dsym_test
- def test_long_type_from_block_with_dsym(self):
+ def test_long_type_from_block(self):
"""Test that long-type variables are displayed correctly from a block."""
self.build_and_run_expr('long.cpp', set(['long']), bc=True)
- @dwarf_test
- def test_long_type_with_dwarf(self):
- """Test that long-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('long.cpp', set(['long']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_unsigned_long_type_with_dsym(self):
+ def test_unsigned_long_type(self):
"""Test that 'unsigned long'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_long.cpp', set(['unsigned', 'long']))
@skipUnlessDarwin
- @dsym_test
- def test_unsigned_long_type_from_block_with_dsym(self):
+ def test_unsigned_long_type_from_block(self):
"""Test that 'unsigned_long'-type variables are displayed correctly from a block."""
self.build_and_run_expr('unsigned_long.cpp', set(['unsigned', 'long']), bc=True)
- @dwarf_test
- def test_unsigned_long_type_with_dwarf(self):
- """Test that 'unsigned long'-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('unsigned_long.cpp', set(['unsigned', 'long']), dsym=False)
-
- # rdar://problem/8482903
- # test suite failure for types dir -- "long long" and "unsigned long long"
-
- @skipUnlessDarwin
- @dsym_test
- def test_long_long_type_with_dsym(self):
+ def test_long_long_type(self):
"""Test that 'long long'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('long_long.cpp', set(['long long']))
@skipUnlessDarwin
- @dsym_test
- def test_long_long_type_from_block_with_dsym(self):
+ def test_long_long_type_from_block(self):
"""Test that 'long_long'-type variables are displayed correctly from a block."""
self.build_and_run_expr('long_long.cpp', set(['long long']), bc=True)
- @dwarf_test
- def test_long_long_type_with_dwarf(self):
- """Test that 'long long'-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('long_long.cpp', set(['long long']), dsym=False)
-
- @skipUnlessDarwin
- @dsym_test
- def test_unsigned_long_long_type_with_dsym(self):
+ def test_unsigned_long_long_type(self):
"""Test that 'unsigned long long'-type variable expressions are evaluated correctly."""
self.build_and_run_expr('unsigned_long_long.cpp', set(['unsigned', 'long long']))
@skipUnlessDarwin
- @dsym_test
- def test_unsigned_long_long_type_from_block_with_dsym(self):
+ def test_unsigned_long_long_type_from_block(self):
"""Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
self.build_and_run_expr('unsigned_long_long.cpp', set(['unsigned', 'long long']), bc=True)
- @dwarf_test
- def test_unsigned_long_long_type_with_dwarf(self):
- """Test that 'unsigned long long'-type variable expressions are evaluated correctly."""
- self.build_and_run_expr('unsigned_long_long.cpp', set(['unsigned', 'long long']), dsym=False)
-
if __name__ == '__main__':
import atexit
diff --git a/lldb/test/types/TestRecursiveTypes.py b/lldb/test/types/TestRecursiveTypes.py
index 08e4e91..97795a8 100644
--- a/lldb/test/types/TestRecursiveTypes.py
+++ b/lldb/test/types/TestRecursiveTypes.py
@@ -25,33 +25,15 @@
self.d1 = {'CXX_SOURCES': 'recursive_type_main.cpp recursive_type_1.cpp'}
self.d2 = {'CXX_SOURCES': 'recursive_type_main.cpp recursive_type_2.cpp'}
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
- @dsym_test
- def test_recursive_dsym_type_1(self):
+ def test_recursive_type_1(self):
"""Test that recursive structs are displayed correctly."""
- self.buildDsym(dictionary=self.d1)
+ self.build(dictionary=self.d1)
self.setTearDownCleanup(dictionary=self.d1)
self.print_struct()
- @dwarf_test
- def test_recursive_dwarf_type_1(self):
+ def test_recursive_type_2(self):
"""Test that recursive structs are displayed correctly."""
- self.buildDwarf(dictionary=self.d1)
- self.setTearDownCleanup(dictionary=self.d1)
- self.print_struct()
-
- @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
- @dsym_test
- def test_recursive_dsym_type_2(self):
- """Test that recursive structs are displayed correctly."""
- self.buildDsym(dictionary=self.d2)
- self.setTearDownCleanup(dictionary=self.d2)
- self.print_struct()
-
- @dwarf_test
- def test_recursive_dwarf_type_2(self):
- """Test that recursive structs are displayed correctly."""
- self.buildDwarf(dictionary=self.d2)
+ self.build(dictionary=self.d1)
self.setTearDownCleanup(dictionary=self.d2)
self.print_struct()
diff --git a/lldb/test/warnings/uuid/TestAddDsymCommand.py b/lldb/test/warnings/uuid/TestAddDsymCommand.py
index 9b94d8c..774e7725 100644
--- a/lldb/test/warnings/uuid/TestAddDsymCommand.py
+++ b/lldb/test/warnings/uuid/TestAddDsymCommand.py
@@ -16,6 +16,7 @@
self.source = 'main.cpp'
self.teardown_hook_added = False
+ @no_debug_info_test
def test_add_dsym_command_with_error(self):
"""Test that the 'add-dsym' command informs the user about failures."""
@@ -32,6 +33,7 @@
self.exe_name = 'a.out'
self.do_add_dsym_with_error(self.exe_name)
+ @no_debug_info_test
def test_add_dsym_command_with_success(self):
"""Test that the 'add-dsym' command informs the user about success."""
@@ -42,6 +44,7 @@
self.exe_name = 'a.out'
self.do_add_dsym_with_success(self.exe_name)
+ @no_debug_info_test
def test_add_dsym_with_dSYM_bundle(self):
"""Test that the 'add-dsym' command informs the user about success."""