Skip to content

Commit 8c8dcc2

Browse files
committed
Remove @requires_sync_compilation test annotation. NFC
None of these tests require sync compilation anymore as far as I can tell, and even if they did, chrome now supports sync compilation up of wasm files up to 8Mb: chromium/chromium@d1a1a8f Also, rename `test_binaryen_async` to `test_async_compile`. Fixes: #14404
1 parent 4992246 commit 8c8dcc2

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed
File renamed without changes.

test/test_browser.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ def decorated(self, *args, **kwargs):
216216

217217
requires_graphics_hardware = unittest.skipIf(os.getenv('EMTEST_LACKS_GRAPHICS_HARDWARE'), "This test requires graphics hardware")
218218
requires_sound_hardware = unittest.skipIf(os.getenv('EMTEST_LACKS_SOUND_HARDWARE'), "This test requires sound hardware")
219-
requires_sync_compilation = unittest.skipIf(is_chrome(), "This test requires synchronous compilation, which does not work in Chrome (except for tiny wasms)")
220219
requires_offscreen_canvas = unittest.skipIf(os.getenv('EMTEST_LACKS_OFFSCREEN_CANVAS'), "This test requires a browser with OffscreenCanvas")
221220

222221

@@ -2073,7 +2072,6 @@ def test_cubegeom_pre_regal(self):
20732072
self.btest('third_party/cubegeom/cubegeom_pre.c', reference='third_party/cubegeom/cubegeom_pre.png', args=['-sUSE_REGAL', '-DUSE_REGAL', '-lGL', '-lSDL'])
20742073

20752074
@requires_graphics_hardware
2076-
@requires_sync_compilation
20772075
def test_cubegeom_pre_relocatable(self):
20782076
self.btest('third_party/cubegeom/cubegeom_pre.c', reference='third_party/cubegeom/cubegeom_pre.png', args=['-sLEGACY_GL_EMULATION', '-lGL', '-lSDL', '-sRELOCATABLE'])
20792077

@@ -3467,7 +3465,6 @@ def test_minimal_runtime_modularize(self):
34673465
def test_minimal_runtime_export_name(self):
34683466
self.btest_exit(test_file('browser_test_hello_world.c'), args=['-sEXPORT_NAME=Foo', '-sMINIMAL_RUNTIME'])
34693467

3470-
@requires_sync_compilation
34713468
def test_modularize(self):
34723469
for opts in [
34733470
[],
@@ -3602,7 +3599,6 @@ def test_webidl(self):
36023599
print(opts)
36033600
self.btest('webidl/test.cpp', '1', args=['--post-js', 'glue.js', '-I.', '-DBROWSER'] + opts)
36043601

3605-
@requires_sync_compilation
36063602
def test_dynamic_link(self):
36073603
create_file('main.c', r'''
36083604
#include <stdio.h>
@@ -3708,7 +3704,6 @@ def do_run(src, expected_output, emcc_args):
37083704
self._test_dylink_dso_needed(do_run)
37093705

37103706
@requires_graphics_hardware
3711-
@requires_sync_compilation
37123707
def test_dynamic_link_glemu(self):
37133708
create_file('main.c', r'''
37143709
#include <stdio.h>
@@ -4216,7 +4211,6 @@ def test_pthread_global_data_initialization(self):
42164211
self.btest_exit(test_file('pthread/test_pthread_global_data_initialization.c'), args=args + mem_init_mode + ['-pthread', '-sPROXY_TO_PTHREAD', '-sPTHREAD_POOL_SIZE'])
42174212

42184213
@requires_threads
4219-
@requires_sync_compilation
42204214
def test_pthread_global_data_initialization_in_sync_compilation_mode(self):
42214215
mem_init_modes = [[], ['-sWASM=0', '--memory-init-file', '0'], ['-sWASM=0', '--memory-init-file', '1']]
42224216
for mem_init_mode in mem_init_modes:
@@ -4375,8 +4369,7 @@ def test_in_flight_memfile_request(self):
43754369
print('default html')
43764370
self.btest('in_flight_memfile_request.c', expected='0' if o < 2 else '1', args=opts) # should happen when there is a mem init file (-O2+)
43774371

4378-
@requires_sync_compilation
4379-
def test_binaryen_async(self):
4372+
def test_async_compile(self):
43804373
# notice when we use async compilation
43814374
script = '''
43824375
<script>
@@ -4416,11 +4409,11 @@ def test_binaryen_async(self):
44164409
(['-O3', '-sWASM_ASYNC_COMPILATION=0'], 0),
44174410
]:
44184411
print(opts, returncode)
4419-
self.btest_exit('binaryen_async.c', assert_returncode=returncode, args=common_args + opts)
4412+
self.btest_exit('browser/test_async_compile.c', assert_returncode=returncode, args=common_args + opts)
44204413
# Ensure that compilation still works and is async without instantiateStreaming available
44214414
no_streaming = ' <script> WebAssembly.instantiateStreaming = undefined;</script>'
44224415
shell_with_script('shell.html', 'shell.html', no_streaming + script)
4423-
self.btest_exit('binaryen_async.c', assert_returncode=1, args=common_args)
4416+
self.btest_exit('browser/test_async_compile.c', assert_returncode=1, args=common_args)
44244417

44254418
# Test that implementing Module.instantiateWasm() callback works.
44264419
@parameterized({

0 commit comments

Comments
 (0)