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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 pass_fail = False | 172 pass_fail = False |
173 testname = self.CommonTestName(t) | 173 testname = self.CommonTestName(t) |
174 variant = t.variant or "" | 174 variant = t.variant or "" |
175 if variants: | 175 if variants: |
176 rules = self.rules[variant] | 176 rules = self.rules[variant] |
177 wildcards = self.wildcards[variant] | 177 wildcards = self.wildcards[variant] |
178 if testname in rules: | 178 if testname in rules: |
179 used_rules.add((testname, variant)) | 179 used_rules.add((testname, variant)) |
180 # Even for skipped tests, as the TestCase object stays around and | 180 # Even for skipped tests, as the TestCase object stays around and |
181 # PrintReport() uses it. | 181 # PrintReport() uses it. |
182 t.outcomes |= rules[testname] | 182 t.outcomes = t.outcomes | rules[testname] |
183 if statusfile.DoSkip(t.outcomes): | 183 if statusfile.DoSkip(t.outcomes): |
184 continue # Don't add skipped tests to |filtered|. | 184 continue # Don't add skipped tests to |filtered|. |
185 for outcome in t.outcomes: | 185 for outcome in t.outcomes: |
186 if outcome.startswith('Flags: '): | 186 if outcome.startswith('Flags: '): |
187 t.flags += outcome[7:].split() | 187 t.flags += outcome[7:].split() |
188 slow = statusfile.IsSlow(t.outcomes) | 188 slow = statusfile.IsSlow(t.outcomes) |
189 pass_fail = statusfile.IsPassOrFail(t.outcomes) | 189 pass_fail = statusfile.IsPassOrFail(t.outcomes) |
190 skip = False | 190 skip = False |
191 for rule in wildcards: | 191 for rule in wildcards: |
192 assert rule[-1] == '*' | 192 assert rule[-1] == '*' |
193 if testname.startswith(rule[:-1]): | 193 if testname.startswith(rule[:-1]): |
194 used_rules.add((rule, variant)) | 194 used_rules.add((rule, variant)) |
195 t.outcomes |= wildcards[rule] | 195 t.outcomes = t.outcomes | wildcards[rule] |
196 if statusfile.DoSkip(t.outcomes): | 196 if statusfile.DoSkip(t.outcomes): |
197 skip = True | 197 skip = True |
198 break # "for rule in wildcards" | 198 break # "for rule in wildcards" |
199 slow = slow or statusfile.IsSlow(t.outcomes) | 199 slow = slow or statusfile.IsSlow(t.outcomes) |
200 pass_fail = pass_fail or statusfile.IsPassOrFail(t.outcomes) | 200 pass_fail = pass_fail or statusfile.IsPassOrFail(t.outcomes) |
201 if (skip | 201 if (skip |
202 or self._FilterSlow(slow, slow_tests) | 202 or self._FilterSlow(slow, slow_tests) |
203 or self._FilterPassFail(pass_fail, pass_fail_tests)): | 203 or self._FilterPassFail(pass_fail, pass_fail_tests)): |
204 continue # "for t in self.tests" | 204 continue # "for t in self.tests" |
205 filtered.append(t) | 205 filtered.append(t) |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 return (testcase.flags + ["--gtest_filter=" + testcase.path] + | 343 return (testcase.flags + ["--gtest_filter=" + testcase.path] + |
344 ["--gtest_random_seed=%s" % context.random_seed] + | 344 ["--gtest_random_seed=%s" % context.random_seed] + |
345 ["--gtest_print_time=0"] + | 345 ["--gtest_print_time=0"] + |
346 context.mode_flags) | 346 context.mode_flags) |
347 | 347 |
348 def _VariantGeneratorFactory(self): | 348 def _VariantGeneratorFactory(self): |
349 return StandardVariantGenerator | 349 return StandardVariantGenerator |
350 | 350 |
351 def shell(self): | 351 def shell(self): |
352 return self.name | 352 return self.name |
OLD | NEW |