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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 # These outcomes can occur in a TestCase's outcomes list: | 30 # These outcomes can occur in a TestCase's outcomes list: |
31 SKIP = "SKIP" | 31 SKIP = "SKIP" |
32 FAIL = "FAIL" | 32 FAIL = "FAIL" |
33 PASS = "PASS" | 33 PASS = "PASS" |
34 OKAY = "OKAY" | 34 OKAY = "OKAY" |
35 TIMEOUT = "TIMEOUT" | 35 TIMEOUT = "TIMEOUT" |
36 CRASH = "CRASH" | 36 CRASH = "CRASH" |
37 SLOW = "SLOW" | 37 SLOW = "SLOW" |
38 FAST_VARIANTS = "FAST_VARIANTS" | 38 FAST_VARIANTS = "FAST_VARIANTS" |
39 NO_IGNITION = "NO_IGNITION" | |
40 NO_VARIANTS = "NO_VARIANTS" | 39 NO_VARIANTS = "NO_VARIANTS" |
41 # These are just for the status files and are mapped below in DEFS: | 40 # These are just for the status files and are mapped below in DEFS: |
42 FAIL_OK = "FAIL_OK" | 41 FAIL_OK = "FAIL_OK" |
43 PASS_OR_FAIL = "PASS_OR_FAIL" | 42 PASS_OR_FAIL = "PASS_OR_FAIL" |
44 FAIL_SLOPPY = "FAIL_SLOPPY" | 43 FAIL_SLOPPY = "FAIL_SLOPPY" |
45 | 44 |
46 ALWAYS = "ALWAYS" | 45 ALWAYS = "ALWAYS" |
47 | 46 |
48 KEYWORDS = {} | 47 KEYWORDS = {} |
49 for key in [SKIP, FAIL, PASS, OKAY, TIMEOUT, CRASH, SLOW, FAIL_OK, | 48 for key in [SKIP, FAIL, PASS, OKAY, TIMEOUT, CRASH, SLOW, FAIL_OK, |
50 FAST_VARIANTS, NO_IGNITION, NO_VARIANTS, PASS_OR_FAIL, FAIL_SLOPPY, | 49 FAST_VARIANTS, NO_VARIANTS, PASS_OR_FAIL, FAIL_SLOPPY, ALWAYS]: |
51 ALWAYS]: | |
52 KEYWORDS[key] = key | 50 KEYWORDS[key] = key |
53 | 51 |
54 DEFS = {FAIL_OK: [FAIL, OKAY], | 52 DEFS = {FAIL_OK: [FAIL, OKAY], |
55 PASS_OR_FAIL: [PASS, FAIL]} | 53 PASS_OR_FAIL: [PASS, FAIL]} |
56 | 54 |
57 # Support arches, modes to be written as keywords instead of strings. | 55 # Support arches, modes to be written as keywords instead of strings. |
58 VARIABLES = {ALWAYS: True} | 56 VARIABLES = {ALWAYS: True} |
59 for var in ["debug", "release", "big", "little", | 57 for var in ["debug", "release", "big", "little", |
60 "android_arm", "android_arm64", "android_ia32", "android_x87", | 58 "android_arm", "android_arm64", "android_ia32", "android_x87", |
61 "android_x64", "arm", "arm64", "ia32", "mips", "mipsel", "mips64", | 59 "android_x64", "arm", "arm64", "ia32", "mips", "mipsel", "mips64", |
62 "mips64el", "x64", "x87", "nacl_ia32", "nacl_x64", "ppc", "ppc64", | 60 "mips64el", "x64", "x87", "nacl_ia32", "nacl_x64", "ppc", "ppc64", |
63 "s390", "s390x", "macos", "windows", "linux", "aix"]: | 61 "s390", "s390x", "macos", "windows", "linux", "aix"]: |
64 VARIABLES[var] = var | 62 VARIABLES[var] = var |
65 | 63 |
66 | 64 |
67 def DoSkip(outcomes): | 65 def DoSkip(outcomes): |
68 return SKIP in outcomes | 66 return SKIP in outcomes |
69 | 67 |
70 | 68 |
71 def IsSlow(outcomes): | 69 def IsSlow(outcomes): |
72 return SLOW in outcomes | 70 return SLOW in outcomes |
73 | 71 |
74 | 72 |
75 def NoIgnitionVariant(outcomes): | |
76 return NO_IGNITION in outcomes | |
77 | |
78 | |
79 def OnlyStandardVariant(outcomes): | 73 def OnlyStandardVariant(outcomes): |
80 return NO_VARIANTS in outcomes | 74 return NO_VARIANTS in outcomes |
81 | 75 |
82 | 76 |
83 def OnlyFastVariants(outcomes): | 77 def OnlyFastVariants(outcomes): |
84 return FAST_VARIANTS in outcomes | 78 return FAST_VARIANTS in outcomes |
85 | 79 |
86 | 80 |
87 def IsPassOrFail(outcomes): | 81 def IsPassOrFail(outcomes): |
88 return ((PASS in outcomes) and (FAIL in outcomes) and | 82 return ((PASS in outcomes) and (FAIL in outcomes) and |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 for rule in section: | 166 for rule in section: |
173 _assert(type(rule) == str, "Rule key must be a string") | 167 _assert(type(rule) == str, "Rule key must be a string") |
174 _assert(not rule.startswith(root_prefix), | 168 _assert(not rule.startswith(root_prefix), |
175 "Suite name prefix must not be used in rule keys") | 169 "Suite name prefix must not be used in rule keys") |
176 _assert(not rule.endswith('.js'), | 170 _assert(not rule.endswith('.js'), |
177 ".js extension must not be used in rule keys.") | 171 ".js extension must not be used in rule keys.") |
178 return status["success"] | 172 return status["success"] |
179 except Exception as e: | 173 except Exception as e: |
180 print e | 174 print e |
181 return False | 175 return False |
OLD | NEW |