diff options
Diffstat (limited to 'lldb/test')
52 files changed, 184 insertions, 1 deletions
diff --git a/lldb/test/dotest.py b/lldb/test/dotest.py index d9d508e675e..4a2e1bf527b 100755 --- a/lldb/test/dotest.py +++ b/lldb/test/dotest.py @@ -74,6 +74,13 @@ just_do_python_api_test = False # By default, benchmarks tests are not run. just_do_benchmarks_test = False +# By default, both dsym and dwarf tests are performed. +# Use @dsym_test or @dwarf_test decorators, defined in lldbtest.py, to mark a test +# as a dsym or dwarf test. Use '-N dsym' or '-N dwarf' to exclude dsym or dwarf +# tests from running. +dont_do_dsym_test = False +dont_do_dwarf_test = False + # The blacklist is optional (-b blacklistFile) and allows a central place to skip # testclass's and/or testclass.testmethod's. blacklist = None @@ -199,6 +206,8 @@ where options: inferior programs to be debugged suggestions: do not lump the -A arch1^arch2 together such that the -E option applies to only one of the architectures +-N : don't do test cases marked with the @dsym decorator by passing 'dsym' as the option arg, or + don't do test cases marked with the @dwarf decorator by passing 'dwarf' as the option arg -a : don't do lldb Python API tests use @python_api_test to decorate a test case as lldb Python API test +a : just do lldb Python API tests @@ -353,6 +362,8 @@ def parseOptionsAndInitTestdirs(): global dont_do_python_api_test global just_do_python_api_test global just_do_benchmarks_test + global dont_do_dsym_test + global dont_do_dwarf_test global blacklist global blacklistConfig global configFile @@ -423,6 +434,21 @@ def parseOptionsAndInitTestdirs(): cflags_extras = sys.argv[index] os.environ["CFLAGS_EXTRAS"] = cflags_extras index += 1 + elif sys.argv[index].startswith('-N'): + # Increment by 1 to fetch 'dsym' or 'dwarf'. + index += 1 + if index >= len(sys.argv) or sys.argv[index].startswith('-'): + usage() + dont_do = sys.argv[index] + if dont_do.lower() == 'dsym': + dont_do_dsym_test = True + elif dont_do.lower() == 'dwarf': + dont_do_dwarf_test = True + else: + print "!!!" + print "Warning: -N only accepts either 'dsym' or 'dwarf' as the option arg; you passed in '%s'?" % dont_do + print "!!!" + index += 1 elif sys.argv[index].startswith('-a'): dont_do_python_api_test = True index += 1 @@ -995,10 +1021,12 @@ lldb.DBG = lldb.SBDebugger.Create() # Put the blacklist in the lldb namespace, to be used by lldb.TestBase. lldb.blacklist = blacklist -# Put dont/just_do_python_api_test in the lldb namespace. +# Put all these test decorators in the lldb namespace. lldb.dont_do_python_api_test = dont_do_python_api_test lldb.just_do_python_api_test = just_do_python_api_test lldb.just_do_benchmarks_test = just_do_benchmarks_test +lldb.dont_do_dsym_test = dont_do_dsym_test +lldb.dont_do_dwarf_test = dont_do_dwarf_test # Do we need to skip build and cleanup? lldb.skip_build_and_cleanup = skip_build_and_cleanup diff --git a/lldb/test/expression_command/call-function/TestCallStdStringFunction.py b/lldb/test/expression_command/call-function/TestCallStdStringFunction.py index 38d73ea4b6e..e9f23da0a84 100644 --- a/lldb/test/expression_command/call-function/TestCallStdStringFunction.py +++ b/lldb/test/expression_command/call-function/TestCallStdStringFunction.py @@ -19,11 +19,13 @@ class ExprCommandCallFunctionTestCase(TestBase): '// Please test these expressions while stopped at this line:') @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym(self): """Test calling std::String member function.""" self.buildDsym() self.call_function() + @dwarf_test def test_with_dwarf(self): """Test calling std::String member function.""" self.buildDsym() diff --git a/lldb/test/expression_command/formatters/TestFormatters.py b/lldb/test/expression_command/formatters/TestFormatters.py index 9e4246f4887..780f74ccd35 100644 --- a/lldb/test/expression_command/formatters/TestFormatters.py +++ b/lldb/test/expression_command/formatters/TestFormatters.py @@ -19,11 +19,13 @@ class ExprFormattersTestCase(TestBase): '// Stop here') @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym(self): """Test expr + formatters for good interoperability.""" self.buildDsym() self.do_my_test() + @dwarf_test def test_with_dwarf(self): """Test expr + formatters for good interoperability.""" self.buildDsym() diff --git a/lldb/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py b/lldb/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py index 3156e6e2c8a..3a516cdf4f1 100644 --- a/lldb/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py +++ b/lldb/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py @@ -20,11 +20,13 @@ class ObjCTypeQueryTestCase(TestBase): "// Set breakpoint here, then do 'expr (NSArray*)array_token'.") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym(self): """The expression parser's type search should be wider than the current compilation unit.""" self.buildDsym() self.type_query_from_other_cu() + @dwarf_test def test_with_dwarf(self): """The expression parser's type search should be wider than the current compilation unit.""" self.buildDwarf() diff --git a/lldb/test/functionalities/abbreviation/TestAbbreviations.py b/lldb/test/functionalities/abbreviation/TestAbbreviations.py index d1caf80ccdb..d89eb54ee85 100644 --- a/lldb/test/functionalities/abbreviation/TestAbbreviations.py +++ b/lldb/test/functionalities/abbreviation/TestAbbreviations.py @@ -65,10 +65,12 @@ class AbbreviationsTestCase(TestBase): @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym (self): self.buildDsym () self.running_abbreviations () + @dwarf_test def test_with_dwarf (self): self.buildDwarf () self.running_abbreviations () diff --git a/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py b/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py index ca5dba8d45a..3c40e650d27 100644 --- a/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py +++ b/lldb/test/functionalities/abbreviation/TestCommonShortSpellings.py @@ -13,10 +13,12 @@ class CommonShortSpellingsTestCase(TestBase): mydir = os.path.join("functionalities", "abbreviation") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym (self): self.buildDsym () self.run_abbrevs2 () + @dwarf_test def test_with_dwarf (self): self.buildDwarf () self.run_abbrevs2 () diff --git a/lldb/test/functionalities/alias/TestAliases.py b/lldb/test/functionalities/alias/TestAliases.py index b434d4d22cd..bcea21b76e5 100644 --- a/lldb/test/functionalities/alias/TestAliases.py +++ b/lldb/test/functionalities/alias/TestAliases.py @@ -12,10 +12,12 @@ class AliasTestCase(TestBase): mydir = os.path.join("functionalities", "alias") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym (self): self.buildDsym () self.alias_tests () + @dwarf_test def test_with_dwarf (self): self.buildDwarf () self.alias_tests () diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py index 601237c17dd..9c62720f1e1 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py @@ -17,12 +17,14 @@ class BreakpointCommandTestCase(TestBase): system(["/bin/sh", "-c", "rm -f output.txt"]) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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 def test_with_dwarf(self): """Test a sequence of breakpoint command add, list, and delete.""" self.buildDwarf() diff --git a/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py b/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py index 7538a7cd8ba..d9c50d70d25 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py @@ -13,6 +13,7 @@ class BreakpointConditionsTestCase(TestBase): mydir = os.path.join("functionalities", "breakpoint", "breakpoint_conditions") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym_and_run_command(self): """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'.""" self.buildDsym() @@ -20,17 +21,20 @@ class BreakpointConditionsTestCase(TestBase): @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @python_api_test + @dsym_test def test_with_dsym_and_python_api(self): """Use Python APIs to set breakpoint conditions.""" self.buildDsym() self.breakpoint_conditions_python() + @dwarf_test def test_with_dwarf_and_run_command(self): """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'.""" self.buildDwarf() self.breakpoint_conditions() @python_api_test + @dwarf_test def test_with_dwarf_and_python_api(self): """Use Python APIs to set breakpoint conditions.""" self.buildDwarf() diff --git a/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py b/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py index baa30597c56..8b1c9f8b402 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py @@ -12,10 +12,12 @@ class BreakpointIDTestCase(TestBase): mydir = os.path.join("functionalities", "breakpoint", "breakpoint_ids") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym (self): self.buildDsym () self.breakpoint_id_tests () + @dwarf_test def test_with_dwarf (self): self.buildDwarf () self.breakpoint_id_tests () diff --git a/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py b/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py index dc6d02b1227..22928314091 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py @@ -13,6 +13,7 @@ class BreakpointIgnoreCountTestCase(TestBase): mydir = os.path.join("functionalities", "breakpoint", "breakpoint_ignore_count") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym_and_run_command(self): """Exercise breakpoint ignore count with 'breakpoint set -i <count>'.""" self.buildDsym() @@ -20,17 +21,20 @@ class BreakpointIgnoreCountTestCase(TestBase): @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @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.breakpoint_ignore_count() @python_api_test + @dwarf_test def test_with_dwarf_and_python_api(self): """Use Python APIs to set breakpoint ignore count.""" self.buildDwarf() diff --git a/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py b/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py index a973c5486c6..e71dbb602da 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py @@ -12,11 +12,13 @@ class BreakpointLocationsTestCase(TestBase): mydir = os.path.join("functionalities", "breakpoint", "breakpoint_locations") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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 def test_with_dwarf(self): """Test breakpoint enable/disable for a breakpoint ID with multiple locations.""" self.buildDwarf() diff --git a/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py b/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py index 6e2706fbb34..3faa6380948 100644 --- a/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py +++ b/lldb/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py @@ -14,11 +14,13 @@ class InlinedBreakpointsTestCase(TestBase): mydir = os.path.join("functionalities", "breakpoint", "inlined_breakpoints") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym_and_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() diff --git a/lldb/test/functionalities/command_script/TestCommandScript.py b/lldb/test/functionalities/command_script/TestCommandScript.py index bc20285b872..0417ffdf9d1 100644 --- a/lldb/test/functionalities/command_script/TestCommandScript.py +++ b/lldb/test/functionalities/command_script/TestCommandScript.py @@ -12,10 +12,12 @@ class CmdPythonTestCase(TestBase): mydir = os.path.join("functionalities", "command_script") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym (self): self.buildDsym () self.pycmd_tests () + @dwarf_test def test_with_dwarf (self): self.buildDwarf () self.pycmd_tests () diff --git a/lldb/test/functionalities/conditional_break/TestConditionalBreak.py b/lldb/test/functionalities/conditional_break/TestConditionalBreak.py index 2a39fef9bf7..64903061523 100644 --- a/lldb/test/functionalities/conditional_break/TestConditionalBreak.py +++ b/lldb/test/functionalities/conditional_break/TestConditionalBreak.py @@ -19,23 +19,27 @@ class ConditionalBreakTestCase(TestBase): @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @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() @python_api_test + @dwarf_test def test_with_dwarf_python(self): """Exercise some thread and frame APIs to break if c() is called by a().""" self.buildDwarf() self.do_conditional_break() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym_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() 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 f5c8627343c..f280614f7be 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py @@ -12,11 +12,13 @@ class AdvDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-advanced") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 c7955807422..d3f9a36be2e 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py @@ -12,11 +12,13 @@ class CategoriesDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-categories") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 2257a48e126..22ebebfb5b1 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py @@ -12,11 +12,13 @@ class CppDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-cpp") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 fe870c919e1..4908a5a8fa7 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py @@ -12,11 +12,13 @@ class GlobalsDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-globals") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 f0576f63f48..47a9d1889db 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,11 +12,13 @@ class NamedSummariesDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-named-summaries") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 bb6a5bc3913..dd93cff7765 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py @@ -14,60 +14,70 @@ class ObjCDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-objc") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_plain_objc_with_dsym_and_run_command(self): """Test basic ObjC formatting behavior.""" self.buildDsym() self.plain_data_formatter_commands() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dwarf_test def test_plain_objc_with_dwarf_and_run_command(self): """Test basic ObjC formatting behavior.""" self.buildDwarf() self.plain_data_formatter_commands() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_appkit_with_dsym_and_run_command(self): """Test formatters for AppKit classes.""" self.buildDsym() self.appkit_data_formatter_commands() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dwarf_test def test_appkit_with_dwarf_and_run_command(self): """Test formatters for AppKit classes.""" self.buildDwarf() self.appkit_data_formatter_commands() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_coreframeworks_with_dsym_and_run_command(self): """Test formatters for Core OSX frameworks.""" self.buildDsym() self.cf_data_formatter_commands() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dwarf_test def test_coreframeworks_with_dwarf_and_run_command(self): """Test formatters for Core OSX frameworks.""" self.buildDwarf() self.cf_data_formatter_commands() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_kvo_with_dsym_and_run_command(self): """Test the behavior of formatters when KVO is in use.""" self.buildDsym() self.kvo_data_formatter_commands() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_rdar11106605_with_dsym_and_run_command(self): """Check that Unicode characters come out of CFString summary correctly.""" self.buildDsym() self.rdar11106605_commands() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dwarf_test def test_rdar11106605_with_dwarf_and_run_command(self): """Check that Unicode characters come out of CFString summary correctly.""" self.buildDwarf() @@ -75,6 +85,7 @@ class ObjCDataFormatterTestCase(TestBase): @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @expectedFailurei386 + @dsym_test def test_expr_with_dsym_and_run_command(self): """Test common cases of expression parser <--> formatters interaction.""" self.buildDsym() @@ -82,6 +93,7 @@ class ObjCDataFormatterTestCase(TestBase): @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @expectedFailurei386 + @dwarf_test def test_expr_with_dwarf_and_run_command(self): """Test common cases of expression parser <--> formatters interaction.""" self.buildDwarf() 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 73a7bac40d1..679323eb620 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,22 +12,26 @@ class PythonSynthDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-python-synth") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_rdar10960550_with_dsym_and_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() 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 161fcf6427a..de7d2c4722f 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py @@ -12,11 +12,13 @@ class ScriptDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-script") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 8c1aa39220b..119c90f8d14 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,11 +12,13 @@ class SkipSummaryDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-skip-summary") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 bfce217c56f..34bee07385a 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,11 +12,13 @@ class SmartArrayDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-smart-array") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 fa2a84e22c6..3ab313fb10c 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,11 +12,13 @@ class LibcxxListDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-stl", "libcxx", "list") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 366a1539807..7fb03af3214 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,11 +12,13 @@ class LibcxxMapDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-stl", "libcxx", "map") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 b90916a5dda..5b58abd1577 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,11 +12,13 @@ class LibcxxVectorDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-stl", "libcxx", "vector") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 ac5d9792977..0cb3148f592 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,11 +12,13 @@ class StdListDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-stl", "libstdcpp", "list") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 18ac94a3411..3b765e7a740 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,11 +12,13 @@ class StdMapDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-stl", "libstdcpp", "map") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 27c8200a290..3cb5ca0a6bb 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,11 +12,13 @@ class StdVectorDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-stl", "libstdcpp", "vector") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() 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 950fc55993a..da78518073a 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py @@ -12,11 +12,13 @@ class SynthDataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "data-formatter-synth") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() diff --git a/lldb/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py b/lldb/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py index 8578ddbb7e8..f58646fda1e 100644 --- a/lldb/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py +++ b/lldb/test/functionalities/data-formatter/rdar-10642615/Test-rdar-10642615.py @@ -13,11 +13,13 @@ class Radar10642615DataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "rdar-10642615") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() diff --git a/lldb/test/functionalities/data-formatter/rdar-10887661/TestRdar10887661.py b/lldb/test/functionalities/data-formatter/rdar-10887661/TestRdar10887661.py index d1276cee3a4..ed43e0dfe9b 100644 --- a/lldb/test/functionalities/data-formatter/rdar-10887661/TestRdar10887661.py +++ b/lldb/test/functionalities/data-formatter/rdar-10887661/TestRdar10887661.py @@ -14,6 +14,7 @@ class Rdar10887661TestCase(TestBase): # rdar://problem/10887661 @unittest2.expectedFailure @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() @@ -21,6 +22,7 @@ class Rdar10887661TestCase(TestBase): # rdar://problem/10887661 @unittest2.expectedFailure + @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() diff --git a/lldb/test/functionalities/data-formatter/rdar-3534688/TestFormattersOneIsSingular.py b/lldb/test/functionalities/data-formatter/rdar-3534688/TestFormattersOneIsSingular.py index 14afac35156..7a988027d78 100644 --- a/lldb/test/functionalities/data-formatter/rdar-3534688/TestFormattersOneIsSingular.py +++ b/lldb/test/functionalities/data-formatter/rdar-3534688/TestFormattersOneIsSingular.py @@ -13,12 +13,14 @@ class DataFormatterOneIsSingularTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "rdar-3534688") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_one_is_singular_with_dsym_and_run_command(self): """Test that 1 item is not as reported as 1 items.""" self.buildDsym() self.oneness_data_formatter_commands() @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() diff --git a/lldb/test/functionalities/data-formatter/rdar-9973865/Test-rdar-9973865.py b/lldb/test/functionalities/data-formatter/rdar-9973865/Test-rdar-9973865.py index fe656d631e7..892ee63f113 100644 --- a/lldb/test/functionalities/data-formatter/rdar-9973865/Test-rdar-9973865.py +++ b/lldb/test/functionalities/data-formatter/rdar-9973865/Test-rdar-9973865.py @@ -13,11 +13,13 @@ class Radar9973865DataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "rdar-9973865") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() diff --git a/lldb/test/functionalities/data-formatter/rdar-9973992/Test-rdar-9973992.py b/lldb/test/functionalities/data-formatter/rdar-9973992/Test-rdar-9973992.py index 87b3101cd3f..8e3abc2aa96 100644 --- a/lldb/test/functionalities/data-formatter/rdar-9973992/Test-rdar-9973992.py +++ b/lldb/test/functionalities/data-formatter/rdar-9973992/Test-rdar-9973992.py @@ -13,11 +13,13 @@ class Radar9973992DataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "rdar-9973992") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() diff --git a/lldb/test/functionalities/data-formatter/rdar-9974002/Test-rdar-9974002.py b/lldb/test/functionalities/data-formatter/rdar-9974002/Test-rdar-9974002.py index 1afdf81d0d2..b8e3938981a 100644 --- a/lldb/test/functionalities/data-formatter/rdar-9974002/Test-rdar-9974002.py +++ b/lldb/test/functionalities/data-formatter/rdar-9974002/Test-rdar-9974002.py @@ -13,11 +13,13 @@ class Radar9974002DataFormatterTestCase(TestBase): mydir = os.path.join("functionalities", "data-formatter", "rdar-9974002") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() diff --git a/lldb/test/functionalities/dead-strip/TestDeadStrip.py b/lldb/test/functionalities/dead-strip/TestDeadStrip.py index e3c6c5a85bc..c9c24774c6c 100644 --- a/lldb/test/functionalities/dead-strip/TestDeadStrip.py +++ b/lldb/test/functionalities/dead-strip/TestDeadStrip.py @@ -12,11 +12,13 @@ class DeadStripTestCase(TestBase): mydir = os.path.join("functionalities", "dead-strip") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym(self): """Test breakpoint works correctly with dead-code stripping.""" self.buildDsym() self.dead_strip() + @dwarf_test def test_with_dwarf(self): """Test breakpoint works correctly with dead-code stripping.""" self.buildDwarf() diff --git a/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py b/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py index edae42350ef..3861ceb44ec 100644 --- a/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py +++ b/lldb/test/functionalities/embedded_interpreter/TestConvenienceVariables.py @@ -11,11 +11,13 @@ class ConvenienceVariablesCase(TestBase): mydir = os.path.join("functionalities", "embedded_interpreter") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test 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 def test_with_dwarf_and_run_commands(self): """Test convenience variables lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame.""" self.buildDwarf() diff --git a/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py b/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py index 3fe24e29ea4..8aadab735db 100644 --- a/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py +++ b/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py @@ -13,11 +13,13 @@ class ExprDoesntDeadlockTestCase(TestBase): mydir = os.path.join("functionalities", "expr-doesnt-deadlock") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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 def test_with_dwarf_and_run_command(self): """Test that expr will time out and allow other threads to run if it blocks.""" self.buildDwarf() diff --git a/lldb/test/functionalities/memory/read/TestMemoryRead.py b/lldb/test/functionalities/memory/read/TestMemoryRead.py index cd7a496cf15..ba94fe7c76c 100644 --- a/lldb/test/functionalities/memory/read/TestMemoryRead.py +++ b/lldb/test/functionalities/memory/read/TestMemoryRead.py @@ -13,11 +13,13 @@ class MemoryReadTestCase(TestBase): mydir = os.path.join("functionalities", "memory", "read") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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 def test_memory_read_with_dwarf(self): """Test the 'memory read' command with plain and vector formats.""" self.buildDwarf() diff --git a/lldb/test/functionalities/process_launch/TestProcessLaunch.py b/lldb/test/functionalities/process_launch/TestProcessLaunch.py index dbfd351fc8e..2a735634e3c 100644 --- a/lldb/test/functionalities/process_launch/TestProcessLaunch.py +++ b/lldb/test/functionalities/process_launch/TestProcessLaunch.py @@ -12,11 +12,13 @@ class ProcessLaunchTestCase(TestBase): mydir = os.path.join("functionalities", "process_launch") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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 () @@ -101,12 +103,14 @@ class ProcessLaunchTestCase(TestBase): d = {'CXX_SOURCES' : 'print_cwd.cpp'} @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() + @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) diff --git a/lldb/test/functionalities/return-value/TestReturnValue.py b/lldb/test/functionalities/return-value/TestReturnValue.py index ad00a007d3e..0559cba3354 100644 --- a/lldb/test/functionalities/return-value/TestReturnValue.py +++ b/lldb/test/functionalities/return-value/TestReturnValue.py @@ -15,6 +15,7 @@ class ReturnValueTestCase(TestBase): @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") @expectedFailurei386 @python_api_test + @dsym_test def test_with_dsym_python(self): """Test getting return values from stepping out with dsyms.""" self.buildDsym() @@ -22,6 +23,7 @@ class ReturnValueTestCase(TestBase): @expectedFailurei386 @python_api_test + @dwarf_test def test_with_dwarf_python(self): """Test getting return values from stepping out.""" self.buildDwarf() diff --git a/lldb/test/functionalities/signal/TestSendSignal.py b/lldb/test/functionalities/signal/TestSendSignal.py index d470dff5f5c..7e97e4c92f2 100644 --- a/lldb/test/functionalities/signal/TestSendSignal.py +++ b/lldb/test/functionalities/signal/TestSendSignal.py @@ -10,11 +10,13 @@ class SendSignalTestCase(TestBase): mydir = os.path.join("functionalities", "signal") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() + @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() diff --git a/lldb/test/functionalities/stop-hook/TestStopHookCmd.py b/lldb/test/functionalities/stop-hook/TestStopHookCmd.py index bb2eaf2310f..732ca995903 100644 --- a/lldb/test/functionalities/stop-hook/TestStopHookCmd.py +++ b/lldb/test/functionalities/stop-hook/TestStopHookCmd.py @@ -18,11 +18,13 @@ class StopHookCmdTestCase(TestBase): self.runCmd("target stop-hook list", check=False) @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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() diff --git a/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py b/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py index 466ce5a1e4f..b0d7580122a 100644 --- a/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py +++ b/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py @@ -13,11 +13,13 @@ class StopHookMechanismTestCase(TestBase): mydir = os.path.join("functionalities", "stop-hook") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_with_dsym(self): """Test the stop-hook mechanism.""" self.buildDsym() self.stop_hook_firing() + @dwarf_test def test_with_dwarf(self): """Test the stop-hook mechanism.""" self.buildDwarf() diff --git a/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py b/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py index 8aad81c9b4f..2ec84aee55a 100644 --- a/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py +++ b/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py @@ -13,12 +13,14 @@ class StopHookForMultipleThreadsTestCase(TestBase): mydir = os.path.join("functionalities", "stop-hook", "multiple_threads") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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 def test_stop_hook_multiple_threads_with_dwarf(self): """Test that lldb stop-hook works for multiple threads.""" self.buildDwarf(dictionary=self.d) diff --git a/lldb/test/functionalities/target_command/TestTargetCommand.py b/lldb/test/functionalities/target_command/TestTargetCommand.py index dbeb5080120..31c06d416f1 100644 --- a/lldb/test/functionalities/target_command/TestTargetCommand.py +++ b/lldb/test/functionalities/target_command/TestTargetCommand.py @@ -18,6 +18,7 @@ class targetCommandTestCase(TestBase): 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): """Test some target commands: create, list, select.""" da = {'C_SOURCES': 'a.c', 'EXE': 'a.out'} @@ -37,6 +38,7 @@ class targetCommandTestCase(TestBase): # rdar://problem/9763907 # 'target variable' command fails if the target program has been run @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_target_variable_command_with_dsym(self): """Test 'target variable' command before and after starting the inferior.""" d = {'C_SOURCES': 'globals.c', 'EXE': 'globals'} @@ -46,6 +48,7 @@ class targetCommandTestCase(TestBase): self.do_target_variable_command('globals') @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @dsym_test def test_target_variable_command_with_dsym_no_fail(self): """Test 'target variable' command before and after starting the inferior.""" d = {'C_SOURCES': 'globals.c', 'EXE': 'globals'} diff --git a/lldb/test/functionalities/type_completion/TestTypeCompletion.py b/lldb/test/functionalities/type_completion/TestTypeCompletion.py index 5e214512313..789aeea2a28 100644 --- a/lldb/test/functionalities/type_completion/TestTypeCompletion.py +++ b/lldb/test/functionalities/type_completion/TestTypeCompletion.py @@ -12,11 +12,13 @@ class TypeCompletionTestCase(TestBase): mydir = os.path.join("functionalities", "type_completion") @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + @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 def test_with_dwarf_and_run_command(self): """Check that types only get completed when necessary.""" self.buildDwarf() diff --git a/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py b/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py index c937e4c60c4..609bd52dc5d 100644 --- a/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py +++ b/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py @@ -11,12 +11,14 @@ class HelloWatchpointTestCase(TestBase): mydir = os.path.join("functionalities", "watchpoint", "hello_watchpoint") + @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 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) diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index c61f7a0d76b..1626ca734cc 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -396,6 +396,40 @@ def benchmarks_test(func): wrapper.__benchmarks_test__ = True return wrapper +def dsym_test(func): + """Decorate the item as a dsym test.""" + if isinstance(func, type) and issubclass(func, unittest2.TestCase): + raise Exception("@dsym_test can only be used to decorate a test method") + @wraps(func) + def wrapper(self, *args, **kwargs): + try: + if lldb.dont_do_dsym_test: + self.skipTest("dsym tests") + except AttributeError: + pass + return func(self, *args, **kwargs) + + # Mark this function as such to separate them from the regular tests. + wrapper.__dsym_test__ = True + return wrapper + +def dwarf_test(func): + """Decorate the item as a dwarf test.""" + if isinstance(func, type) and issubclass(func, unittest2.TestCase): + raise Exception("@dwarf_test can only be used to decorate a test method") + @wraps(func) + def wrapper(self, *args, **kwargs): + try: + if lldb.dont_do_dwarf_test: + self.skipTest("dwarf tests") + except AttributeError: + pass + return func(self, *args, **kwargs) + + # Mark this function as such to separate them from the regular tests. + wrapper.__dwarf_test__ = True + return wrapper + def expectedFailureClang(func): """Decorate the item as a Clang only expectedFailure.""" if isinstance(func, type) and issubclass(func, unittest2.TestCase): |