| Index: tools/run-tests.py
|
| diff --git a/tools/run-tests.py b/tools/run-tests.py
|
| index c445a6359f7fab961cbd3bb20d777dc180ccc17e..4d42416e1fc1862781b8b7b8690d744ad2586ea0 100755
|
| --- a/tools/run-tests.py
|
| +++ b/tools/run-tests.py
|
| @@ -36,7 +36,6 @@ import optparse
|
| import os
|
| from os.path import getmtime, isdir, join
|
| import platform
|
| -import random
|
| import shlex
|
| import subprocess
|
| import sys
|
| @@ -75,6 +74,7 @@ TEST_MAP = {
|
| "preparser",
|
| "intl",
|
| "unittests",
|
| + "mksnapshot",
|
| ],
|
| # This needs to stay in sync with test/default.isolate.
|
| "default": [
|
| @@ -87,6 +87,7 @@ TEST_MAP = {
|
| "preparser",
|
| "intl",
|
| "unittests",
|
| + "mksnapshot",
|
| ],
|
| # This needs to stay in sync with test/optimize_for_size.isolate.
|
| "optimize_for_size": [
|
| @@ -373,13 +374,6 @@ def BuildOptions():
|
| return result
|
|
|
|
|
| -def RandomSeed():
|
| - seed = 0
|
| - while not seed:
|
| - seed = random.SystemRandom().randint(-2147483648, 2147483647)
|
| - return seed
|
| -
|
| -
|
| def BuildbotToV8Mode(config):
|
| """Convert buildbot build configs to configs understood by the v8 runner.
|
|
|
| @@ -554,7 +548,7 @@ def ProcessOptions(options):
|
| options.j = multiprocessing.cpu_count()
|
|
|
| if options.random_seed_stress_count <= 1 and options.random_seed == 0:
|
| - options.random_seed = RandomSeed()
|
| + options.random_seed = utils.RandomSeed()
|
|
|
| def excl(*args):
|
| """Returns true if zero or one of multiple arguments are true."""
|
| @@ -619,6 +613,9 @@ def ProcessOptions(options):
|
| TEST_MAP["default"].remove("debugger")
|
| TEST_MAP["bot_default"].remove("debugger")
|
| TEST_MAP["optimize_for_size"].remove("debugger")
|
| + if options.no_snap:
|
| + TEST_MAP["bot_default"].remove("mksnapshot")
|
| + TEST_MAP["default"].remove("mksnapshot")
|
| return True
|
|
|
|
|
| @@ -807,6 +804,7 @@ def Execute(arch, mode, args, options, suites):
|
| all_tests = []
|
| num_tests = 0
|
| for s in suites:
|
| + s.Setup()
|
| s.ReadStatusFile(variables)
|
| s.ReadTestCases(ctx)
|
| if len(args) > 0:
|
| @@ -836,7 +834,7 @@ def Execute(arch, mode, args, options, suites):
|
| if options.random_seed:
|
| yield []
|
| else:
|
| - yield ["--random-seed=%d" % RandomSeed()]
|
| + yield ["--random-seed=%d" % utils.RandomSeed()]
|
| s.tests = [
|
| t.CopyAddingFlags(t.variant, flags)
|
| for t in variant_tests
|
| @@ -896,7 +894,12 @@ def Execute(arch, mode, args, options, suites):
|
| else:
|
| runner = execution.Runner(suites, progress_indicator, ctx)
|
|
|
| - exit_code = runner.Run(options.j)
|
| + try:
|
| + exit_code = runner.Run(options.j)
|
| + finally:
|
| + for s in suites:
|
| + s.TearDown()
|
| +
|
| overall_duration = time.time() - start_time
|
|
|
| if options.time:
|
|
|