mirror of
https://github.com/dart-lang/sdk
synced 2024-09-30 04:48:37 +00:00
[dart2wasm] Add dart2wasm-asserts-* configurations
Our tests (including code in core libraries) are never run with assertions enabled. => Add the necessary configuration support in test_matrix.json => We'll then add a new builder running one configuration with asserts. Change-Id: Id1bc27ddf7d683846510af4711679ad14f0e4168 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370620 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
parent
2645665183
commit
e18c43a21e
|
@ -89,7 +89,7 @@ class ConstantResolver extends Transformer {
|
|||
}
|
||||
|
||||
class WasmTarget extends Target {
|
||||
WasmTarget({this.removeAsserts = true, this.mode = Mode.regular});
|
||||
WasmTarget({this.removeAsserts = false, this.mode = Mode.regular});
|
||||
|
||||
bool removeAsserts;
|
||||
Mode mode;
|
||||
|
|
|
@ -540,6 +540,7 @@ class Dart2WasmCompilerConfiguration extends CompilerConfiguration {
|
|||
TestFile testFile, List<String> vmOptions, List<String> args) {
|
||||
return [
|
||||
if (!_useSdk && _enableHostAsserts) '--compiler-asserts',
|
||||
if (_enableAsserts) '--enable-asserts',
|
||||
...testFile.sharedOptions,
|
||||
..._configuration.sharedOptions,
|
||||
..._experimentsArgument(_configuration, testFile),
|
||||
|
|
|
@ -456,6 +456,16 @@
|
|||
"timeout": 240
|
||||
}
|
||||
},
|
||||
"dart2wasm-asserts-(linux|mac|win)-(d8|jsshell|jsc|chrome|firefox)": {
|
||||
"options": {
|
||||
"host-asserts": true,
|
||||
"enable-asserts": true,
|
||||
"dart2wasm-options": [
|
||||
"-O0"
|
||||
],
|
||||
"timeout": 60
|
||||
}
|
||||
},
|
||||
"dart2wasm-(linux|mac|win)-(d8|jsshell|jsc|chrome|firefox)": {
|
||||
"options": {
|
||||
"host-asserts": true,
|
||||
|
@ -2590,6 +2600,38 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"builders": [
|
||||
"dart2wasm-asserts-linux-chrome"
|
||||
],
|
||||
"meta": {
|
||||
"description": "dart2wasm tests with assertions enabled"
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"name": "build dart",
|
||||
"script": "tools/build.py",
|
||||
"arguments": [
|
||||
"runtime",
|
||||
"dart2wasm",
|
||||
"create_sdk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dart2wasm tests",
|
||||
"arguments": [
|
||||
"-ndart2wasm-asserts-linux-${runtime}",
|
||||
"co19",
|
||||
"corelib",
|
||||
"language",
|
||||
"lib",
|
||||
"web"
|
||||
],
|
||||
"shards": 8,
|
||||
"fileset": "dart2wasm_hostasserts"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"builders": [
|
||||
"dart2wasm-linux-chrome",
|
||||
|
|
Loading…
Reference in a new issue