Author: labath Date: Mon Nov 16 05:11:10 2015 New Revision: 253197 URL: http://llvm.org/viewvc/llvm-project?rev=253197&view=rev Log: Revert "Add a "not_in()" function you can apply to the list type arguments to expectedFailureAll to reverse"
This reverts commit r253106. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py?rev=253197&r1=253196&r2=253197&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py Mon Nov 16 05:11:10 2015 @@ -15,7 +15,7 @@ class ConsecutiveBreakpoitsTestCase(Test mydir = TestBase.compute_mydir(__file__) - @expectedFailureAll("llvm.org/pr23478", oslist = not_in(["macosx"])) + @unittest2.expectedFailure("llvm.org/pr23478") def test (self): self.build () self.consecutive_breakpoints_tests() Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=253197&r1=253196&r2=253197&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Mon Nov 16 05:11:10 2015 @@ -620,30 +620,13 @@ def expectedFailure(expected_fn, bugnumb # @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 - -# You can also pass not_in(list) to reverse the sense of the test for the arguments that -# are simple lists, namely oslist, compiler and debug_info. - -def not_in (iterable): - return lambda x : x not in iterable - -def check_list_or_lambda (list_or_lambda, value): - if six.callable(list_or_lambda): - return list_or_lambda(value) - else: - return list_or_lambda is None or value in list_or_lambda - def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, triple=None, debug_info=None): def fn(self): - os_list_passes = check_list_or_lambda(oslist, self.getPlatform()) - compiler_passes = check_list_or_lambda(compiler, self.getCompiler()) and self.expectedCompilerVersion(compiler_version) - debug_info_passes = check_list_or_lambda(debug_info, self.debug_info) - - return (os_list_passes and - compiler_passes and + 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())) and - debug_info_passes) + (debug_info is None or self.debug_info in debug_info)) return expectedFailure(fn, bugnumber) def expectedFailureDwarf(bugnumber=None): _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits