OLD | NEW |
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 Loading... |
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" | |
46 # These are just for the status files and are mapped below in DEFS: | 45 # These are just for the status files and are mapped below in DEFS: |
47 FAIL_OK = "FAIL_OK" | 46 FAIL_OK = "FAIL_OK" |
48 PASS_OR_FAIL = "PASS_OR_FAIL" | 47 PASS_OR_FAIL = "PASS_OR_FAIL" |
49 | 48 |
50 ALWAYS = "ALWAYS" | 49 ALWAYS = "ALWAYS" |
51 | 50 |
52 KEYWORDS = {} | 51 KEYWORDS = {} |
53 for key in [SKIP, FAIL, PASS, OKAY, TIMEOUT, CRASH, SLOW, FLAKY, FAIL_OK, | 52 for key in [SKIP, FAIL, PASS, OKAY, TIMEOUT, CRASH, SLOW, FAIL_OK, |
54 PASS_OR_FAIL, ALWAYS]: | 53 PASS_OR_FAIL, ALWAYS]: |
55 KEYWORDS[key] = key | 54 KEYWORDS[key] = key |
56 | 55 |
57 DEFS = {FAIL_OK: [FAIL, OKAY], | 56 DEFS = {FAIL_OK: [FAIL, OKAY], |
58 PASS_OR_FAIL: [PASS, FAIL]} | 57 PASS_OR_FAIL: [PASS, FAIL]} |
59 | 58 |
60 # Support arches, modes to be written as keywords instead of strings. | 59 # Support arches, modes to be written as keywords instead of strings. |
61 VARIABLES = {ALWAYS: True} | 60 VARIABLES = {ALWAYS: True} |
62 for var in ["debug", "release", "android_arm", "android_ia32", "arm", "ia32", | 61 for var in ["debug", "release", "android_arm", "android_ia32", "arm", "ia32", |
63 "mipsel", "x64", "nacl_ia32", "nacl_x64"]: | 62 "mipsel", "x64", "nacl_ia32", "nacl_x64"]: |
64 VARIABLES[var] = var | 63 VARIABLES[var] = var |
65 | 64 |
66 | 65 |
67 def DoSkip(outcomes): | 66 def DoSkip(outcomes): |
68 return SKIP in outcomes or SLOW in outcomes | 67 return SKIP in outcomes or SLOW in outcomes |
69 | 68 |
70 | 69 |
71 def IsFlaky(outcomes): | 70 def IsFlaky(outcomes): |
72 return FLAKY in outcomes | |
73 | |
74 | |
75 def IsPassOrFail(outcomes): | |
76 return ((PASS in outcomes) and (FAIL in outcomes) and | 71 return ((PASS in outcomes) and (FAIL in outcomes) and |
77 (not CRASH in outcomes) and (not OKAY in outcomes)) | 72 (not CRASH in outcomes) and (not OKAY in outcomes)) |
78 | 73 |
79 | 74 |
80 def IsFailOk(outcomes): | 75 def IsFailOk(outcomes): |
81 return (FAIL in outcomes) and (OKAY in outcomes) | 76 return (FAIL in outcomes) and (OKAY in outcomes) |
82 | 77 |
83 | 78 |
84 def _AddOutcome(result, new): | 79 def _AddOutcome(result, new): |
85 global DEFS | 80 global DEFS |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 if not eval(section[0], variables): continue | 136 if not eval(section[0], variables): continue |
142 section = section[1] | 137 section = section[1] |
143 assert type(section) == dict | 138 assert type(section) == dict |
144 for rule in section: | 139 for rule in section: |
145 assert type(rule) == str | 140 assert type(rule) == str |
146 if rule[-1] == '*': | 141 if rule[-1] == '*': |
147 _ParseOutcomeList(rule, section[rule], wildcards, variables) | 142 _ParseOutcomeList(rule, section[rule], wildcards, variables) |
148 else: | 143 else: |
149 _ParseOutcomeList(rule, section[rule], rules, variables) | 144 _ParseOutcomeList(rule, section[rule], rules, variables) |
150 return rules, wildcards | 145 return rules, wildcards |
OLD | NEW |