<div dir="ltr">Hello Jim,<div><br></div><div>It seems this patch breaks the tests that are decorated by expectedFailureAll.</div><div><a href="http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/8441">http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/8441</a><br></div><div><br></div><div>I had a patch to fix it, could you help to review?</div><div><a href="http://reviews.llvm.org/D14673">http://reviews.llvm.org/D14673</a></div><div><br></div><div>Thanks,</div><div>Ying</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 13, 2015 at 4:20 PM, Jim Ingham via lldb-commits <span dir="ltr"><<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: jingham<br>
Date: Fri Nov 13 18:20:33 2015<br>
New Revision: 253106<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=253106&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=253106&view=rev</a><br>
Log:<br>
Add a "not_in()" function you can apply to the list type arguments to expectedFailureAll to reverse<br>
the sense of the test.<br>
<br>
Modified:<br>
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py<br>
    lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py<br>
<br>
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py?rev=253106&r1=253105&r2=253106&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py?rev=253106&r1=253105&r2=253106&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py (original)<br>
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py Fri Nov 13 18:20:33 2015<br>
@@ -15,7 +15,7 @@ class ConsecutiveBreakpoitsTestCase(Test<br>
<br>
     mydir = TestBase.compute_mydir(__file__)<br>
<br>
-    @unittest2.expectedFailure("<a href="http://llvm.org/pr23478" rel="noreferrer" target="_blank">llvm.org/pr23478</a>")<br>
+    @expectedFailureAll("<a href="http://llvm.org/pr23478" rel="noreferrer" target="_blank">llvm.org/pr23478</a>", oslist = not_in(["macosx"]))<br>
     def test (self):<br>
         self.build ()<br>
         self.consecutive_breakpoints_tests()<br>
<br>
Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=253106&r1=253105&r2=253106&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=253106&r1=253105&r2=253106&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)<br>
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Nov 13 18:20:33 2015<br>
@@ -620,13 +620,30 @@ def expectedFailure(expected_fn, bugnumb<br>
 # @expectedFailureAll, xfail for all platform/compiler/arch,<br>
 # @expectedFailureAll(compiler='gcc'), xfail for gcc on all platform/architecture<br>
 # @expectedFailureAll(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), xfail for gcc>=4.9 on linux with i386<br>
+<br>
+# You can also pass not_in(list) to reverse the sense of the test for the arguments that<br>
+# are simple lists, namely oslist, compiler and debug_info.<br>
+<br>
+def not_in (iterable):<br>
+    return lambda x : x not in iterable<br>
+<br>
+def check_list_or_lambda (list_or_lambda, value):<br>
+    if six.callable(list_or_lambda):<br>
+        return list_or_lambda(value)<br>
+    else:<br>
+        return list_or_lambda is None or value in list_or_lambda<br>
+<br>
 def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, triple=None, debug_info=None):<br>
     def fn(self):<br>
-        return ((oslist is None or self.getPlatform() in oslist) and<br>
-                (compiler is None or (compiler in self.getCompiler() and self.expectedCompilerVersion(compiler_version))) and<br>
+        os_list_passes = check_list_or_lambda(oslist, self.getPlatform())<br>
+        compiler_passes = check_list_or_lambda(compiler, self.getCompiler()) and self.expectedCompilerVersion(compiler_version)<br>
+        debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)<br>
+<br>
+        return (os_list_passes  and<br>
+                compiler_passes and<br>
                 self.expectedArch(archs) and<br>
                 (triple is None or re.match(triple, lldb.DBG.GetSelectedPlatform().GetTriple())) and<br>
-                (debug_info is None or self.debug_info in debug_info))<br>
+                debug_info_passes)<br>
     return expectedFailure(fn, bugnumber)<br>
<br>
 def expectedFailureDwarf(bugnumber=None):<br>
<br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@lists.llvm.org">lldb-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
</blockquote></div><br></div>