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

Unified Diff: tools/try_perf.py

Issue 1342263003: [test] Allow passing extra flags to perf tryjobs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/try_perf.py
diff --git a/tools/try_perf.py b/tools/try_perf.py
index f05baef8ce5dc238f3ef39e826b0028c5ceaf906..14b2329f7429103f2240b490dcda5d8420299d78 100755
--- a/tools/try_perf.py
+++ b/tools/try_perf.py
@@ -30,7 +30,9 @@ V8_BASE = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
def main():
parser = argparse.ArgumentParser(description='')
- parser.add_argument("benchmarks", nargs="+", help="The benchmarks to run.")
+ parser.add_argument('benchmarks', nargs='+', help='The benchmarks to run.')
+ parser.add_argument('--extra-flags', default='',
+ help='Extra flags to be passed to the executable.')
for option in sorted(BOTS):
parser.add_argument(
option, dest='bots', action='append_const', const=BOTS[option],
@@ -44,6 +46,9 @@ def main():
print 'Please specify the benchmarks to run as arguments.'
return 1
+ assert '"' not in options.extra_flags and '\'' not in options.extra_flags, (
+ 'Invalid flag specification.')
+
# Ensure depot_tools are updated.
subprocess.check_output(
'gclient', shell=True, stderr=subprocess.STDOUT, cwd=V8_BASE)
@@ -52,8 +57,10 @@ def main():
cmd += ['-b %s' % bot for bot in options.bots]
benchmarks = ['"%s"' % benchmark for benchmark in options.benchmarks]
cmd += ['-p \'testfilter=[%s]\'' % ','.join(benchmarks)]
+ if options.extra_flags:
+ cmd += ['-p \'extra_flags="%s"\'' % options.extra_flags]
subprocess.check_call(' '.join(cmd), shell=True, cwd=V8_BASE)
-if __name__ == "__main__": # pragma: no cover
+if __name__ == '__main__': # pragma: no cover
sys.exit(main())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698