From: machenbach@chromium.org Date: Thu, 31 Oct 2013 10:14:02 +0000 (+0000) Subject: Add no-variants option to test runner. X-Git-Tag: upstream/4.7.83~11923 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3cb584c2b47b18b00bdee96f14eef814dcbf1d31;p=platform%2Fupstream%2Fv8.git Add no-variants option to test runner. BUG= R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/48883003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/tools/run-tests.py b/tools/run-tests.py index dfe9036..2fdbeb9 100755 --- a/tools/run-tests.py +++ b/tools/run-tests.py @@ -125,6 +125,9 @@ def BuildOptions(): result.add_option("--no-stress", "--nostress", help="Don't run crankshaft --always-opt --stress-op test", default=False, dest="no_stress", action="store_true") + result.add_option("--no-variants", "--novariants", + help="Don't run any testing variants", + default=False, dest="no_variants", action="store_true") result.add_option("--outdir", help="Base directory with compile output", default="out") result.add_option("-p", "--progress", @@ -197,8 +200,18 @@ def ProcessOptions(options): options.extra_flags = shlex.split(options.extra_flags) if options.j == 0: options.j = multiprocessing.cpu_count() + + def excl(*args): + """Returns true if zero or one of multiple arguments are true.""" + return reduce(lambda x, y: x + y, args) <= 1 + + if not excl(options.no_stress, options.stress_only, options.no_variants): + print "Use only one of --no-stress, --stress-only or --no-variants." + return False if options.no_stress: VARIANT_FLAGS = [[], ["--nocrankshaft"]] + if options.no_variants: + VARIANT_FLAGS = [[]] if not options.shell_dir: if options.shell: print "Warning: --shell is deprecated, use --shell-dir instead."