Revision f230a1cf deps/v8/tools/run-tests.py

View differences:

deps/v8/tools/run-tests.py
112 112
  result.add_option("-m", "--mode",
113 113
                    help="The test modes in which to run (comma-separated)",
114 114
                    default="release,debug")
115
  result.add_option("--no-i18n", "--noi18n",
116
                    help="Skip internationalization tests",
117
                    default=False, action="store_true")
115 118
  result.add_option("--no-network", "--nonetwork",
116 119
                    help="Don't distribute tests on the network",
117 120
                    default=(utils.GuessOS() != "linux"),
......
122 125
  result.add_option("--no-stress", "--nostress",
123 126
                    help="Don't run crankshaft --always-opt --stress-op test",
124 127
                    default=False, dest="no_stress", action="store_true")
128
  result.add_option("--no-variants", "--novariants",
129
                    help="Don't run any testing variants",
130
                    default=False, dest="no_variants", action="store_true")
125 131
  result.add_option("--outdir", help="Base directory with compile output",
126 132
                    default="out")
127 133
  result.add_option("-p", "--progress",
......
194 200
  options.extra_flags = shlex.split(options.extra_flags)
195 201
  if options.j == 0:
196 202
    options.j = multiprocessing.cpu_count()
203

  
204
  def excl(*args):
205
    """Returns true if zero or one of multiple arguments are true."""
206
    return reduce(lambda x, y: x + y, args) <= 1
207

  
208
  if not excl(options.no_stress, options.stress_only, options.no_variants):
209
    print "Use only one of --no-stress, --stress-only or --no-variants."
210
    return False
197 211
  if options.no_stress:
198 212
    VARIANT_FLAGS = [[], ["--nocrankshaft"]]
213
  if options.no_variants:
214
    VARIANT_FLAGS = [[]]
199 215
  if not options.shell_dir:
200 216
    if options.shell:
201 217
      print "Warning: --shell is deprecated, use --shell-dir instead."
......
210 226
  if not options.flaky_tests in ["run", "skip", "dontcare"]:
211 227
    print "Unknown flaky test mode %s" % options.flaky_tests
212 228
    return False
229
  if not options.no_i18n:
230
    DEFAULT_TESTS.append("intl")
213 231
  return True
214 232

  
215 233

  
......
302 320
                        mode_flags, options.verbose,
303 321
                        timeout, options.isolates,
304 322
                        options.command_prefix,
305
                        options.extra_flags)
323
                        options.extra_flags,
324
                        options.no_i18n)
306 325

  
307 326
  # Find available test suites and read test cases from them.
308 327
  variables = {
......
311 330
    "system": utils.GuessOS(),
312 331
    "isolates": options.isolates,
313 332
    "deopt_fuzzer": False,
333
    "no_i18n": options.no_i18n,
314 334
  }
315 335
  all_tests = []
316 336
  num_tests = 0
......
325 345
    if options.cat:
326 346
      verbose.PrintTestSource(s.tests)
327 347
      continue
328
    variant_flags = s.VariantFlags() or VARIANT_FLAGS
329
    s.tests = [ t.CopyAddingFlags(v) for t in s.tests for v in variant_flags ]
348
    s.tests = [ t.CopyAddingFlags(v)
349
                for t in s.tests
350
                for v in s.VariantFlags(t, VARIANT_FLAGS) ]
330 351
    s.tests = ShardTests(s.tests, options.shard_count, options.shard_run)
331 352
    num_tests += len(s.tests)
332 353
    for t in s.tests:

Also available in: Unified diff