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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 for t in self.tests: | 89 for t in self.tests: |
90 testname = self.CommonTestName(t) | 90 testname = self.CommonTestName(t) |
91 if testname in self.rules: | 91 if testname in self.rules: |
92 used_rules.add(testname) | 92 used_rules.add(testname) |
93 outcomes = self.rules[testname] | 93 outcomes = self.rules[testname] |
94 t.outcomes = outcomes # Even for skipped tests, as the TestCase | 94 t.outcomes = outcomes # Even for skipped tests, as the TestCase |
95 # object stays around and PrintReport() uses it. | 95 # object stays around and PrintReport() uses it. |
96 if statusfile.DoSkip(outcomes): | 96 if statusfile.DoSkip(outcomes): |
97 continue # Don't add skipped tests to |filtered|. | 97 continue # Don't add skipped tests to |filtered|. |
98 if len(self.wildcards) != 0: | 98 if len(self.wildcards) != 0: |
| 99 skip = False |
99 for rule in self.wildcards: | 100 for rule in self.wildcards: |
100 assert rule[-1] == '*' | 101 assert rule[-1] == '*' |
101 if testname.startswith(rule[:-1]): | 102 if testname.startswith(rule[:-1]): |
102 used_rules.add(rule) | 103 used_rules.add(rule) |
103 outcomes = self.wildcards[rule] | 104 outcomes = self.wildcards[rule] |
| 105 t.outcomes = outcomes |
104 if statusfile.DoSkip(outcomes): | 106 if statusfile.DoSkip(outcomes): |
105 continue | 107 skip = True |
106 t.outcomes = outcomes | 108 break # "for rule in self.wildcards" |
| 109 if skip: continue # "for t in self.tests" |
107 filtered.append(t) | 110 filtered.append(t) |
108 self.tests = filtered | 111 self.tests = filtered |
109 | 112 |
110 if not warn_unused_rules: | 113 if not warn_unused_rules: |
111 return | 114 return |
112 | 115 |
113 for rule in self.rules: | 116 for rule in self.rules: |
114 if rule not in used_rules: | 117 if rule not in used_rules: |
115 print("Unused rule: %s -> %s" % (rule, self.rules[rule])) | 118 print("Unused rule: %s -> %s" % (rule, self.rules[rule])) |
116 for rule in self.wildcards: | 119 for rule in self.wildcards: |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 def StripOutputForTransmit(self, testcase): | 175 def StripOutputForTransmit(self, testcase): |
173 if not self.HasUnexpectedOutput(testcase): | 176 if not self.HasUnexpectedOutput(testcase): |
174 testcase.output.stdout = "" | 177 testcase.output.stdout = "" |
175 testcase.output.stderr = "" | 178 testcase.output.stderr = "" |
176 | 179 |
177 def CalculateTotalDuration(self): | 180 def CalculateTotalDuration(self): |
178 self.total_duration = 0.0 | 181 self.total_duration = 0.0 |
179 for t in self.tests: | 182 for t in self.tests: |
180 self.total_duration += t.duration | 183 self.total_duration += t.duration |
181 return self.total_duration | 184 return self.total_duration |
OLD | NEW |