Skip to content

Commit f41a41f

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 12bb5c9 commit f41a41f

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed
File renamed without changes.

test/test_browser.py

Lines changed: 4 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,7 @@ 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
2075+
@no_swiftshader
20772076
def test_cubegeom_pre_relocatable(self):
20782077
self.btest('third_party/cubegeom/cubegeom_pre.c', reference='third_party/cubegeom/cubegeom_pre.png', args=['-sLEGACY_GL_EMULATION', '-lGL', '-lSDL', '-sRELOCATABLE'])
20792078

@@ -3467,7 +3466,6 @@ def test_minimal_runtime_modularize(self):
34673466
def test_minimal_runtime_export_name(self):
34683467
self.btest_exit(test_file('browser_test_hello_world.c'), args=['-sEXPORT_NAME=Foo', '-sMINIMAL_RUNTIME'])
34693468

3470-
@requires_sync_compilation
34713469
def test_modularize(self):
34723470
for opts in [
34733471
[],
@@ -3602,7 +3600,6 @@ def test_webidl(self):
36023600
print(opts)
36033601
self.btest('webidl/test.cpp', '1', args=['--post-js', 'glue.js', '-I.', '-DBROWSER'] + opts)
36043602

3605-
@requires_sync_compilation
36063603
def test_dynamic_link(self):
36073604
create_file('main.c', r'''
36083605
#include <stdio.h>
@@ -3708,7 +3705,6 @@ def do_run(src, expected_output, emcc_args):
37083705
self._test_dylink_dso_needed(do_run)
37093706

37103707
@requires_graphics_hardware
3711-
@requires_sync_compilation
37123708
def test_dynamic_link_glemu(self):
37133709
create_file('main.c', r'''
37143710
#include <stdio.h>
@@ -4216,7 +4212,6 @@ def test_pthread_global_data_initialization(self):
42164212
self.btest_exit(test_file('pthread/test_pthread_global_data_initialization.c'), args=args + mem_init_mode + ['-pthread', '-sPROXY_TO_PTHREAD', '-sPTHREAD_POOL_SIZE'])
42174213

42184214
@requires_threads
4219-
@requires_sync_compilation
42204215
def test_pthread_global_data_initialization_in_sync_compilation_mode(self):
42214216
mem_init_modes = [[], ['-sWASM=0', '--memory-init-file', '0'], ['-sWASM=0', '--memory-init-file', '1']]
42224217
for mem_init_mode in mem_init_modes:
@@ -4375,8 +4370,7 @@ def test_in_flight_memfile_request(self):
43754370
print('default html')
43764371
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+)
43774372

4378-
@requires_sync_compilation
4379-
def test_binaryen_async(self):
4373+
def test_async_compile(self):
43804374
# notice when we use async compilation
43814375
script = '''
43824376
<script>
@@ -4416,11 +4410,11 @@ def test_binaryen_async(self):
44164410
(['-O3', '-sWASM_ASYNC_COMPILATION=0'], 0),
44174411
]:
44184412
print(opts, returncode)
4419-
self.btest_exit('binaryen_async.c', assert_returncode=returncode, args=common_args + opts)
4413+
self.btest_exit('browser/test_async_compile.c', assert_returncode=returncode, args=common_args + opts)
44204414
# Ensure that compilation still works and is async without instantiateStreaming available
44214415
no_streaming = ' <script> WebAssembly.instantiateStreaming = undefined;</script>'
44224416
shell_with_script('shell.html', 'shell.html', no_streaming + script)
4423-
self.btest_exit('binaryen_async.c', assert_returncode=1, args=common_args)
4417+
self.btest_exit('browser/test_async_compile.c', assert_returncode=1, args=common_args)
44244418

44254419
# Test that implementing Module.instantiateWasm() callback works.
44264420
@parameterized({

0 commit comments

Comments
 (0)