Commit aede8c77 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[test] Derive simulator status flag from build product

Guessing the architecture on the testing machine is not required to
derive if the simulator is supposed to run. The architecture check
doesn't work on some platforms.

We derive this now by checking if we have compiled a simulator build:
target_cpu != v8_target_cpu.

Bug: chromium:1110824
Change-Id: Id30a647f0610f21efb00d68ad1602e62dcd2c65c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2395563Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69719}
parent 32801e10
......@@ -195,6 +195,8 @@ class BuildConfig(object):
self.msan = build_config['is_msan']
self.no_i18n = not build_config['v8_enable_i18n_support']
self.predictable = build_config['v8_enable_verify_predictable']
self.simulator_run = (build_config['target_cpu'] !=
build_config['v8_target_cpu'])
self.tsan = build_config['is_tsan']
# TODO(machenbach): We only have ubsan not ubsan_vptr.
self.ubsan_vptr = build_config['is_ubsan_vptr']
......@@ -369,6 +371,10 @@ class BaseTestRunner(object):
# Test config
parser.add_option("--command-prefix", default="",
help="Prepended to each shell command used to run a test")
parser.add_option('--dont-skip-slow-simulator-tests',
help='Don\'t skip more slow tests when using a'
' simulator.', default=False, action='store_true',
dest='dont_skip_simulator_slow_tests')
parser.add_option("--extra-flags", action="append", default=[],
help="Additional flags to pass to each test command")
parser.add_option("--isolates", action="store_true", default=False,
......@@ -675,8 +681,6 @@ class BaseTestRunner(object):
self.build_config.arch in ['mipsel', 'mips', 'mips64', 'mips64el'] and
self.build_config.mips_arch_variant)
# TODO(machenbach): In GN we can derive simulator run from
# target_arch != v8_target_arch in the dumped build config.
return {
"arch": self.build_config.arch,
"asan": self.build_config.asan,
......@@ -702,7 +706,8 @@ class BaseTestRunner(object):
"optimize_for_size": "--optimize-for-size" in options.extra_flags,
"predictable": self.build_config.predictable,
"simd_mips": simd_mips,
"simulator_run": False,
"simulator_run": self.build_config.simulator_run and
not options.dont_skip_simulator_slow_tests,
"system": self.target_os,
"tsan": self.build_config.tsan,
"ubsan_vptr": self.build_config.ubsan_vptr,
......
......@@ -28,8 +28,6 @@ from testrunner.testproc.seed import SeedProc
from testrunner.testproc.variant import VariantProc
ARCH_GUESS = utils.DefaultArch()
VARIANTS = ['default']
MORE_VARIANTS = [
......@@ -109,11 +107,6 @@ class StandardTestRunner(base_runner.BaseTestRunner):
help='Regard pass|fail tests (run|skip|dontcare)')
parser.add_option('--quickcheck', default=False, action='store_true',
help=('Quick check mode (skip slow tests)'))
parser.add_option('--dont-skip-slow-simulator-tests',
help='Don\'t skip more slow tests when using a'
' simulator.',
default=False, action='store_true',
dest='dont_skip_simulator_slow_tests')
# Stress modes
parser.add_option('--gc-stress',
......@@ -282,19 +275,10 @@ class StandardTestRunner(base_runner.BaseTestRunner):
variables = (
super(StandardTestRunner, self)._get_statusfile_variables(options))
simulator_run = (
not options.dont_skip_simulator_slow_tests and
self.build_config.arch in [
'arm64', 'arm', 'mipsel', 'mips', 'mips64', 'mips64el', 'ppc',
'ppc64', 's390', 's390x'] and
bool(ARCH_GUESS) and
self.build_config.arch != ARCH_GUESS)
variables.update({
'gc_stress': options.gc_stress or options.random_gc_stress,
'gc_fuzzer': options.random_gc_stress,
'novfp3': options.novfp3,
'simulator_run': simulator_run,
})
return variables
......
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