Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Unified Diff: tools/testrunner/local/statusfile.py

Issue 2201033002: [test] Fix joining FAIL expectations in status files (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testrunner/local/statusfile.py
diff --git a/tools/testrunner/local/statusfile.py b/tools/testrunner/local/statusfile.py
index 02af2f743ad7115de73709b8920bd8c573768b56..8464ef22414448e72e59da586a5162485ba8f987 100644
--- a/tools/testrunner/local/statusfile.py
+++ b/tools/testrunner/local/statusfile.py
@@ -106,6 +106,16 @@ def _AddOutcome(result, new):
result.add(new)
+def _JoinsPassAndFail(outcomes1, outcomes2):
+ """Indicates if we join PASS and FAIL from two different outcome sets and
+ the first doesn't already contain both.
+ """
+ return (
+ PASS in outcomes1 and
+ not FAIL in outcomes1 and
+ FAIL in outcomes2
+ )
+
def _ParseOutcomeList(rule, outcomes, target_dict, variables):
result = set([])
if type(outcomes) == str:
@@ -122,6 +132,15 @@ def _ParseOutcomeList(rule, outcomes, target_dict, variables):
assert False
if len(result) == 0: return
if rule in target_dict:
+ # A FAIL without PASS in one rule has always precedence over a single
+ # PASS (without FAIL) in another. Otherwise the default PASS expectation
+ # in a rule with a modifier (e.g. PASS, SLOW) would be joined to a FAIL
+ # from another rule (which intended to mark a test as FAIL and not as
+ # PASS and FAIL).
+ if _JoinsPassAndFail(target_dict[rule], result):
+ target_dict[rule] -= set([PASS])
+ if _JoinsPassAndFail(result, target_dict[rule]):
+ result -= set([PASS])
target_dict[rule] |= result
else:
target_dict[rule] = result
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698