| Index: tools/run-tests.py
|
| diff --git a/tools/run-tests.py b/tools/run-tests.py
|
| index 40950d670a7a7c58c8574872a6c8475a88cdf982..f92c5d8aa119e8053cf39f9768e33eb10c202e53 100755
|
| --- a/tools/run-tests.py
|
| +++ b/tools/run-tests.py
|
| @@ -127,6 +127,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",
|
| @@ -203,8 +206,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."
|
| @@ -341,8 +354,9 @@ def Execute(arch, mode, args, options, suites, workspace):
|
| if options.cat:
|
| verbose.PrintTestSource(s.tests)
|
| continue
|
| - variant_flags = s.VariantFlags() or VARIANT_FLAGS
|
| - s.tests = [ t.CopyAddingFlags(v) for t in s.tests for v in variant_flags ]
|
| + s.tests = [ t.CopyAddingFlags(v)
|
| + for t in s.tests
|
| + for v in s.VariantFlags(t, VARIANT_FLAGS) ]
|
| s.tests = ShardTests(s.tests, options.shard_count, options.shard_run)
|
| num_tests += len(s.tests)
|
| for t in s.tests:
|
|
|