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

Unified Diff: tools/isolate/trace_test_cases.py

Issue 10993035: Reduce code duplication between run_test_cases.py and trace_test_cases.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/isolate/run_test_cases.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate/trace_test_cases.py
diff --git a/tools/isolate/trace_test_cases.py b/tools/isolate/trace_test_cases.py
index 7596a1def53ffaec89f1a11c122998e9790ba377..66dbe07b057477c561afb13fae85988db14c7056 100755
--- a/tools/isolate/trace_test_cases.py
+++ b/tools/isolate/trace_test_cases.py
@@ -174,7 +174,7 @@ def main():
default_variables.append(('EXECUTABLE_SUFFIX', '.exe'))
else:
default_variables.append(('EXECUTABLE_SUFFIX', ''))
- parser = run_test_cases.OptionParserWithTestShardingAndFiltering(
+ parser = run_test_cases.OptionParserTestCases(
usage='%prog <options> [gtest]',
description=sys.modules['__main__'].__doc__)
parser.format_description = lambda *_: parser.description
@@ -200,15 +200,6 @@ def main():
parser.add_option(
'-o', '--out',
help='output file, defaults to <executable>.test_cases')
- parser.add_option(
- '-j', '--jobs',
- type='int',
- help='number of parallel jobs')
- parser.add_option(
- '-t', '--timeout',
- default=120,
- type='int',
- help='number of parallel jobs')
options, args = parser.parse_args()
if len(args) != 1:
@@ -234,17 +225,7 @@ def main():
if not options.out:
options.out = '%s.test_cases' % executable
- # First, grab the test cases.
- if options.test_case_file:
- with open(options.test_case_file, 'r') as f:
- test_cases = filter(None, f.read().splitlines())
- else:
- test_cases = run_test_cases.get_test_cases(
- executable,
- options.whitelist,
- options.blacklist,
- options.index,
- options.shards)
+ test_cases = parser.process_gtest_options(executable, options)
# Then run them.
return trace_test_cases(
« no previous file with comments | « tools/isolate/run_test_cases.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698