From dcc8fc9e985f16a6df878ec0ff7212e0a2da0c8f Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 20 Dec 2018 20:44:23 +0000 Subject: [dotest] Consider unexpected passes as failures. Unexpected successes should be considered failures because they can hide regressions when not addressed. When a test is fixed and not re-enabled, it can easily regress without us noticing. I couldn't find a good way to make this change other than changing it in the unittest2 framework. I know this is less than optimal but since we have the dependency checked in and the change is pretty fundamental to the framework I think it's not unreasonable. Differential revision: https://reviews.llvm.org/D55835 llvm-svn: 349818 --- lldb/third_party/Python/module/unittest2/unittest2/result.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lldb/third_party/Python/module/unittest2') diff --git a/lldb/third_party/Python/module/unittest2/unittest2/result.py b/lldb/third_party/Python/module/unittest2/unittest2/result.py index 9d76429fb4a..8f89816b772 100644 --- a/lldb/third_party/Python/module/unittest2/unittest2/result.py +++ b/lldb/third_party/Python/module/unittest2/unittest2/result.py @@ -148,7 +148,9 @@ class TestResult(unittest.TestResult): 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" -- cgit v1.2.3