diff options
Diffstat (limited to 'deps/v8/tools/testrunner')
-rw-r--r-- | deps/v8/tools/testrunner/base_runner.py | 28 | ||||
-rw-r--r-- | deps/v8/tools/testrunner/local/junit_output.py | 49 | ||||
-rw-r--r-- | deps/v8/tools/testrunner/local/statusfile.py | 2 | ||||
-rw-r--r-- | deps/v8/tools/testrunner/local/variants.py | 21 | ||||
-rwxr-xr-x | deps/v8/tools/testrunner/standard_runner.py | 2 | ||||
-rw-r--r-- | deps/v8/tools/testrunner/testproc/fuzzer.py | 8 | ||||
-rw-r--r-- | deps/v8/tools/testrunner/testproc/progress.py | 40 |
7 files changed, 40 insertions, 110 deletions
diff --git a/deps/v8/tools/testrunner/base_runner.py b/deps/v8/tools/testrunner/base_runner.py index d3674a4f8b..c040912fc9 100644 --- a/deps/v8/tools/testrunner/base_runner.py +++ b/deps/v8/tools/testrunner/base_runner.py @@ -113,6 +113,7 @@ SLOW_ARCHS = [ "mips64el", "s390", "s390x", + "riscv64" ] @@ -169,6 +170,7 @@ class BuildConfig(object): self.asan = build_config['is_asan'] self.cfi_vptr = build_config['is_cfi'] + self.control_flow_integrity = build_config['v8_control_flow_integrity'] self.concurrent_marking = build_config['v8_enable_concurrent_marking'] self.dcheck_always_on = build_config['dcheck_always_on'] self.gcov_coverage = build_config['is_gcov_coverage'] @@ -187,6 +189,7 @@ class BuildConfig(object): self.verify_csa = build_config['v8_enable_verify_csa'] self.lite_mode = build_config['v8_enable_lite_mode'] self.pointer_compression = build_config['v8_enable_pointer_compression'] + self.webassembly = build_config['v8_enable_webassembly'] # Export only for MIPS target if self.arch in ['mips', 'mipsel', 'mips64', 'mips64el']: self.mips_arch_variant = build_config['mips_arch_variant'] @@ -204,6 +207,8 @@ class BuildConfig(object): detected_options.append('asan') if self.cfi_vptr: detected_options.append('cfi_vptr') + if self.control_flow_integrity: + detected_options.append('control_flow_integrity') if self.dcheck_always_on: detected_options.append('dcheck_always_on') if self.gcov_coverage: @@ -224,6 +229,8 @@ class BuildConfig(object): detected_options.append('lite_mode') if self.pointer_compression: detected_options.append('pointer_compression') + if self.webassembly: + detected_options.append('webassembly') return '\n'.join(detected_options) @@ -351,9 +358,6 @@ class BaseTestRunner(object): help="Path to a file for storing json results.") parser.add_option('--slow-tests-cutoff', type="int", default=100, help='Collect N slowest tests') - parser.add_option("--junitout", help="File name of the JUnit output") - parser.add_option("--junittestsuite", default="v8tests", - help="The testsuite name in the JUnit output file") parser.add_option("--exit-after-n-failures", type="int", default=100, help="Exit after the first N failures instead of " "running all tests. Pass 0 to disable this feature.") @@ -634,11 +638,24 @@ class BaseTestRunner(object): self.build_config.arch in ['mipsel', 'mips', 'mips64', 'mips64el'] and self.build_config.mips_arch_variant) + no_simd_sse = any( + i in options.extra_flags for i in ['--noenable-sse3', + '--no-enable-sse3' + '--noenable-ssse3', + '--no-enable-ssse3', + '--noenable-sse4-1', + '--no-enable-sse4_1']) + + # Set no_simd_sse on architectures without Simd enabled. + if self.build_config.arch == 'ppc64': + no_simd_sse = True + return { "arch": self.build_config.arch, "asan": self.build_config.asan, "byteorder": sys.byteorder, "cfi_vptr": self.build_config.cfi_vptr, + "control_flow_integrity": self.build_config.control_flow_integrity, "concurrent_marking": self.build_config.concurrent_marking, "dcheck_always_on": self.build_config.dcheck_always_on, "deopt_fuzzer": False, @@ -646,6 +663,7 @@ class BaseTestRunner(object): "gc_fuzzer": False, "gc_stress": False, "gcov_coverage": self.build_config.gcov_coverage, + "has_webassembly": self.build_config.webassembly, "isolates": options.isolates, "is_clang": self.build_config.is_clang, "is_full_debug": self.build_config.is_full_debug, @@ -654,6 +672,7 @@ class BaseTestRunner(object): "msan": self.build_config.msan, "no_harness": options.no_harness, "no_i18n": self.build_config.no_i18n, + "no_simd_sse": no_simd_sse, "novfp3": False, "optimize_for_size": "--optimize-for-size" in options.extra_flags, "predictable": self.build_config.predictable, @@ -760,9 +779,6 @@ class BaseTestRunner(object): def _create_progress_indicators(self, test_count, options): procs = [PROGRESS_INDICATORS[options.progress]()] - if options.junitout: - procs.append(progress.JUnitTestProgressIndicator(options.junitout, - options.junittestsuite)) if options.json_test_results: procs.append(progress.JsonTestProgressIndicator(self.framework_name)) diff --git a/deps/v8/tools/testrunner/local/junit_output.py b/deps/v8/tools/testrunner/local/junit_output.py deleted file mode 100644 index 52f31ec422..0000000000 --- a/deps/v8/tools/testrunner/local/junit_output.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2013 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -import xml.etree.ElementTree as xml - - -class JUnitTestOutput: - def __init__(self, test_suite_name): - self.root = xml.Element("testsuite") - self.root.attrib["name"] = test_suite_name - - def HasRunTest(self, test_name, test_cmd, test_duration, test_failure): - testCaseElement = xml.Element("testcase") - testCaseElement.attrib["name"] = test_name - testCaseElement.attrib["cmd"] = test_cmd - testCaseElement.attrib["time"] = str(round(test_duration, 3)) - if len(test_failure): - failureElement = xml.Element("failure") - failureElement.text = test_failure - testCaseElement.append(failureElement) - self.root.append(testCaseElement) - - def FinishAndWrite(self, f): - xml.ElementTree(self.root).write(f, "UTF-8") diff --git a/deps/v8/tools/testrunner/local/statusfile.py b/deps/v8/tools/testrunner/local/statusfile.py index 854abc6655..6c2cc01fb8 100644 --- a/deps/v8/tools/testrunner/local/statusfile.py +++ b/deps/v8/tools/testrunner/local/statusfile.py @@ -63,7 +63,7 @@ VARIABLES = {ALWAYS: True} for var in ["debug", "release", "big", "little", "android", "arm", "arm64", "ia32", "mips", "mipsel", "mips64", "mips64el", "x64", "ppc", "ppc64", "s390", "s390x", "macos", "windows", - "linux", "aix", "r1", "r2", "r3", "r5", "r6"]: + "linux", "aix", "r1", "r2", "r3", "r5", "r6", "riscv64"]: VARIABLES[var] = var # Allow using variants as keywords. diff --git a/deps/v8/tools/testrunner/local/variants.py b/deps/v8/tools/testrunner/local/variants.py index 69ca853de3..595f7e27f4 100644 --- a/deps/v8/tools/testrunner/local/variants.py +++ b/deps/v8/tools/testrunner/local/variants.py @@ -14,14 +14,9 @@ ALL_VARIANT_FLAGS = { "interpreted_regexp": [["--regexp-interpret-all"]], "experimental_regexp": [["--default-to-experimental-regexp-engine"]], "jitless": [["--jitless"]], + "sparkplug": [["--sparkplug"]], "minor_mc": [["--minor-mc"]], - "nci": [["--turbo-nci"]], - "nci_as_midtier": [["--turbo-nci-as-midtier"]], "no_lfa": [["--no-lazy-feedback-allocation"]], - "no_local_heaps": [[ - "--no-local-heaps", - "--no-turbo-direct-heap-access", - "--no-finalize-streaming-on-background"]], # No optimization means disable all optimizations. OptimizeFunctionOnNextCall # would not force optimization too. It turns into a Nop. Please see # https://chromium-review.googlesource.com/c/452620/ for more discussion. @@ -33,6 +28,7 @@ ALL_VARIANT_FLAGS = { "slow_path": [["--force-slow-path"]], "stress": [["--stress-opt", "--no-liftoff", "--stress-lazy-source-positions"]], "stress_concurrent_allocation": [["--stress-concurrent-allocation"]], + "stress_concurrent_inlining": [["--stress-concurrent-inlining"]], "stress_js_bg_compile_wasm_code_gc": [["--stress-background-compile", "--finalize-streaming-on-background", "--stress-wasm-code-gc"]], @@ -43,6 +39,7 @@ ALL_VARIANT_FLAGS = { "trusted": [["--no-untrusted-code-mitigations"]], "no_wasm_traps": [["--no-wasm-trap-handler"]], "turboprop": [["--turboprop"]], + "turboprop_as_toptier": [["--turboprop-as-toptier"]], "instruction_scheduling": [["--turbo-instruction-scheduling"]], "stress_instruction_scheduling": [["--turbo-stress-instruction-scheduling"]], "top_level_await": [["--harmony-top-level-await"]], @@ -53,17 +50,20 @@ ALL_VARIANT_FLAGS = { # implications defined in flag-definitions.h. INCOMPATIBLE_FLAGS_PER_VARIANT = { "assert_types": ["--no-assert-types"], - "jitless": ["--opt", "--always-opt", "--liftoff", "--track-field-types", "--validate-asm"], + "jitless": ["--opt", "--always-opt", "--liftoff", "--track-field-types", "--validate-asm", "--sparkplug", "--always-sparkplug"], "no_wasm_traps": ["--wasm-trap-handler"], "nooptimization": ["--opt", "--always-opt", "--no-liftoff", "--wasm-tier-up"], "slow_path": ["--no-force-slow-path"], "stress_concurrent_allocation": ["--single-threaded-gc", "--predictable"], + "stress_concurrent_inlining": ["--single-threaded", "--predictable", "--no-turbo-direct-heap-access"], "stress_incremental_marking": ["--no-stress-incremental-marking"], - "future": ["--parallel-compile-tasks"], + "future": ["--parallel-compile-tasks", "--no-turbo-direct-heap-access"], "stress_js_bg_compile_wasm_code_gc": ["--no-stress-background-compile", "--parallel-compile-tasks"], "stress": ["--no-stress-opt", "--always-opt", "--no-always-opt", "--liftoff", "--max-inlined-bytecode-size=*", "--max-inlined-bytecode-size-cumulative=*", "--stress-inline"], - "turboprop": ["--interrupt-budget=*", "--no-turboprop"], + "sparkplug": ["--jitless"], + "turboprop": ["--interrupt-budget=*", "--no-turbo-direct-heap-access", "--no-turboprop"], + "turboprop_as_toptier": ["--interrupt-budget=*", "--no-turbo-direct-heap-access", "--no-turboprop", "--no-turboprop-as-toptier"], "code_serializer": ["--cache=after-execute", "--cache=full-code-cache", "--cache=none"], "no_local_heaps": ["--concurrent-inlining", "--turboprop"], "experimental_regexp": ["--no-enable-experimental-regexp-engine", "--no-default-to-experimental-regexp-engine"], @@ -96,8 +96,9 @@ INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = { "--no-enable-sse4-1": ["--enable-sse4-1"], "--optimize-for-size": ["--max-semi-space-size=*"], "--stress_concurrent_allocation": ["--single-threaded-gc", "--predictable"], + "--stress_concurrent_inlining": ["--single-threaded", "--predictable"], "--stress-flush-bytecode": ["--no-stress-flush-bytecode"], - "--future": ["--parallel-compile-tasks"], + "--future": ["--parallel-compile-tasks", "--no-turbo-direct-heap-access"], "--stress-incremental-marking": INCOMPATIBLE_FLAGS_PER_VARIANT["stress_incremental_marking"], } diff --git a/deps/v8/tools/testrunner/standard_runner.py b/deps/v8/tools/testrunner/standard_runner.py index ff58391110..f3551d01b8 100755 --- a/deps/v8/tools/testrunner/standard_runner.py +++ b/deps/v8/tools/testrunner/standard_runner.py @@ -46,7 +46,7 @@ VARIANT_ALIASES = { 'exhaustive': MORE_VARIANTS + VARIANTS, # Additional variants, run on a subset of bots. 'extra': ['nooptimization', 'future', 'no_wasm_traps', 'turboprop', - 'instruction_scheduling'], + 'instruction_scheduling', 'turboprop_as_toptier'], } # Extra flags passed to all tests using the standard test runner. diff --git a/deps/v8/tools/testrunner/testproc/fuzzer.py b/deps/v8/tools/testrunner/testproc/fuzzer.py index b802368183..965ba23d04 100644 --- a/deps/v8/tools/testrunner/testproc/fuzzer.py +++ b/deps/v8/tools/testrunner/testproc/fuzzer.py @@ -21,9 +21,11 @@ EXTRA_FLAGS = [ (0.1, '--interrupt-budget=100'), (0.1, '--liftoff'), (0.2, '--no-analyze-environment-liveness'), - (0.1, '--no-enable-sse3'), - (0.1, '--no-enable-ssse3'), - (0.1, '--no-enable-sse4_1'), + # TODO(machenbach): Enable when it doesn't collide with crashing on missing + # simd features. + #(0.1, '--no-enable-sse3'), + #(0.1, '--no-enable-ssse3'), + #(0.1, '--no-enable-sse4_1'), (0.1, '--no-enable-sse4_2'), (0.1, '--no-enable-sahf'), (0.1, '--no-enable-avx'), diff --git a/deps/v8/tools/testrunner/testproc/progress.py b/deps/v8/tools/testrunner/testproc/progress.py index 634ef7c2f2..9ff943a5c2 100644 --- a/deps/v8/tools/testrunner/testproc/progress.py +++ b/deps/v8/tools/testrunner/testproc/progress.py @@ -15,7 +15,6 @@ import time from . import base from . import util -from ..local import junit_output def print_failure_header(test): @@ -349,45 +348,6 @@ class MonochromeProgressIndicator(CompactProgressIndicator): print(("\r" + (" " * last_length) + "\r"), end='') -class JUnitTestProgressIndicator(ProgressIndicator): - def __init__(self, junitout, junittestsuite): - super(JUnitTestProgressIndicator, self).__init__() - self._requirement = base.DROP_PASS_STDOUT - - self.outputter = junit_output.JUnitTestOutput(junittestsuite) - if junitout: - self.outfile = open(junitout, "w") - else: - self.outfile = sys.stdout - - def _on_result_for(self, test, result): - # TODO(majeski): Support for dummy/grouped results - fail_text = "" - output = result.output - if result.has_unexpected_output: - stdout = output.stdout.strip() - if len(stdout): - fail_text += "stdout:\n%s\n" % stdout - stderr = output.stderr.strip() - if len(stderr): - fail_text += "stderr:\n%s\n" % stderr - fail_text += "Command: %s" % result.cmd.to_string() - if output.HasCrashed(): - fail_text += "exit code: %d\n--- CRASHED ---" % output.exit_code - if output.HasTimedOut(): - fail_text += "--- TIMEOUT ---" - self.outputter.HasRunTest( - test_name=str(test), - test_cmd=result.cmd.to_string(relative=True), - test_duration=output.duration, - test_failure=fail_text) - - def finished(self): - self.outputter.FinishAndWrite(self.outfile) - if self.outfile != sys.stdout: - self.outfile.close() - - class JsonTestProgressIndicator(ProgressIndicator): def __init__(self, framework_name): super(JsonTestProgressIndicator, self).__init__() |