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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 slow = False | 129 slow = False |
130 pass_fail = False | 130 pass_fail = False |
131 testname = self.CommonTestName(t) | 131 testname = self.CommonTestName(t) |
132 if testname in self.rules: | 132 if testname in self.rules: |
133 used_rules.add(testname) | 133 used_rules.add(testname) |
134 # Even for skipped tests, as the TestCase object stays around and | 134 # Even for skipped tests, as the TestCase object stays around and |
135 # PrintReport() uses it. | 135 # PrintReport() uses it. |
136 t.outcomes = self.rules[testname] | 136 t.outcomes = self.rules[testname] |
137 if statusfile.DoSkip(t.outcomes): | 137 if statusfile.DoSkip(t.outcomes): |
138 continue # Don't add skipped tests to |filtered|. | 138 continue # Don't add skipped tests to |filtered|. |
139 for outc in t.outcomes: | |
Jakob Kummerow
2014/11/19 13:57:15
nit: no reason to abbreviate, s/outc/outcome/.
balazs.kilvady
2014/11/19 16:30:41
Done.
| |
140 assert type(outc) == str | |
Jakob Kummerow
2014/11/19 13:57:15
Let's drop the assert (this code is fairly perform
balazs.kilvady
2014/11/19 16:30:41
Done.
| |
141 if outc.startswith('Flags: '): | |
142 (tmp0, tmp1, flags) = outc.partition(':') | |
Jakob Kummerow
2014/11/19 13:57:15
Suggestion: simplify the body of the if-block to:
balazs.kilvady
2014/11/19 16:30:41
Done.
| |
143 t.flags += flags.split() | |
139 flaky = statusfile.IsFlaky(t.outcomes) | 144 flaky = statusfile.IsFlaky(t.outcomes) |
140 slow = statusfile.IsSlow(t.outcomes) | 145 slow = statusfile.IsSlow(t.outcomes) |
141 pass_fail = statusfile.IsPassOrFail(t.outcomes) | 146 pass_fail = statusfile.IsPassOrFail(t.outcomes) |
142 skip = False | 147 skip = False |
143 for rule in self.wildcards: | 148 for rule in self.wildcards: |
144 assert rule[-1] == '*' | 149 assert rule[-1] == '*' |
145 if testname.startswith(rule[:-1]): | 150 if testname.startswith(rule[:-1]): |
146 used_rules.add(rule) | 151 used_rules.add(rule) |
147 t.outcomes = self.wildcards[rule] | 152 t.outcomes = self.wildcards[rule] |
148 if statusfile.DoSkip(t.outcomes): | 153 if statusfile.DoSkip(t.outcomes): |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
261 return tests | 266 return tests |
262 | 267 |
263 def GetFlagsForTestCase(self, testcase, context): | 268 def GetFlagsForTestCase(self, testcase, context): |
264 return (testcase.flags + ["--gtest_filter=" + testcase.path] + | 269 return (testcase.flags + ["--gtest_filter=" + testcase.path] + |
265 ["--gtest_random_seed=%s" % context.random_seed] + | 270 ["--gtest_random_seed=%s" % context.random_seed] + |
266 ["--gtest_print_time=0"] + | 271 ["--gtest_print_time=0"] + |
267 context.mode_flags) | 272 context.mode_flags) |
268 | 273 |
269 def shell(self): | 274 def shell(self): |
270 return self.name | 275 return self.name |
OLD | NEW |