| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 """Filter test cases based on command-line arguments. | 214 """Filter test cases based on command-line arguments. |
| 215 | 215 |
| 216 An argument with an asterisk in the end will match all test cases | 216 An argument with an asterisk in the end will match all test cases |
| 217 that have the argument as a prefix. Without asterisk, only exact matches | 217 that have the argument as a prefix. Without asterisk, only exact matches |
| 218 will be used with the exeption of the test-suite name as argument. | 218 will be used with the exeption of the test-suite name as argument. |
| 219 """ | 219 """ |
| 220 filtered = [] | 220 filtered = [] |
| 221 globs = [] | 221 globs = [] |
| 222 exact_matches = [] | 222 exact_matches = [] |
| 223 for a in args: | 223 for a in args: |
| 224 argpath = a.split(os.path.sep) | 224 argpath = a.split('/') |
| 225 if argpath[0] != self.name: | 225 if argpath[0] != self.name: |
| 226 continue | 226 continue |
| 227 if len(argpath) == 1 or (len(argpath) == 2 and argpath[1] == '*'): | 227 if len(argpath) == 1 or (len(argpath) == 2 and argpath[1] == '*'): |
| 228 return # Don't filter, run all tests in this suite. | 228 return # Don't filter, run all tests in this suite. |
| 229 path = os.path.sep.join(argpath[1:]) | 229 path = os.path.sep.join(argpath[1:]) |
| 230 if path[-1] == '*': | 230 if path[-1] == '*': |
| 231 path = path[:-1] | 231 path = path[:-1] |
| 232 globs.append(path) | 232 globs.append(path) |
| 233 else: | 233 else: |
| 234 exact_matches.append(path) | 234 exact_matches.append(path) |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 return (testcase.flags + ["--gtest_filter=" + testcase.path] + | 324 return (testcase.flags + ["--gtest_filter=" + testcase.path] + |
| 325 ["--gtest_random_seed=%s" % context.random_seed] + | 325 ["--gtest_random_seed=%s" % context.random_seed] + |
| 326 ["--gtest_print_time=0"] + | 326 ["--gtest_print_time=0"] + |
| 327 context.mode_flags) | 327 context.mode_flags) |
| 328 | 328 |
| 329 def _VariantGeneratorFactory(self): | 329 def _VariantGeneratorFactory(self): |
| 330 return StandardVariantGenerator | 330 return StandardVariantGenerator |
| 331 | 331 |
| 332 def shell(self): | 332 def shell(self): |
| 333 return self.name | 333 return self.name |
| OLD | NEW |