Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: tools/testrunner/local/testsuite.py

Issue 1281453003: [test] Make test filters platform-independent. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/run-tests.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « tools/run-tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698