[Lldb-commits] [PATCH] D55835: [dotest] Consider unexpected passes as failures.

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 20 12:47:52 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL349818: [dotest] Consider unexpected passes as failures. (authored by JDevlieghere, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D55835?vs=178712&id=179132#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55835/new/

https://reviews.llvm.org/D55835

Files:
  lldb/trunk/lit/Suite/lldbtest.py
  lldb/trunk/third_party/Python/module/unittest2/unittest2/result.py


Index: lldb/trunk/third_party/Python/module/unittest2/unittest2/result.py
===================================================================
--- lldb/trunk/third_party/Python/module/unittest2/unittest2/result.py
+++ lldb/trunk/third_party/Python/module/unittest2/unittest2/result.py
@@ -148,7 +148,9 @@
 
     def wasSuccessful(self):
         "Tells whether or not this result was a success"
-        return (len(self.failures) + len(self.errors) == 0)
+        return (len(self.failures) +
+                len(self.errors) +
+                len(self.unexpectedSuccesses) == 0)
 
     def stop(self):
         "Indicates that the tests should be aborted"
Index: lldb/trunk/lit/Suite/lldbtest.py
===================================================================
--- lldb/trunk/lit/Suite/lldbtest.py
+++ lldb/trunk/lit/Suite/lldbtest.py
@@ -94,11 +94,10 @@
                 litConfig.maxIndividualTestTime))
 
         if exitCode:
-            return lit.Test.FAIL, out + err
-
-        unexpected_test_line = 'XPASS'
-        if unexpected_test_line in out or unexpected_test_line in err:
-            return lit.Test.XPASS, ''
+            if 'FAIL:' in out or 'FAIL:' in err:
+                return lit.Test.FAIL, out + err
+            if 'XPASS:' in out or 'XPASS:' in err:
+                return lit.Test.XPASS, out + err
 
         passing_test_line = 'RESULT: PASSED'
         if passing_test_line not in out and passing_test_line not in err:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55835.179132.patch
Type: text/x-patch
Size: 1458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181220/2dd9f070/attachment.bin>


More information about the lldb-commits mailing list