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

Side by Side Diff: tools/telemetry/telemetry/test_runner.py

Issue 560153004: Telemetry: Fix exact_matches in telemetry.test_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move memory.py to memory_test.py to make the autogenerated name match the buildbot config Created 6 years, 3 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 | « content/test/gpu/gpu_tests/pixel.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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Parses the command line, discovers the appropriate tests, and runs them. 5 """Parses the command line, discovers the appropriate tests, and runs them.
6 6
7 Handles test configuration, but all the logic for 7 Handles test configuration, but all the logic for
8 actually running the test is in Test and PageRunner.""" 8 actually running the test is in Test and PageRunner."""
9 9
10 import hashlib 10 import hashlib
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 if exact_matches: 239 if exact_matches:
240 # Don't add aliases to search dict, only allow exact matching for them. 240 # Don't add aliases to search dict, only allow exact matching for them.
241 if input_test_name in config.test_aliases: 241 if input_test_name in config.test_aliases:
242 exact_match = config.test_aliases[input_test_name] 242 exact_match = config.test_aliases[input_test_name]
243 else: 243 else:
244 exact_match = input_test_name 244 exact_match = input_test_name
245 245
246 for test_class in _Tests(): 246 for test_class in _Tests():
247 if exact_match == test_class.Name(): 247 if exact_match == test_class.Name():
248 return [test_class] 248 return [test_class]
249 return []
249 250
250 # Fuzzy matching. 251 # Fuzzy matching.
251 return [test_class for test_class in _Tests() 252 return [test_class for test_class in _Tests()
252 if _Matches(input_test_name, test_class.Name())] 253 if _Matches(input_test_name, test_class.Name())]
253 254
254 255
255 def _GetJsonTestList(possible_browser, test_classes, num_shards): 256 def _GetJsonTestList(possible_browser, test_classes, num_shards):
256 """Returns a list of all enabled tests in a JSON format expected by buildbots. 257 """Returns a list of all enabled tests in a JSON format expected by buildbots.
257 258
258 JSON format (see build/android/pylib/perf/test_runner.py): 259 JSON format (see build/android/pylib/perf/test_runner.py):
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 352
352 # Parse and run the command. 353 # Parse and run the command.
353 parser = command.CreateParser() 354 parser = command.CreateParser()
354 command.AddCommandLineArgs(parser) 355 command.AddCommandLineArgs(parser)
355 options, args = parser.parse_args() 356 options, args = parser.parse_args()
356 if commands: 357 if commands:
357 args = args[1:] 358 args = args[1:]
358 options.positional_args = args 359 options.positional_args = args
359 command.ProcessCommandLineArgs(parser, options) 360 command.ProcessCommandLineArgs(parser, options)
360 return command().Run(options) 361 return command().Run(options)
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/pixel.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698