Commit 5839231f authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[test] Automatically add --no-stress-opt to message tests

Message tests check the output of a test against an expected file.
Executing with --stress-opt changes the output, since the test will be
run multiple times. For that reason, most message tests explicitly add
the --no-stress-opt flag.

Since this is redundant, and not a per-test setting, just configure this
globally for all message tests instead.

R=machenbach@chromium.org

Bug: v8:12425
Change-Id: I52f1b43da2781fcb6f6bd37e67d483ca69c1c929
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3471637Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79164}
parent cf6cda0a
......@@ -11,10 +11,6 @@ foo.js
foo.out
```
**All tests must end with an exception**. The test runner does not
handle output from multiple runs, e.g., `--stress-opt`. Without an exception,
the output will be generated several times and the comparison will fail.
You can use a regex in the expected output instead of the exact
path:
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js because use of {g} in {f} has return type different from {g}.
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js because {g} has return type different from use of {g} in {f}.
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js because symbol {f} is defined as module function twice.
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js because symbol {f} is used as module variable and function.
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module(stdlib, foreign, heap) {
"use asm"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module(stdlib, foreign, heap) {
"use asm"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module(stdlib, foreign, heap) {
"use asm"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module(stdlib, foreign, heap) {
"use asm"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module(stdlib, foreign, heap) {
"use asm"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js {funTable} definition doesn't match the use in {f}.
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js {funTable} use in {f} doesn't match its use in {g}.
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Flags: --validate-asm --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-stress-opt
console.time();
console.timeEnd();
......
......@@ -6,11 +6,11 @@ log more
console.warn: warn 2
console.debug: debug
console.info: info
console.info: *%(basename)s:24: Error: exception
console.info: *%(basename)s:22: Error: exception
console.info({ toString: () => {throw new Error("exception");} })
^
Error: exception
at Object.toString (*%(basename)s:24:39)
at Object.toString (*%(basename)s:22:39)
at console.info (<anonymous>)
at *%(basename)s:24:9
at *%(basename)s:22:9
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-stress-opt
var state = 0;
function inc() {
console.log("increment state");
......
......@@ -6,8 +6,8 @@ increment state
current state: 2
increment state
current state: 3
*%(basename)s:19: Error
*%(basename)s:17: Error
setTimeout(function() { throw new Error(); });
^
Error
at *%(basename)s:19:35
at *%(basename)s:17:35
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-stress-opt
d8.file.execute("test/mjsunit/mjsunit.js");
let obj = {f: 6254};
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-stress-opt
d8.file.execute("test/mjsunit/mjsunit.js");
let resolve_handler;
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-stress-opt
d8.file.execute("test/mjsunit/mjsunit.js");
let obj = {f: 1254};
......
......@@ -53,7 +53,8 @@ class TestCase(testcase.D8TestCase):
self._base_path = os.path.join(self.suite.root, self.path)
source = self.get_source()
self._source_files = self._parse_source_files(source)
self._source_flags = self._parse_source_flags(source)
# Do not stress-opt message tests, since that changes the output.
self._source_flags = ['--no-stress-opt'] + self._parse_source_flags(source)
def _parse_source_files(self, source):
files = []
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-stress-opt
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
// Test that d8 does not terminate until wasm compilation has finished and the
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-wasm --no-stress-opt
// Flags: --expose-wasm
d8.file.execute('test/mjsunit/mjsunit.js');
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
......
......@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-wasm --wasm-test-streaming --no-stress-opt
// Flags: --expose-wasm --wasm-test-streaming
d8.file.execute("test/message/wasm-function-name-async.js");
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-wasm --no-stress-opt
// Flags: --expose-wasm
d8.file.execute('test/mjsunit/mjsunit.js');
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
......
......@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-wasm --wasm-test-streaming --no-stress-opt
// Flags: --expose-wasm --wasm-test-streaming
d8.file.execute("test/message/wasm-module-and-function-name-async.js");
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-wasm --no-stress-opt
// Flags: --expose-wasm
d8.file.execute('test/mjsunit/mjsunit.js');
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
......
......@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-wasm --wasm-test-streaming --no-stress-opt
// Flags: --expose-wasm --wasm-test-streaming
d8.file.execute("test/message/wasm-module-name-async.js");
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-wasm --no-stress-opt
// Flags: --expose-wasm
d8.file.execute('test/mjsunit/mjsunit.js');
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
......
......@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-wasm --wasm-test-streaming --no-stress-opt
// Flags: --expose-wasm --wasm-test-streaming
d8.file.execute("test/message/wasm-no-name-async.js");
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --trace-wasm --no-wasm-tier-up --liftoff --no-stress-opt
// Flags: --trace-wasm --no-wasm-tier-up --liftoff
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-stress-opt --trace-wasm-memory --liftoff
// Flags: --trace-wasm-memory --liftoff
// Flags: --no-wasm-tier-up --experimental-wasm-simd
// Force enable sse3 and sse4-1, since that will determine which execution tier
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --no-stress-opt --trace-wasm-memory --no-liftoff
// Flags: --trace-wasm-memory --no-liftoff
// Flags: --experimental-wasm-simd
d8.file.execute("test/mjsunit/wasm/wasm-module-builder.js");
......
......@@ -2,6 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --trace-wasm --no-liftoff --no-stress-opt
// Flags: --trace-wasm --no-liftoff
d8.file.execute('test/message/wasm-trace-liftoff.js')
......@@ -3,7 +3,6 @@
// found in the LICENSE file.
// Flags: --expose-gc --noincremental-marking
// Flags: --no-stress-opt
// Since cleanup tasks are top-level tasks, errors thrown from them don't stop
// future cleanup tasks from running.
......
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