| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 # These outcomes can occur in a TestCase's outcomes list: | 29 # These outcomes can occur in a TestCase's outcomes list: |
| 30 SKIP = "SKIP" | 30 SKIP = "SKIP" |
| 31 FAIL = "FAIL" | 31 FAIL = "FAIL" |
| 32 PASS = "PASS" | 32 PASS = "PASS" |
| 33 OKAY = "OKAY" | 33 OKAY = "OKAY" |
| 34 TIMEOUT = "TIMEOUT" | 34 TIMEOUT = "TIMEOUT" |
| 35 CRASH = "CRASH" | 35 CRASH = "CRASH" |
| 36 SLOW = "SLOW" | 36 SLOW = "SLOW" |
| 37 FLAKY = "FLAKY" | 37 FLAKY = "FLAKY" |
| 38 FAST_VARIANTS = "FAST_VARIANTS" |
| 38 NO_VARIANTS = "NO_VARIANTS" | 39 NO_VARIANTS = "NO_VARIANTS" |
| 39 # 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: |
| 40 FAIL_OK = "FAIL_OK" | 41 FAIL_OK = "FAIL_OK" |
| 41 PASS_OR_FAIL = "PASS_OR_FAIL" | 42 PASS_OR_FAIL = "PASS_OR_FAIL" |
| 42 | 43 |
| 43 ALWAYS = "ALWAYS" | 44 ALWAYS = "ALWAYS" |
| 44 | 45 |
| 45 KEYWORDS = {} | 46 KEYWORDS = {} |
| 46 for key in [SKIP, FAIL, PASS, OKAY, TIMEOUT, CRASH, SLOW, FLAKY, FAIL_OK, | 47 for key in [SKIP, FAIL, PASS, OKAY, TIMEOUT, CRASH, SLOW, FLAKY, FAIL_OK, |
| 47 NO_VARIANTS, PASS_OR_FAIL, ALWAYS]: | 48 FAST_VARIANTS, NO_VARIANTS, PASS_OR_FAIL, ALWAYS]: |
| 48 KEYWORDS[key] = key | 49 KEYWORDS[key] = key |
| 49 | 50 |
| 50 DEFS = {FAIL_OK: [FAIL, OKAY], | 51 DEFS = {FAIL_OK: [FAIL, OKAY], |
| 51 PASS_OR_FAIL: [PASS, FAIL]} | 52 PASS_OR_FAIL: [PASS, FAIL]} |
| 52 | 53 |
| 53 # Support arches, modes to be written as keywords instead of strings. | 54 # Support arches, modes to be written as keywords instead of strings. |
| 54 VARIABLES = {ALWAYS: True} | 55 VARIABLES = {ALWAYS: True} |
| 55 for var in ["debug", "release", "android_arm", "android_arm64", "android_ia32",
"android_x87", | 56 for var in ["debug", "release", "android_arm", "android_arm64", "android_ia32",
"android_x87", |
| 56 "arm", "arm64", "ia32", "mips", "mipsel", "mips64el", "x64", "x87",
"nacl_ia32", | 57 "arm", "arm64", "ia32", "mips", "mipsel", "mips64el", "x64", "x87",
"nacl_ia32", |
| 57 "nacl_x64", "macos", "windows", "linux"]: | 58 "nacl_x64", "macos", "windows", "linux"]: |
| 58 VARIABLES[var] = var | 59 VARIABLES[var] = var |
| 59 | 60 |
| 60 | 61 |
| 61 def DoSkip(outcomes): | 62 def DoSkip(outcomes): |
| 62 return SKIP in outcomes | 63 return SKIP in outcomes |
| 63 | 64 |
| 64 | 65 |
| 65 def IsSlow(outcomes): | 66 def IsSlow(outcomes): |
| 66 return SLOW in outcomes | 67 return SLOW in outcomes |
| 67 | 68 |
| 68 | 69 |
| 69 def OnlyStandardVariant(outcomes): | 70 def OnlyStandardVariant(outcomes): |
| 70 return NO_VARIANTS in outcomes | 71 return NO_VARIANTS in outcomes |
| 71 | 72 |
| 72 | 73 |
| 74 def OnlyFastVariants(outcomes): |
| 75 return FAST_VARIANTS in outcomes |
| 76 |
| 77 |
| 73 def IsFlaky(outcomes): | 78 def IsFlaky(outcomes): |
| 74 return FLAKY in outcomes | 79 return FLAKY in outcomes |
| 75 | 80 |
| 76 | 81 |
| 77 def IsPassOrFail(outcomes): | 82 def IsPassOrFail(outcomes): |
| 78 return ((PASS in outcomes) and (FAIL in outcomes) and | 83 return ((PASS in outcomes) and (FAIL in outcomes) and |
| 79 (not CRASH in outcomes) and (not OKAY in outcomes)) | 84 (not CRASH in outcomes) and (not OKAY in outcomes)) |
| 80 | 85 |
| 81 | 86 |
| 82 def IsFailOk(outcomes): | 87 def IsFailOk(outcomes): |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 if not eval(section[0], variables): continue | 136 if not eval(section[0], variables): continue |
| 132 section = section[1] | 137 section = section[1] |
| 133 assert type(section) == dict | 138 assert type(section) == dict |
| 134 for rule in section: | 139 for rule in section: |
| 135 assert type(rule) == str | 140 assert type(rule) == str |
| 136 if rule[-1] == '*': | 141 if rule[-1] == '*': |
| 137 _ParseOutcomeList(rule, section[rule], wildcards, variables) | 142 _ParseOutcomeList(rule, section[rule], wildcards, variables) |
| 138 else: | 143 else: |
| 139 _ParseOutcomeList(rule, section[rule], rules, variables) | 144 _ParseOutcomeList(rule, section[rule], rules, variables) |
| 140 return rules, wildcards | 145 return rules, wildcards |
| OLD | NEW |