Skip to content

Commit 8ebf5ef

Browse files
committed
Re-enable most tests on FROZEN_CACHE
1 parent 1714f1c commit 8ebf5ef

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

test/test_browser.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from common import HttpServerThread, requires_dev_dependency
2727
from tools import shared
2828
from tools import ports
29+
from tools.shared import config
2930
from tools.shared import EMCC, WINDOWS, FILE_PACKAGER, PIPE, DEBUG
3031
from tools.utils import delete_dir
3132

@@ -4454,14 +4455,18 @@ def test_webgl_simple_extensions(self, webgl_version, simple_enable_extensions):
44544455
self.btest_exit('webgl2_simple_enable_extensions.c', cflags=cmd)
44554456

44564457
@parameterized({
4457-
'': ([],),
4458-
'closure': (['-sASSERTIONS', '--closure=1'],),
4459-
'closure_advanced': (['-sASSERTIONS', '--closure=1', '-O3'],),
4460-
'main_module': (['-sMAIN_MODULE=1'],),
4461-
'pthreads': (['-pthread', '-sOFFSCREENCANVAS_SUPPORT'],),
4458+
'': (True, [],),
4459+
'closure': (True, ['-sASSERTIONS', '--closure=1'],),
4460+
'closure_advanced': (True, ['-sASSERTIONS', '--closure=1', '-O3'],),
4461+
# Not precached with PIC
4462+
'main_module': (False, ['-sMAIN_MODULE=1'],),
4463+
# Not precached with SHARED_MEMORY
4464+
'pthreads': (False, ['-pthread', '-sOFFSCREENCANVAS_SUPPORT'],),
44624465
})
44634466
@requires_webgpu
4464-
def test_webgpu_basic_rendering(self, args):
4467+
def test_webgpu_basic_rendering(self, assume_precached, args):
4468+
if config.FROZEN_CACHE and not assume_precached:
4469+
self.skipTest("test doesn't work with frozen cache")
44654470
self.btest_exit('webgpu_basic_rendering.cpp', cflags=['--use-port=emdawnwebgpu', '-sEXIT_RUNTIME'] + args)
44664471

44674472
@requires_webgpu

test/test_other.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,6 +2586,7 @@ def test_contrib_ports(self):
25862586

25872587
@requires_network
25882588
def test_remote_ports(self):
2589+
self.set_setting('DEFAULT_TO_CXX') # emdawnwebgpu uses C++ internally
25892590
self.emcc(test_file('hello_world.c'), ['--use-port=emdawnwebgpu'])
25902591

25912592
@crossplatform
@@ -9650,11 +9651,10 @@ def test_closure_full_js_library(self, args):
96509651
for sym in glsyms:
96519652
self.assertContained('.' + sym, js)
96529653

9653-
@crossplatform # So tests will run on non-Linux platforms, where FROZEN_CACHE isn't set.
96549654
@also_with_wasm64
96559655
def test_closure_webgpu(self):
9656-
if config.FROZEN_CACHE:
9657-
# TODO(crbug.com/446944885): Make Emdawnwebgpu work with FROZEN_CACHE if possible.
9656+
if config.FROZEN_CACHE and self.get_setting('MEMORY64'):
9657+
# CI configuration doesn't run `embuilder` with wasm64 on ports
96589658
self.skipTest("test doesn't work with frozen cache")
96599659
self.set_setting('DEFAULT_TO_CXX') # emdawnwebgpu uses C++ internally
96609660
self.build('hello_world.c', cflags=[
@@ -12302,16 +12302,16 @@ def test_standalone_syscalls(self):
1230212302
self.assertContained(expected, self.run_js('test.wasm', engine))
1230312303

1230412304
@flaky('https://github.com/emscripten-core/emscripten/issues/25343')
12305-
@crossplatform # So tests will run on non-Linux platforms, where FROZEN_CACHE isn't set.
12305+
@crossplatform
1230612306
@also_with_wasm64
1230712307
@parameterized({
1230812308
'': ([],),
1230912309
'closure': (['--closure=1', '-Werror=closure'],),
1231012310
'closure_assertions': (['--closure=1', '-Werror=closure', '-sASSERTIONS'],),
1231112311
})
1231212312
def test_emdawnwebgpu_link_test(self, args):
12313-
if config.FROZEN_CACHE:
12314-
# TODO(crbug.com/446944885): Make Emdawnwebgpu work with FROZEN_CACHE if possible.
12313+
if config.FROZEN_CACHE and self.get_setting('MEMORY64'):
12314+
# CI configuration doesn't run `embuilder` with wasm64 on ports
1231512315
self.skipTest("test doesn't work with frozen cache")
1231612316
self.emcc(test_file('test_emdawnwebgpu_link_test.cpp'), ['--use-port=emdawnwebgpu', '-sASYNCIFY'] + args)
1231712317

0 commit comments

Comments
 (0)