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

Side by Side Diff: tools/testrunner/local/statusfile.py

Issue 22381003: Add flaky test classification feature to test suites. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testrunner/local/old_statusfile.py ('k') | tools/testrunner/local/testsuite.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 24 matching lines...) Expand all
35 35
36 36
37 # These outcomes can occur in a TestCase's outcomes list: 37 # These outcomes can occur in a TestCase's outcomes list:
38 SKIP = "SKIP" 38 SKIP = "SKIP"
39 FAIL = "FAIL" 39 FAIL = "FAIL"
40 PASS = "PASS" 40 PASS = "PASS"
41 OKAY = "OKAY" 41 OKAY = "OKAY"
42 TIMEOUT = "TIMEOUT" 42 TIMEOUT = "TIMEOUT"
43 CRASH = "CRASH" 43 CRASH = "CRASH"
44 SLOW = "SLOW" 44 SLOW = "SLOW"
45 FLAKY = "FLAKY"
45 # These are just for the status files and are mapped below in DEFS: 46 # These are just for the status files and are mapped below in DEFS:
46 FAIL_OK = "FAIL_OK" 47 FAIL_OK = "FAIL_OK"
47 PASS_OR_FAIL = "PASS_OR_FAIL" 48 PASS_OR_FAIL = "PASS_OR_FAIL"
48 49
49 ALWAYS = "ALWAYS" 50 ALWAYS = "ALWAYS"
50 51
51 KEYWORDS = {} 52 KEYWORDS = {}
52 for key in [SKIP, FAIL, PASS, OKAY, TIMEOUT, CRASH, SLOW, FAIL_OK, 53 for key in [SKIP, FAIL, PASS, OKAY, TIMEOUT, CRASH, SLOW, FLAKY, FAIL_OK,
53 PASS_OR_FAIL, ALWAYS]: 54 PASS_OR_FAIL, ALWAYS]:
54 KEYWORDS[key] = key 55 KEYWORDS[key] = key
55 56
56 DEFS = {FAIL_OK: [FAIL, OKAY], 57 DEFS = {FAIL_OK: [FAIL, OKAY],
57 PASS_OR_FAIL: [PASS, FAIL]} 58 PASS_OR_FAIL: [PASS, FAIL]}
58 59
59 # Support arches, modes to be written as keywords instead of strings. 60 # Support arches, modes to be written as keywords instead of strings.
60 VARIABLES = {ALWAYS: True} 61 VARIABLES = {ALWAYS: True}
61 for var in ["debug", "release", "android_arm", "android_ia32", "arm", "ia32", 62 for var in ["debug", "release", "android_arm", "android_ia32", "arm", "ia32",
62 "mipsel", "x64", "nacl_ia32", "nacl_x64"]: 63 "mipsel", "x64", "nacl_ia32", "nacl_x64"]:
63 VARIABLES[var] = var 64 VARIABLES[var] = var
64 65
65 66
66 def DoSkip(outcomes): 67 def DoSkip(outcomes):
67 return SKIP in outcomes or SLOW in outcomes 68 return SKIP in outcomes or SLOW in outcomes
68 69
69 70
70 def IsFlaky(outcomes): 71 def IsFlaky(outcomes):
72 return FLAKY in outcomes
73
74
75 def IsPassOrFail(outcomes):
71 return ((PASS in outcomes) and (FAIL in outcomes) and 76 return ((PASS in outcomes) and (FAIL in outcomes) and
72 (not CRASH in outcomes) and (not OKAY in outcomes)) 77 (not CRASH in outcomes) and (not OKAY in outcomes))
73 78
74 79
75 def IsFailOk(outcomes): 80 def IsFailOk(outcomes):
76 return (FAIL in outcomes) and (OKAY in outcomes) 81 return (FAIL in outcomes) and (OKAY in outcomes)
77 82
78 83
79 def _AddOutcome(result, new): 84 def _AddOutcome(result, new):
80 global DEFS 85 global DEFS
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 if not eval(section[0], variables): continue 141 if not eval(section[0], variables): continue
137 section = section[1] 142 section = section[1]
138 assert type(section) == dict 143 assert type(section) == dict
139 for rule in section: 144 for rule in section:
140 assert type(rule) == str 145 assert type(rule) == str
141 if rule[-1] == '*': 146 if rule[-1] == '*':
142 _ParseOutcomeList(rule, section[rule], wildcards, variables) 147 _ParseOutcomeList(rule, section[rule], wildcards, variables)
143 else: 148 else:
144 _ParseOutcomeList(rule, section[rule], rules, variables) 149 _ParseOutcomeList(rule, section[rule], rules, variables)
145 return rules, wildcards 150 return rules, wildcards
OLDNEW
« no previous file with comments | « tools/testrunner/local/old_statusfile.py ('k') | tools/testrunner/local/testsuite.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698