JDevlieghere created this revision. JDevlieghere added reviewers: labath, mib. Herald added a project: All. JDevlieghere requested review of this revision.
Currently a NO_DEBUG_INFO_TESTCASE will return None as it's debug info type, causing the decorator to consider it a match. If such a test case is marked as an expected failure, the decorator will incorrectly cause an XPASS. I discovered this issue when I was trying to speed up our remote test suite by running every test as a single variant. https://reviews.llvm.org/D123401 Files: lldb/packages/Python/lldbsuite/test/decorators.py lldb/test/API/test_utils/TestDecorators.py Index: lldb/test/API/test_utils/TestDecorators.py =================================================================== --- /dev/null +++ lldb/test/API/test_utils/TestDecorators.py @@ -0,0 +1,13 @@ +from lldbsuite.test.lldbtest import Base +from lldbsuite.test.decorators import * + + +class TestDecorators(Base): + + mydir = Base.compute_mydir(__file__) + NO_DEBUG_INFO_TESTCASE = True + + @expectedFailureAll(debug_info="dwarf") + def test_decorator_skip_no_debug_info(self): + """Test that specifying a debug info category works for a NO_DEBUG_INFO_TESTCASE""" + pass Index: lldb/packages/Python/lldbsuite/test/decorators.py =================================================================== --- lldb/packages/Python/lldbsuite/test/decorators.py +++ lldb/packages/Python/lldbsuite/test/decorators.py @@ -183,7 +183,7 @@ skip_for_arch = _match_decorator_property( archs, self.getArchitecture()) skip_for_debug_info = _match_decorator_property( - debug_info, self.getDebugInfo()) + debug_info, self.getDebugInfo() if self.getDebugInfo() else "") skip_for_triple = _match_decorator_property( triple, lldb.selected_platform.GetTriple()) skip_for_remote = _match_decorator_property(
Index: lldb/test/API/test_utils/TestDecorators.py =================================================================== --- /dev/null +++ lldb/test/API/test_utils/TestDecorators.py @@ -0,0 +1,13 @@ +from lldbsuite.test.lldbtest import Base +from lldbsuite.test.decorators import * + + +class TestDecorators(Base): + + mydir = Base.compute_mydir(__file__) + NO_DEBUG_INFO_TESTCASE = True + + @expectedFailureAll(debug_info="dwarf") + def test_decorator_skip_no_debug_info(self): + """Test that specifying a debug info category works for a NO_DEBUG_INFO_TESTCASE""" + pass Index: lldb/packages/Python/lldbsuite/test/decorators.py =================================================================== --- lldb/packages/Python/lldbsuite/test/decorators.py +++ lldb/packages/Python/lldbsuite/test/decorators.py @@ -183,7 +183,7 @@ skip_for_arch = _match_decorator_property( archs, self.getArchitecture()) skip_for_debug_info = _match_decorator_property( - debug_info, self.getDebugInfo()) + debug_info, self.getDebugInfo() if self.getDebugInfo() else "") skip_for_triple = _match_decorator_property( triple, lldb.selected_platform.GetTriple()) skip_for_remote = _match_decorator_property(
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits