Fix skwasm tests (#145570)

Skwasm tests are now running as `bringup: true` in postsubmit, but failing. Let's get them fixed.
This commit is contained in:
Jackson Gardner
2024-04-09 12:35:07 -07:00
committed by GitHub
parent 6f9fff1f7c
commit 51e70fa16b
48 changed files with 230 additions and 177 deletions

View File

@@ -93,7 +93,7 @@ class TestGoldenComparator {
final Map<String, String> environment = <String, String>{
// Chrome is the only supported browser currently.
'FLUTTER_TEST_BROWSER': 'chrome',
'FLUTTER_WEB_RENDERER': webRenderer == WebRendererMode.html ? 'html' : 'canvaskit',
'FLUTTER_WEB_RENDERER': webRenderer.name,
};
return _processManager.start(command, environment: environment);
}

View File

@@ -238,15 +238,17 @@ class WebTestCompiler {
'--extra-compiler-option=--multi-root-scheme=org-dartlang-app',
'--extra-compiler-option=--multi-root=${projectDirectory.childDirectory('test').path}',
'--extra-compiler-option=--multi-root=${outputDirectory.path}',
'--extra-compiler-option=--enable-asserts',
'--extra-compiler-option=--no-inlining',
if (webRenderer == WebRendererMode.skwasm) ...<String>[
'--extra-compiler-option=--import-shared-memory',
'--extra-compiler-option=--shared-memory-max-pages=32768',
],
],
...buildInfo.extraFrontEndOptions,
for (final String dartDefine in dartDefines)
'-D$dartDefine',
'-O1',
'-O0',
'-o',
outputWasmFile.path,
testFile.path, // dartfile
@@ -257,8 +259,7 @@ class WebTestCompiler {
processManager: _processManager,
);
await processUtils.run(
throwOnError: true,
await processUtils.stream(
compilationArgs,
);