Commit 0b9acc20 authored by Michal Majewski's avatar Michal Majewski Committed by Commit Bot

Reland "Reland "Reuse arch/mode discovery in deopt fuzzer""

This is a reland of 5442e8b2
Original change's description:
> Reland "Reuse arch/mode discovery in deopt fuzzer"
> 
> This is a reland of a24c7c9a
> Original change's description:
> > Reuse arch/mode discovery in deopt fuzzer
> > 
> > Bug: v8:6917
> > Change-Id: I1b7169c8702c8649812b17579d38d64de676ed60
> > Reviewed-on: https://chromium-review.googlesource.com/723420
> > Commit-Queue: Michał Majewski <majeski@google.com>
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#48838}
> 
> Bug: v8:6917
> Change-Id: I03b2c288257d44c2df9d0fa6cf4750d1c5719d59
> Reviewed-on: https://chromium-review.googlesource.com/735719
> Commit-Queue: Michał Majewski <majeski@google.com>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#48916}

Bug: v8:6917
Change-Id: I81419466d359b786c2a1b3a9aad3a86ed136f6f0
Reviewed-on: https://chromium-review.googlesource.com/738252Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#48997}
parent 84ff61d3
...@@ -29,70 +29,6 @@ DEFAULT_OUT_GN = 'out.gn' ...@@ -29,70 +29,6 @@ DEFAULT_OUT_GN = 'out.gn'
ARCH_GUESS = utils.DefaultArch() ARCH_GUESS = utils.DefaultArch()
DEBUG_FLAGS = ["--nohard-abort", "--enable-slow-asserts", "--verify-heap"]
RELEASE_FLAGS = ["--nohard-abort"]
MODES = {
"debug": {
"flags": DEBUG_FLAGS,
"timeout_scalefactor": 4,
"status_mode": "debug",
"execution_mode": "debug",
"output_folder": "debug",
},
"optdebug": {
"flags": DEBUG_FLAGS,
"timeout_scalefactor": 4,
"status_mode": "debug",
"execution_mode": "debug",
"output_folder": "optdebug",
},
"release": {
"flags": RELEASE_FLAGS,
"timeout_scalefactor": 1,
"status_mode": "release",
"execution_mode": "release",
"output_folder": "release",
},
# Normal trybot release configuration. There, dchecks are always on which
# implies debug is set. Hence, the status file needs to assume debug-like
# behavior/timeouts.
"tryrelease": {
"flags": RELEASE_FLAGS,
"timeout_scalefactor": 1,
"status_mode": "debug",
"execution_mode": "release",
"output_folder": "release",
},
# This mode requires v8 to be compiled with dchecks and slow dchecks.
"slowrelease": {
"flags": RELEASE_FLAGS + ["--enable-slow-asserts"],
"timeout_scalefactor": 2,
"status_mode": "debug",
"execution_mode": "release",
"output_folder": "release",
},
}
SUPPORTED_ARCHS = [
"android_arm",
"android_arm64",
"android_ia32",
"android_x64",
"arm",
"ia32",
"mips",
"mipsel",
"mips64",
"mips64el",
"s390",
"s390x",
"ppc",
"ppc64",
"x64",
"x32",
"arm64",
]
# Map of test name synonyms to lists of test suites. Should be ordered by # Map of test name synonyms to lists of test suites. Should be ordered by
# expected runtimes (suites with slow test cases first). These groups are # expected runtimes (suites with slow test cases first). These groups are
# invoked in separate steps on the bots. # invoked in separate steps on the bots.
...@@ -141,41 +77,112 @@ TEST_MAP = { ...@@ -141,41 +77,112 @@ TEST_MAP = {
} }
class ModeConfig(object):
def __init__(self, flags, timeout_scalefactor, status_mode, execution_mode):
self.flags = flags
self.timeout_scalefactor = timeout_scalefactor
self.status_mode = status_mode
self.execution_mode = execution_mode
DEBUG_FLAGS = ["--nohard-abort", "--enable-slow-asserts", "--verify-heap"]
RELEASE_FLAGS = ["--nohard-abort"]
MODES = {
"debug": ModeConfig(
flags=DEBUG_FLAGS,
timeout_scalefactor=4,
status_mode="debug",
execution_mode="debug",
),
"optdebug": ModeConfig(
flags=DEBUG_FLAGS,
timeout_scalefactor=4,
status_mode="debug",
execution_mode="debug",
),
"release": ModeConfig(
flags=RELEASE_FLAGS,
timeout_scalefactor=1,
status_mode="release",
execution_mode="release",
),
# Normal trybot release configuration. There, dchecks are always on which
# implies debug is set. Hence, the status file needs to assume debug-like
# behavior/timeouts.
"tryrelease": ModeConfig(
flags=RELEASE_FLAGS,
timeout_scalefactor=1,
status_mode="debug",
execution_mode="release",
),
# This mode requires v8 to be compiled with dchecks and slow dchecks.
"slowrelease": ModeConfig(
flags=RELEASE_FLAGS + ["--enable-slow-asserts"],
timeout_scalefactor=2,
status_mode="debug",
execution_mode="release",
),
}
class TestRunnerError(Exception): class TestRunnerError(Exception):
pass pass
class BuildConfig(object):
def __init__(self, build_config):
# In V8 land, GN's x86 is called ia32.
if build_config['v8_target_cpu'] == 'x86':
self.arch = 'ia32'
else:
self.arch = build_config['v8_target_cpu']
self.is_debug = build_config['is_debug']
self.asan = build_config['is_asan']
self.cfi_vptr = build_config['is_cfi']
self.dcheck_always_on = build_config['dcheck_always_on']
self.gcov_coverage = build_config['is_gcov_coverage']
self.msan = build_config['is_msan']
self.no_i18n = not build_config['v8_enable_i18n_support']
self.no_snap = not build_config['v8_use_snapshot']
self.predictable = build_config['v8_enable_verify_predictable']
self.tsan = build_config['is_tsan']
self.ubsan_vptr = build_config['is_ubsan_vptr']
class BaseTestRunner(object): class BaseTestRunner(object):
def __init__(self): def __init__(self):
self.outdir = None self.outdir = None
self.shell_dir = None
self.arch = None self.build_config = None
self.mode = None self.mode_name = None
self.mode_options = None
self.auto_detect = None
def execute(self): def execute(self):
try: try:
options, args = self._parse_args() parser = self._create_parser()
options, args = self._parse_args(parser)
self._load_build_config(options)
try:
self._process_default_options(options)
self._process_options(options)
except TestRunnerError:
parser.print_help()
raise
return self._do_execute(options, args) return self._do_execute(options, args)
except TestRunnerError: except TestRunnerError:
return 1 return 1
def _parse_args(self): def _create_parser(self):
parser = optparse.OptionParser() parser = optparse.OptionParser()
parser.usage = '%prog [options] [tests]' parser.usage = '%prog [options] [tests]'
parser.description = """TESTS: %s""" % (TEST_MAP["default"]) parser.description = """TESTS: %s""" % (TEST_MAP["default"])
self._add_parser_default_options(parser) self._add_parser_default_options(parser)
self._add_parser_options(parser) self._add_parser_options(parser)
options, args = parser.parse_args() return parser
try:
self._process_default_options(options)
self._process_options(options)
except TestRunnerError:
parser.print_help()
raise
return options, args
def _add_parser_default_options(self, parser): def _add_parser_default_options(self, parser):
parser.add_option("--gn", help="Scan out.gn for the last built" parser.add_option("--gn", help="Scan out.gn for the last built"
...@@ -187,48 +194,53 @@ class BaseTestRunner(object): ...@@ -187,48 +194,53 @@ class BaseTestRunner(object):
help="Adapt to path structure used on buildbots", help="Adapt to path structure used on buildbots",
default=False, action="store_true") default=False, action="store_true")
parser.add_option("--arch", parser.add_option("--arch",
help=("The architecture to run tests for, " help="The architecture to run tests for: %s")
"'auto' or 'native' for auto-detect: %s" %
SUPPORTED_ARCHS))
parser.add_option("-m", "--mode", parser.add_option("-m", "--mode",
help="The test mode in which to run (uppercase for ninja" help="The test mode in which to run (uppercase for ninja"
" and buildbot builds): %s" % MODES.keys()) " and buildbot builds): %s" % MODES.keys())
parser.add_option("--shell", help="DEPRECATED! use --shell-dir",
default="")
parser.add_option("--shell-dir", help="Directory containing executables",
default="")
def _add_parser_options(self, parser): def _add_parser_options(self, parser):
pass pass
def _process_default_options(self, options): def _parse_args(self, parser):
# Try to autodetect configuration based on the build if GN was used. options, args = parser.parse_args()
# This can't be ovveridden by cmd-line arguments.
if options.gn:
outdir = self._get_gn_outdir()
else:
outdir = options.outdir
self.auto_detect = self._read_build_config(outdir, options) if any(map(lambda v: v and ',' in v,
if not self.auto_detect: [options.arch, options.mode])):
if any(map(lambda v: v and ',' in v, print 'Multiple arch/mode are deprecated'
[options.arch, options.mode])): raise TestRunnerError()
print 'Multiple arch/mode are deprecated'
raise TestRunnerError()
self.outdir = outdir return options, args
if not options.arch or not options.mode:
print('Autodetect mode is not available and therefore '
'--arch and --mode options are required')
raise TestRunnerError()
self.arch = options.arch
self.mode = options.mode
if not self._buildbot_to_v8_mode(self.mode) in MODES: def _load_build_config(self, options):
print "Unknown mode %s" % self.mode for outdir in self._possible_outdirs(options):
raise TestRunnerError() try:
self.build_config = self._do_load_build_config(
outdir, options.mode, options.buildbot)
except TestRunnerError:
pass
if self.arch in ["auto", "native"]: if not self.build_config:
self.arch = ARCH_GUESS print 'Failed to load build config'
if not self.arch in SUPPORTED_ARCHS: raise TestRunnerError
print "Unknown architecture %s" % self.arch
raise TestRunnerError() print 'Build found: %s' % self.outdir
# Returns possible build paths in order: gn, outdir, outdir/arch.mode
def _possible_outdirs(self, options):
if options.gn:
yield self._get_gn_outdir()
return
yield options.outdir
if options.arch and options.mode:
yield os.path.join(options.outdir,
'%s.%s' % (options.arch, options.mode))
return
def _get_gn_outdir(self): def _get_gn_outdir(self):
gn_out_dir = os.path.join(BASE_DIR, DEFAULT_OUT_GN) gn_out_dir = os.path.join(BASE_DIR, DEFAULT_OUT_GN)
...@@ -245,25 +257,19 @@ class BaseTestRunner(object): ...@@ -245,25 +257,19 @@ class BaseTestRunner(object):
print(">>> Latest GN build found: %s" % latest_config) print(">>> Latest GN build found: %s" % latest_config)
return os.path.join(DEFAULT_OUT_GN, latest_config) return os.path.join(DEFAULT_OUT_GN, latest_config)
# Auto-detect test configurations based on the build (GN only). def _do_load_build_config(self, outdir, mode, is_buildbot):
# sets: if is_buildbot:
# - arch
# - mode
# - outdir
def _read_build_config(self, outdir, options):
if options.buildbot:
build_config_path = os.path.join( build_config_path = os.path.join(
BASE_DIR, outdir, options.mode, "v8_build_config.json") BASE_DIR, outdir, mode, "v8_build_config.json")
else: else:
build_config_path = os.path.join( build_config_path = os.path.join(
BASE_DIR, outdir, "v8_build_config.json") BASE_DIR, outdir, "v8_build_config.json")
if not os.path.exists(build_config_path): if not os.path.exists(build_config_path):
return False raise TestRunnerError()
with open(build_config_path) as f: with open(build_config_path) as f:
try: try:
build_config = json.load(f) build_config_json = json.load(f)
except Exception: except Exception:
print("%s exists but contains invalid json. Is your build up-to-date?" print("%s exists but contains invalid json. Is your build up-to-date?"
% build_config_path) % build_config_path)
...@@ -274,71 +280,39 @@ class BaseTestRunner(object): ...@@ -274,71 +280,39 @@ class BaseTestRunner(object):
# This ensures that we'll also take the build products from there. # This ensures that we'll also take the build products from there.
self.outdir = os.path.dirname(build_config_path) self.outdir = os.path.dirname(build_config_path)
# In V8 land, GN's x86 is called ia32. return BuildConfig(build_config_json)
if build_config["v8_target_cpu"] == "x86":
build_config["v8_target_cpu"] = "ia32"
if options.mode: def _process_default_options(self, options):
# In auto-detect mode we don't use the mode for more path-magic. # We don't use the mode for more path-magic.
# Therefore transform the buildbot mode here to fit to the GN build # Therefore transform the buildbot mode here to fix build_config value.
# config. if options.buildbot and options.mode:
options.mode = self._buildbot_to_v8_mode(options.mode) options.mode = self._buildbot_to_v8_mode(options.mode)
# TODO(majeski): merge next two loops and put everything in self. build_config_mode = 'debug' if self.build_config.is_debug else 'release'
if options.mode:
# Get options from the build config. Sanity check that we're not trying to if options.mode not in MODES:
# use inconsistent options. print '%s mode is invalid' % options.mode
for param, value in (
('arch', build_config["v8_target_cpu"]),
('mode', 'debug' if build_config["is_debug"] else 'release'),
):
cmd_line_value = getattr(options, param)
if (cmd_line_value not in [None, True, False] and
cmd_line_value != value):
# TODO(machenbach): This is for string options only. Requires
# options to not have default values. We should make this more
# modular and implement it in our own version of the option parser.
print("Attempted to set %s to %s, while build is %s." %
(param, cmd_line_value, value))
raise TestRunnerError()
if cmd_line_value == True and value == False:
print("Attempted to turn on %s, but it's not available." % param)
raise TestRunnerError()
if cmd_line_value != value:
print(">>> Auto-detected %s=%s" % (param, value))
setattr(self, param, value)
# Update options based on the build config. Sanity check that we're not
# trying to use inconsistent options.
for param, value in (
('asan', build_config["is_asan"]),
('cfi_vptr', build_config["is_cfi"]),
('dcheck_always_on', build_config["dcheck_always_on"]),
('gcov_coverage', build_config["is_gcov_coverage"]),
('msan', build_config["is_msan"]),
('no_i18n', not build_config["v8_enable_i18n_support"]),
('no_snap', not build_config["v8_use_snapshot"]),
('predictable', build_config["v8_enable_verify_predictable"]),
('tsan', build_config["is_tsan"]),
('ubsan_vptr', build_config["is_ubsan_vptr"]),
):
cmd_line_value = getattr(options, param)
if (cmd_line_value not in [None, True, False] and
cmd_line_value != value):
# TODO(machenbach): This is for string options only. Requires
# options to not have default values. We should make this more
# modular and implement it in our own version of the option parser.
print("Attempted to set %s to %s, while build is %s." %
(param, cmd_line_value, value))
raise TestRunnerError() raise TestRunnerError()
if cmd_line_value == True and value == False: if MODES[options.mode].execution_mode != build_config_mode:
print("Attempted to turn on %s, but it's not available." % param) print ('execution mode (%s) for %s is inconsistent with build config '
'(%s)' % (
MODES[options.mode].execution_mode,
options.mode,
build_config_mode))
raise TestRunnerError() raise TestRunnerError()
if cmd_line_value != value:
print(">>> Auto-detected %s=%s" % (param, value))
setattr(options, param, value)
return True self.mode_name = options.mode
else:
self.mode_name = build_config_mode
self.mode_options = MODES[self.mode_name]
if options.arch and options.arch != self.build_config.arch:
print('--arch value (%s) inconsistent with build config (%s).' % (
options.arch, self.build_config.arch))
raise TestRunnerError()
self._set_shell_dir(options)
def _buildbot_to_v8_mode(self, config): def _buildbot_to_v8_mode(self, config):
"""Convert buildbot build configs to configs understood by the v8 runner. """Convert buildbot build configs to configs understood by the v8 runner.
...@@ -349,6 +323,20 @@ class BaseTestRunner(object): ...@@ -349,6 +323,20 @@ class BaseTestRunner(object):
mode = config[:-4] if config.endswith('_x64') else config mode = config[:-4] if config.endswith('_x64') else config
return mode.lower() return mode.lower()
def _set_shell_dir(self, options):
self.shell_dir = options.shell_dir
if not self.shell_dir:
# TODO(majeski): drop this option
if options.shell:
print "Warning: --shell is deprecated, use --shell-dir instead."
self.shell_dir = os.path.dirname(options.shell)
else:
# If an output dir with a build was passed, test directly in that
# directory.
self.shell_dir = os.path.join(BASE_DIR, self.outdir)
if not os.path.exists(self.shell_dir):
raise Exception('Could not find shell_dir: "%s"' % self.shell_dir)
def _process_options(self, options): def _process_options(self, options):
pass pass
......
...@@ -9,11 +9,9 @@ from os.path import join ...@@ -9,11 +9,9 @@ from os.path import join
import json import json
import math import math
import multiprocessing import multiprocessing
import optparse
import os import os
import random import random
import shlex import shlex
import subprocess
import sys import sys
import time import time
...@@ -28,38 +26,11 @@ from testrunner.local import verbose ...@@ -28,38 +26,11 @@ from testrunner.local import verbose
from testrunner.objects import context from testrunner.objects import context
# Base dir of the v8 checkout to be used as cwd.
BASE_DIR = (
os.path.dirname(
os.path.dirname(
os.path.dirname(
os.path.abspath(__file__)))))
ARCH_GUESS = utils.DefaultArch()
DEFAULT_TESTS = ["mjsunit", "webkit"] DEFAULT_TESTS = ["mjsunit", "webkit"]
TIMEOUT_DEFAULT = 60 TIMEOUT_DEFAULT = 60
TIMEOUT_SCALEFACTOR = {"debug" : 4,
"release" : 1 }
MODE_FLAGS = {
"debug" : ["--nohard-abort", "--enable-slow-asserts",
"--verify-heap", "--noconcurrent-recompilation"],
"release" : ["--nohard-abort", "--noconcurrent-recompilation"]}
SUPPORTED_ARCHS = ["android_arm",
"android_ia32",
"arm",
"ia32",
"ppc",
"ppc64",
"s390",
"s390x",
"mipsel",
"x64"]
# Double the timeout for these: # Double the timeout for these:
SLOW_ARCHS = ["android_arm", SLOW_ARCHS = ["arm",
"android_ia32",
"arm",
"mipsel"] "mipsel"]
MAX_DEOPT = 1000000000 MAX_DEOPT = 1000000000
DISTRIBUTION_MODES = ["smooth", "random"] DISTRIBUTION_MODES = ["smooth", "random"]
...@@ -132,100 +103,57 @@ class DeoptFuzzer(base_runner.BaseTestRunner): ...@@ -132,100 +103,57 @@ class DeoptFuzzer(base_runner.BaseTestRunner):
options.distribution_factor2) options.distribution_factor2)
def _build_options(self): def _add_parser_options(self, parser):
result = optparse.OptionParser() parser.add_option("--command-prefix",
result.add_option("--arch",
help=("The architecture to run tests for, "
"'auto' or 'native' for auto-detect"),
default="ia32,x64,arm")
result.add_option("--arch-and-mode",
help="Architecture and mode in the format 'arch.mode'",
default=None)
result.add_option("--asan",
help="Regard test expectations for ASAN",
default=False, action="store_true")
result.add_option("--buildbot",
help="Adapt to path structure used on buildbots",
default=False, action="store_true")
result.add_option("--dcheck-always-on",
help="Indicates that V8 was compiled with DCHECKs"
" enabled",
default=False, action="store_true")
result.add_option("--command-prefix",
help="Prepended to each shell command used to run a test", help="Prepended to each shell command used to run a test",
default="") default="")
result.add_option("--coverage", help=("Exponential test coverage " parser.add_option("--coverage", help=("Exponential test coverage "
"(range 0.0, 1.0) - 0.0: one test, 1.0 all tests (slow)"), "(range 0.0, 1.0) - 0.0: one test, 1.0 all tests (slow)"),
default=0.4, type="float") default=0.4, type="float")
result.add_option("--coverage-lift", help=("Lifts test coverage for tests " parser.add_option("--coverage-lift", help=("Lifts test coverage for tests "
"with a small number of deopt points (range 0, inf)"), "with a small number of deopt points (range 0, inf)"),
default=20, type="int") default=20, type="int")
result.add_option("--distribution-factor1", help=("Factor of the first " parser.add_option("--distribution-factor1", help=("Factor of the first "
"derivation of the distribution function"), default=2.0, "derivation of the distribution function"), default=2.0,
type="float") type="float")
result.add_option("--distribution-factor2", help=("Factor of the second " parser.add_option("--distribution-factor2", help=("Factor of the second "
"derivation of the distribution function"), default=0.7, "derivation of the distribution function"), default=0.7,
type="float") type="float")
result.add_option("--distribution-mode", help=("How to select deopt points " parser.add_option("--distribution-mode", help=("How to select deopt points "
"for a given test (smooth|random)"), "for a given test (smooth|random)"),
default="smooth") default="smooth")
result.add_option("--dump-results-file", help=("Dump maximum number of " parser.add_option("--dump-results-file", help=("Dump maximum number of "
"deopt points per test to a file")) "deopt points per test to a file"))
result.add_option("--extra-flags", parser.add_option("--extra-flags",
help="Additional flags to pass to each test command", help="Additional flags to pass to each test command",
default="") default="")
result.add_option("--isolates", help="Whether to test isolates", parser.add_option("--isolates", help="Whether to test isolates",
default=False, action="store_true") default=False, action="store_true")
result.add_option("-j", help="The number of parallel tasks to run", parser.add_option("-j", help="The number of parallel tasks to run",
default=0, type="int") default=0, type="int")
result.add_option("-m", "--mode", parser.add_option("-p", "--progress",
help="The test modes in which to run (comma-separated)",
default="release,debug")
result.add_option("--outdir", help="Base directory with compile output",
default="out")
result.add_option("-p", "--progress",
help=("The style of progress indicator" help=("The style of progress indicator"
" (verbose, dots, color, mono)"), " (verbose, dots, color, mono)"),
choices=progress.PROGRESS_INDICATORS.keys(), choices=progress.PROGRESS_INDICATORS.keys(),
default="mono") default="mono")
result.add_option("--shard-count", parser.add_option("--shard-count",
help="Split testsuites into this number of shards", help="Split testsuites into this number of shards",
default=1, type="int") default=1, type="int")
result.add_option("--shard-run", parser.add_option("--shard-run",
help="Run this shard from the split up tests.", help="Run this shard from the split up tests.",
default=1, type="int") default=1, type="int")
result.add_option("--shell-dir", help="Directory containing executables", parser.add_option("--seed", help="The seed for the random distribution",
default="")
result.add_option("--seed", help="The seed for the random distribution",
type="int") type="int")
result.add_option("-t", "--timeout", help="Timeout in seconds", parser.add_option("-t", "--timeout", help="Timeout in seconds",
default= -1, type="int") default= -1, type="int")
result.add_option("-v", "--verbose", help="Verbose output", parser.add_option("-v", "--verbose", help="Verbose output",
default=False, action="store_true") default=False, action="store_true")
result.add_option("--random-seed", default=0, dest="random_seed", parser.add_option("--random-seed", default=0, dest="random_seed",
help="Default seed for initializing random generator") help="Default seed for initializing random generator")
return result return parser
def _process_options(self, options): def _process_options(self, options):
# Architecture and mode related stuff.
if options.arch_and_mode:
tokens = options.arch_and_mode.split(".")
options.arch = tokens[0]
options.mode = tokens[1]
options.mode = options.mode.split(",")
for mode in options.mode:
if not mode.lower() in ["debug", "release"]:
print "Unknown mode %s" % mode
return False
if options.arch in ["auto", "native"]:
options.arch = ARCH_GUESS
options.arch = options.arch.split(",")
for arch in options.arch:
if not arch in SUPPORTED_ARCHS:
print "Unknown architecture %s" % arch
return False
# Special processing of other options, sorted alphabetically. # Special processing of other options, sorted alphabetically.
options.command_prefix = shlex.split(options.command_prefix) options.command_prefix = shlex.split(options.command_prefix)
options.extra_flags = shlex.split(options.extra_flags) options.extra_flags = shlex.split(options.extra_flags)
...@@ -270,20 +198,11 @@ class DeoptFuzzer(base_runner.BaseTestRunner): ...@@ -270,20 +198,11 @@ class DeoptFuzzer(base_runner.BaseTestRunner):
count += 1 count += 1
return shard return shard
# TODO(majeski): reuse baseclass code def _do_execute(self, options, args):
def execute(self):
# Use the v8 root as cwd as some test cases use "load" with relative paths. # Use the v8 root as cwd as some test cases use "load" with relative paths.
os.chdir(BASE_DIR) os.chdir(base_runner.BASE_DIR)
parser = self._build_options()
(options, args) = parser.parse_args()
if not self._process_options(options):
parser.print_help()
return 1
exit_code = 0
suite_paths = utils.GetSuitePaths(join(BASE_DIR, "test")) suite_paths = utils.GetSuitePaths(join(base_runner.BASE_DIR, "test"))
if len(args) == 0: if len(args) == 0:
suite_paths = [ s for s in suite_paths if s in DEFAULT_TESTS ] suite_paths = [ s for s in suite_paths if s in DEFAULT_TESTS ]
...@@ -298,18 +217,14 @@ class DeoptFuzzer(base_runner.BaseTestRunner): ...@@ -298,18 +217,14 @@ class DeoptFuzzer(base_runner.BaseTestRunner):
suites = [] suites = []
for root in suite_paths: for root in suite_paths:
suite = testsuite.TestSuite.LoadTestSuite( suite = testsuite.TestSuite.LoadTestSuite(
os.path.join(BASE_DIR, "test", root)) os.path.join(base_runner.BASE_DIR, "test", root))
if suite: if suite:
suites.append(suite) suites.append(suite)
for mode in options.mode: try:
for arch in options.arch: return self._execute(args, options, suites)
try: except KeyboardInterrupt:
code = self._execute(arch, mode, args, options, suites, BASE_DIR) return 2
exit_code = exit_code or code
except KeyboardInterrupt:
return 2
return exit_code
def _calculate_n_tests(self, m, options): def _calculate_n_tests(self, m, options):
...@@ -323,34 +238,26 @@ class DeoptFuzzer(base_runner.BaseTestRunner): ...@@ -323,34 +238,26 @@ class DeoptFuzzer(base_runner.BaseTestRunner):
return int(math.pow(m, (m * c + l) / (m + l))) return int(math.pow(m, (m * c + l) / (m + l)))
def _execute(self, arch, mode, args, options, suites, workspace): def _execute(self, args, options, suites):
print(">>> Running tests for %s.%s" % (arch, mode)) print(">>> Running tests for %s.%s" % (self.build_config.arch,
self.mode_name))
dist = self._distribution(options) dist = self._distribution(options)
shell_dir = options.shell_dir
if not shell_dir:
if options.buildbot:
shell_dir = os.path.join(workspace, options.outdir, mode)
mode = mode.lower()
else:
shell_dir = os.path.join(workspace, options.outdir,
"%s.%s" % (arch, mode))
shell_dir = os.path.relpath(shell_dir)
# Populate context object. # Populate context object.
mode_flags = MODE_FLAGS[mode]
timeout = options.timeout timeout = options.timeout
if timeout == -1: if timeout == -1:
# Simulators are slow, therefore allow a longer default timeout. # Simulators are slow, therefore allow a longer default timeout.
if arch in SLOW_ARCHS: if self.build_config.arch in SLOW_ARCHS:
timeout = 2 * TIMEOUT_DEFAULT; timeout = 2 * TIMEOUT_DEFAULT;
else: else:
timeout = TIMEOUT_DEFAULT; timeout = TIMEOUT_DEFAULT;
timeout *= TIMEOUT_SCALEFACTOR[mode] timeout *= self.mode_options.timeout_scalefactor
ctx = context.Context(arch, mode, shell_dir, ctx = context.Context(self.build_config.arch,
mode_flags, options.verbose, self.mode_options.execution_mode,
self.shell_dir,
self.mode_options.flags, options.verbose,
timeout, options.isolates, timeout, options.isolates,
options.command_prefix, options.command_prefix,
options.extra_flags, options.extra_flags,
...@@ -366,25 +273,26 @@ class DeoptFuzzer(base_runner.BaseTestRunner): ...@@ -366,25 +273,26 @@ class DeoptFuzzer(base_runner.BaseTestRunner):
# Find available test suites and read test cases from them. # Find available test suites and read test cases from them.
variables = { variables = {
"arch": arch, "arch": self.build_config.arch,
"asan": options.asan, "asan": self.build_config.asan,
"byteorder": sys.byteorder,
"dcheck_always_on": self.build_config.dcheck_always_on,
"deopt_fuzzer": True, "deopt_fuzzer": True,
"gc_stress": False, "gc_stress": False,
"gcov_coverage": False, "gcov_coverage": self.build_config.gcov_coverage,
"isolates": options.isolates, "isolates": options.isolates,
"mode": mode, "mode": self.mode_options.status_mode,
"no_i18n": False, "msan": self.build_config.msan,
"no_snap": False,
"simulator": utils.UseSimulator(arch),
"system": utils.GuessOS(),
"tsan": False,
"msan": False,
"dcheck_always_on": options.dcheck_always_on,
"novfp3": False,
"predictable": False,
"byteorder": sys.byteorder,
"no_harness": False, "no_harness": False,
"ubsan_vptr": False, "no_i18n": self.build_config.no_i18n,
"no_snap": self.build_config.no_snap,
"novfp3": False,
"predictable": self.build_config.predictable,
"simulator": utils.UseSimulator(self.build_config.arch),
"simulator_run": False,
"system": utils.GuessOS(),
"tsan": self.build_config.tsan,
"ubsan_vptr": self.build_config.ubsan_vptr,
} }
num_tests = 0 num_tests = 0
test_id = 0 test_id = 0
......
...@@ -28,7 +28,6 @@ from testrunner.network import network_execution ...@@ -28,7 +28,6 @@ from testrunner.network import network_execution
from testrunner.objects import context from testrunner.objects import context
TIMEOUT_DEFAULT = 60 TIMEOUT_DEFAULT = 60
# Variants ordered by expected runtime (slowest first). # Variants ordered by expected runtime (slowest first).
...@@ -60,11 +59,7 @@ GC_STRESS_FLAGS = ["--gc-interval=500", "--stress-compaction", ...@@ -60,11 +59,7 @@ GC_STRESS_FLAGS = ["--gc-interval=500", "--stress-compaction",
"--concurrent-recompilation"] "--concurrent-recompilation"]
# Double the timeout for these: # Double the timeout for these:
SLOW_ARCHS = ["android_arm", SLOW_ARCHS = ["arm",
"android_arm64",
"android_ia32",
"android_x64",
"arm",
"mips", "mips",
"mipsel", "mipsel",
"mips64", "mips64",
...@@ -133,23 +128,16 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -133,23 +128,16 @@ class StandardTestRunner(base_runner.BaseTestRunner):
s.PrepareSources() s.PrepareSources()
try: try:
return self._execute(self.arch, self.mode, args, options, suites) return self._execute(args, options, suites)
except KeyboardInterrupt: except KeyboardInterrupt:
return 2 return 2
def _add_parser_options(self, parser): def _add_parser_options(self, parser):
parser.add_option("--asan",
help="Regard test expectations for ASAN",
default=False, action="store_true")
parser.add_option("--sancov-dir", parser.add_option("--sancov-dir",
help="Directory where to collect coverage data") help="Directory where to collect coverage data")
parser.add_option("--cfi-vptr", parser.add_option("--cfi-vptr",
help="Run tests with UBSAN cfi_vptr option.", help="Run tests with UBSAN cfi_vptr option.",
default=False, action="store_true") default=False, action="store_true")
parser.add_option("--dcheck-always-on",
help="Indicates that V8 was compiled with DCHECKs"
" enabled",
default=False, action="store_true")
parser.add_option("--novfp3", parser.add_option("--novfp3",
help="Indicates that V8 was compiled without VFP3" help="Indicates that V8 was compiled without VFP3"
" support", " support",
...@@ -165,9 +153,6 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -165,9 +153,6 @@ class StandardTestRunner(base_runner.BaseTestRunner):
parser.add_option("--gc-stress", parser.add_option("--gc-stress",
help="Switch on GC stress mode", help="Switch on GC stress mode",
default=False, action="store_true") default=False, action="store_true")
parser.add_option("--gcov-coverage",
help="Uses executables instrumented for gcov coverage",
default=False, action="store_true")
parser.add_option("--command-prefix", parser.add_option("--command-prefix",
help="Prepended to each shell command used to run a" help="Prepended to each shell command used to run a"
" test", " test",
...@@ -182,9 +167,6 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -182,9 +167,6 @@ class StandardTestRunner(base_runner.BaseTestRunner):
parser.add_option("--no-harness", "--noharness", parser.add_option("--no-harness", "--noharness",
help="Run without test harness of a given suite", help="Run without test harness of a given suite",
default=False, action="store_true") default=False, action="store_true")
parser.add_option("--no-i18n", "--noi18n",
help="Skip internationalization tests",
default=False, action="store_true")
parser.add_option("--network", help="Distribute tests on the network", parser.add_option("--network", help="Distribute tests on the network",
default=False, dest="network", action="store_true") default=False, dest="network", action="store_true")
parser.add_option("--no-network", "--nonetwork", parser.add_option("--no-network", "--nonetwork",
...@@ -193,9 +175,6 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -193,9 +175,6 @@ class StandardTestRunner(base_runner.BaseTestRunner):
parser.add_option("--no-presubmit", "--nopresubmit", parser.add_option("--no-presubmit", "--nopresubmit",
help='Skip presubmit checks (deprecated)', help='Skip presubmit checks (deprecated)',
default=False, dest="no_presubmit", action="store_true") default=False, dest="no_presubmit", action="store_true")
parser.add_option("--no-snap", "--nosnap",
help='Test a build compiled without snapshot.',
default=False, dest="no_snap", action="store_true")
parser.add_option("--no-sorting", "--nosorting", parser.add_option("--no-sorting", "--nosorting",
help="Don't sort tests according to duration of last" help="Don't sort tests according to duration of last"
" run.", " run.",
...@@ -210,9 +189,6 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -210,9 +189,6 @@ class StandardTestRunner(base_runner.BaseTestRunner):
default=False, action="store_true", default=False, action="store_true",
help="Use exhaustive set of default variants:" help="Use exhaustive set of default variants:"
" \"%s\"" % ",".join(EXHAUSTIVE_VARIANTS)) " \"%s\"" % ",".join(EXHAUSTIVE_VARIANTS))
parser.add_option("--predictable",
help="Compare output of several reruns of each test",
default=False, action="store_true")
parser.add_option("-p", "--progress", parser.add_option("-p", "--progress",
help=("The style of progress indicator" help=("The style of progress indicator"
" (verbose, dots, color, mono)"), " (verbose, dots, color, mono)"),
...@@ -240,10 +216,6 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -240,10 +216,6 @@ class StandardTestRunner(base_runner.BaseTestRunner):
parser.add_option("--shard-run", parser.add_option("--shard-run",
help="Run this shard from the split up tests.", help="Run this shard from the split up tests.",
default=1, type="int") default=1, type="int")
parser.add_option("--shell", help="DEPRECATED! use --shell-dir",
default="")
parser.add_option("--shell-dir", help="Directory containing executables",
default="")
parser.add_option("--dont-skip-slow-simulator-tests", parser.add_option("--dont-skip-slow-simulator-tests",
help="Don't skip more slow tests when using a" help="Don't skip more slow tests when using a"
" simulator.", " simulator.",
...@@ -256,9 +228,6 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -256,9 +228,6 @@ class StandardTestRunner(base_runner.BaseTestRunner):
default=False, action="store_true") default=False, action="store_true")
parser.add_option("-t", "--timeout", help="Timeout in seconds", parser.add_option("-t", "--timeout", help="Timeout in seconds",
default=TIMEOUT_DEFAULT, type="int") default=TIMEOUT_DEFAULT, type="int")
parser.add_option("--tsan",
help="Regard test expectations for TSAN",
default=False, action="store_true")
parser.add_option("-v", "--verbose", help="Verbose output", parser.add_option("-v", "--verbose", help="Verbose output",
default=False, action="store_true") default=False, action="store_true")
parser.add_option("--valgrind", help="Run tests through valgrind", parser.add_option("--valgrind", help="Run tests through valgrind",
...@@ -275,12 +244,6 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -275,12 +244,6 @@ class StandardTestRunner(base_runner.BaseTestRunner):
parser.add_option("--random-seed-stress-count", default=1, type="int", parser.add_option("--random-seed-stress-count", default=1, type="int",
dest="random_seed_stress_count", dest="random_seed_stress_count",
help="Number of runs with different random seeds") help="Number of runs with different random seeds")
parser.add_option("--ubsan-vptr",
help="Regard test expectations for UBSanVptr",
default=False, action="store_true")
parser.add_option("--msan",
help="Regard test expectations for UBSanVptr",
default=False, action="store_true")
def _process_options(self, options): def _process_options(self, options):
global VARIANTS global VARIANTS
...@@ -299,7 +262,7 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -299,7 +262,7 @@ class StandardTestRunner(base_runner.BaseTestRunner):
if options.gc_stress: if options.gc_stress:
options.extra_flags += GC_STRESS_FLAGS options.extra_flags += GC_STRESS_FLAGS
if options.asan: if self.build_config.asan:
options.extra_flags.append("--invoke-weak-callbacks") options.extra_flags.append("--invoke-weak-callbacks")
options.extra_flags.append("--omit-quit") options.extra_flags.append("--omit-quit")
...@@ -314,7 +277,7 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -314,7 +277,7 @@ class StandardTestRunner(base_runner.BaseTestRunner):
# TODO(machenbach): Figure out how to test a bigger subset of variants on # TODO(machenbach): Figure out how to test a bigger subset of variants on
# msan. # msan.
if options.msan: if self.build_config.msan:
VARIANTS = ["default"] VARIANTS = ["default"]
if options.j == 0: if options.j == 0:
...@@ -349,7 +312,7 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -349,7 +312,7 @@ class StandardTestRunner(base_runner.BaseTestRunner):
if not set(VARIANTS).issubset(ALL_VARIANTS): if not set(VARIANTS).issubset(ALL_VARIANTS):
print "All variants must be in %s" % str(ALL_VARIANTS) print "All variants must be in %s" % str(ALL_VARIANTS)
raise base_runner.TestRunnerError() raise base_runner.TestRunnerError()
if options.predictable: if self.build_config.predictable:
VARIANTS = ["default"] VARIANTS = ["default"]
options.extra_flags.append("--predictable") options.extra_flags.append("--predictable")
options.extra_flags.append("--verify_predictable") options.extra_flags.append("--verify_predictable")
...@@ -358,10 +321,6 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -358,10 +321,6 @@ class StandardTestRunner(base_runner.BaseTestRunner):
# Dedupe. # Dedupe.
VARIANTS = list(set(VARIANTS)) VARIANTS = list(set(VARIANTS))
if not options.shell_dir:
if options.shell:
print "Warning: --shell is deprecated, use --shell-dir instead."
options.shell_dir = os.path.dirname(options.shell)
if options.valgrind: if options.valgrind:
run_valgrind = os.path.join("tools", "run-valgrind.py") run_valgrind = os.path.join("tools", "run-valgrind.py")
# This is OK for distributed running, so we don't need to disable # This is OK for distributed running, so we don't need to disable
...@@ -374,7 +333,7 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -374,7 +333,7 @@ class StandardTestRunner(base_runner.BaseTestRunner):
raise base_runner.TestRunnerError() raise base_runner.TestRunnerError()
CheckTestMode("slow test", options.slow_tests) CheckTestMode("slow test", options.slow_tests)
CheckTestMode("pass|fail test", options.pass_fail_tests) CheckTestMode("pass|fail test", options.pass_fail_tests)
if options.no_i18n: if self.build_config.no_i18n:
base_runner.TEST_MAP["bot_default"].remove("intl") base_runner.TEST_MAP["bot_default"].remove("intl")
base_runner.TEST_MAP["default"].remove("intl") base_runner.TEST_MAP["default"].remove("intl")
...@@ -397,7 +356,7 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -397,7 +356,7 @@ class StandardTestRunner(base_runner.BaseTestRunner):
external_symbolizer_path = '"%s.exe"' % external_symbolizer_path external_symbolizer_path = '"%s.exe"' % external_symbolizer_path
symbolizer = 'external_symbolizer_path=%s' % external_symbolizer_path symbolizer = 'external_symbolizer_path=%s' % external_symbolizer_path
if options.asan: if self.build_config.asan:
asan_options = [symbolizer, "allow_user_segv_handler=1"] asan_options = [symbolizer, "allow_user_segv_handler=1"]
if not utils.GuessOS() in ['macos', 'windows']: if not utils.GuessOS() in ['macos', 'windows']:
# LSAN is not available on mac and windows. # LSAN is not available on mac and windows.
...@@ -413,7 +372,7 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -413,7 +372,7 @@ class StandardTestRunner(base_runner.BaseTestRunner):
"allow_user_segv_handler=1", "allow_user_segv_handler=1",
]) ])
if options.cfi_vptr: if self.build_config.cfi_vptr:
os.environ['UBSAN_OPTIONS'] = ":".join([ os.environ['UBSAN_OPTIONS'] = ":".join([
'print_stacktrace=1', 'print_stacktrace=1',
'print_summary=1', 'print_summary=1',
...@@ -421,16 +380,16 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -421,16 +380,16 @@ class StandardTestRunner(base_runner.BaseTestRunner):
symbolizer, symbolizer,
]) ])
if options.ubsan_vptr: if self.build_config.ubsan_vptr:
os.environ['UBSAN_OPTIONS'] = ":".join([ os.environ['UBSAN_OPTIONS'] = ":".join([
'print_stacktrace=1', 'print_stacktrace=1',
symbolizer, symbolizer,
]) ])
if options.msan: if self.build_config.msan:
os.environ['MSAN_OPTIONS'] = symbolizer os.environ['MSAN_OPTIONS'] = symbolizer
if options.tsan: if self.build_config.tsan:
suppressions_file = os.path.join( suppressions_file = os.path.join(
base_runner.BASE_DIR, base_runner.BASE_DIR,
'tools', 'tools',
...@@ -451,57 +410,36 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -451,57 +410,36 @@ class StandardTestRunner(base_runner.BaseTestRunner):
seed = random.SystemRandom().randint(-2147483648, 2147483647) seed = random.SystemRandom().randint(-2147483648, 2147483647)
return seed return seed
def _execute(self, arch, mode, args, options, suites): def _execute(self, args, options, suites):
print(">>> Running tests for %s.%s" % (arch, mode)) print(">>> Running tests for %s.%s" % (self.build_config.arch,
self.mode_name))
shell_dir = options.shell_dir
if not shell_dir:
if self.auto_detect:
# If an output dir with a build was passed, test directly in that
# directory.
shell_dir = os.path.join(base_runner.BASE_DIR, self.outdir)
elif options.buildbot:
# TODO(machenbach): Get rid of different output folder location on
# buildbot. Currently this is capitalized Release and Debug.
shell_dir = os.path.join(base_runner.BASE_DIR, self.outdir, mode)
mode = self._buildbot_to_v8_mode(mode)
else:
shell_dir = os.path.join(
base_runner.BASE_DIR,
self.outdir,
"%s.%s" % (arch, base_runner.MODES[mode]["output_folder"]),
)
if not os.path.exists(shell_dir):
raise Exception('Could not find shell_dir: "%s"' % shell_dir)
# Populate context object. # Populate context object.
mode_flags = base_runner.MODES[mode]["flags"]
# Simulators are slow, therefore allow a longer timeout. # Simulators are slow, therefore allow a longer timeout.
if arch in SLOW_ARCHS: if self.build_config.arch in SLOW_ARCHS:
options.timeout *= 2 options.timeout *= 2
options.timeout *= base_runner.MODES[mode]["timeout_scalefactor"] options.timeout *= self.mode_options.timeout_scalefactor
if options.predictable: if self.build_config.predictable:
# Predictable mode is slower. # Predictable mode is slower.
options.timeout *= 2 options.timeout *= 2
ctx = context.Context(arch, ctx = context.Context(self.build_config.arch,
base_runner.MODES[mode]["execution_mode"], self.mode_options.execution_mode,
shell_dir, self.shell_dir,
mode_flags, self.mode_options.flags,
options.verbose, options.verbose,
options.timeout, options.timeout,
options.isolates, options.isolates,
options.command_prefix, options.command_prefix,
options.extra_flags, options.extra_flags,
options.no_i18n, self.build_config.no_i18n,
options.random_seed, options.random_seed,
options.no_sorting, options.no_sorting,
options.rerun_failures_count, options.rerun_failures_count,
options.rerun_failures_max, options.rerun_failures_max,
options.predictable, self.build_config.predictable,
options.no_harness, options.no_harness,
use_perf_data=not options.swarming, use_perf_data=not options.swarming,
sancov_dir=options.sancov_dir) sancov_dir=options.sancov_dir)
...@@ -509,32 +447,35 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -509,32 +447,35 @@ class StandardTestRunner(base_runner.BaseTestRunner):
# TODO(all): Combine "simulator" and "simulator_run". # TODO(all): Combine "simulator" and "simulator_run".
# TODO(machenbach): In GN we can derive simulator run from # TODO(machenbach): In GN we can derive simulator run from
# target_arch != v8_target_arch in the dumped build config. # target_arch != v8_target_arch in the dumped build config.
simulator_run = not options.dont_skip_simulator_slow_tests and \ simulator_run = (
arch in ['arm64', 'arm', 'mipsel', 'mips', 'mips64', 'mips64el', \ not options.dont_skip_simulator_slow_tests and
'ppc', 'ppc64', 's390', 's390x'] and \ self.build_config.arch in [
bool(base_runner.ARCH_GUESS) and arch != base_runner.ARCH_GUESS 'arm64', 'arm', 'mipsel', 'mips', 'mips64', 'mips64el', 'ppc',
'ppc64', 's390', 's390x'] and
bool(base_runner.ARCH_GUESS) and
self.build_config.arch != base_runner.ARCH_GUESS)
# Find available test suites and read test cases from them. # Find available test suites and read test cases from them.
variables = { variables = {
"arch": arch, "arch": self.build_config.arch,
"asan": options.asan, "asan": self.build_config.asan,
"byteorder": sys.byteorder,
"dcheck_always_on": self.build_config.dcheck_always_on,
"deopt_fuzzer": False, "deopt_fuzzer": False,
"gc_stress": options.gc_stress, "gc_stress": options.gc_stress,
"gcov_coverage": options.gcov_coverage, "gcov_coverage": self.build_config.gcov_coverage,
"isolates": options.isolates, "isolates": options.isolates,
"mode": base_runner.MODES[mode]["status_mode"], "mode": self.mode_options.status_mode,
"no_i18n": options.no_i18n, "msan": self.build_config.msan,
"no_snap": options.no_snap, "no_harness": options.no_harness,
"no_i18n": self.build_config.no_i18n,
"no_snap": self.build_config.no_snap,
"novfp3": options.novfp3,
"predictable": self.build_config.predictable,
"simulator": utils.UseSimulator(self.build_config.arch),
"simulator_run": simulator_run, "simulator_run": simulator_run,
"simulator": utils.UseSimulator(arch),
"system": utils.GuessOS(), "system": utils.GuessOS(),
"tsan": options.tsan, "tsan": self.build_config.tsan,
"msan": options.msan, "ubsan_vptr": self.build_config.ubsan_vptr,
"dcheck_always_on": options.dcheck_always_on,
"novfp3": options.novfp3,
"predictable": options.predictable,
"byteorder": sys.byteorder,
"no_harness": options.no_harness,
"ubsan_vptr": options.ubsan_vptr,
} }
all_tests = [] all_tests = []
num_tests = 0 num_tests = 0
...@@ -601,8 +542,8 @@ class StandardTestRunner(base_runner.BaseTestRunner): ...@@ -601,8 +542,8 @@ class StandardTestRunner(base_runner.BaseTestRunner):
if options.json_test_results: if options.json_test_results:
progress_indicator.Register(progress.JsonTestProgressIndicator( progress_indicator.Register(progress.JsonTestProgressIndicator(
options.json_test_results, options.json_test_results,
arch, self.build_config.arch,
base_runner.MODES[mode]["execution_mode"], self.mode_options.execution_mode,
ctx.random_seed)) ctx.random_seed))
if options.flakiness_results: if options.flakiness_results:
progress_indicator.Register(progress.FlakinessTestProgressIndicator( progress_indicator.Register(progress.FlakinessTestProgressIndicator(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment