Skip to content

Remove @requires_sync_compilation test annotation. NFC #20101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
14 changes: 4 additions & 10 deletions test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ def decorated(self, *args, **kwargs):

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


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

@requires_graphics_hardware
@requires_sync_compilation
@no_swiftshader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at all the other cubegeom_pre.c around this one.. they are all marked as @no_swiftshader. This particular one was never been run under swift shader before due to @requires_sync_compilation .. not that it is running, it fails, due to the swiftshader issue (I assume) so I added the same tag as the surrounding test.

def test_cubegeom_pre_relocatable(self):
self.btest('third_party/cubegeom/cubegeom_pre.c', reference='third_party/cubegeom/cubegeom_pre.png', args=['-sLEGACY_GL_EMULATION', '-lGL', '-lSDL', '-sRELOCATABLE'])

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

@requires_sync_compilation
def test_modularize(self):
for opts in [
[],
Expand Down Expand Up @@ -3602,7 +3600,6 @@ def test_webidl(self):
print(opts)
self.btest('webidl/test.cpp', '1', args=['--post-js', 'glue.js', '-I.', '-DBROWSER'] + opts)

@requires_sync_compilation
def test_dynamic_link(self):
create_file('main.c', r'''
#include <stdio.h>
Expand Down Expand Up @@ -3708,7 +3705,6 @@ def do_run(src, expected_output, emcc_args):
self._test_dylink_dso_needed(do_run)

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

@requires_threads
@requires_sync_compilation
def test_pthread_global_data_initialization_in_sync_compilation_mode(self):
mem_init_modes = [[], ['-sWASM=0', '--memory-init-file', '0'], ['-sWASM=0', '--memory-init-file', '1']]
for mem_init_mode in mem_init_modes:
Expand Down Expand Up @@ -4375,8 +4370,7 @@ def test_in_flight_memfile_request(self):
print('default html')
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+)

@requires_sync_compilation
def test_binaryen_async(self):
def test_async_compile(self):
# notice when we use async compilation
script = '''
<script>
Expand Down Expand Up @@ -4416,11 +4410,11 @@ def test_binaryen_async(self):
(['-O3', '-sWASM_ASYNC_COMPILATION=0'], 0),
]:
print(opts, returncode)
self.btest_exit('binaryen_async.c', assert_returncode=returncode, args=common_args + opts)
self.btest_exit('browser/test_async_compile.c', assert_returncode=returncode, args=common_args + opts)
# Ensure that compilation still works and is async without instantiateStreaming available
no_streaming = ' <script> WebAssembly.instantiateStreaming = undefined;</script>'
shell_with_script('shell.html', 'shell.html', no_streaming + script)
self.btest_exit('binaryen_async.c', assert_returncode=1, args=common_args)
self.btest_exit('browser/test_async_compile.c', assert_returncode=1, args=common_args)

# Test that implementing Module.instantiateWasm() callback works.
@parameterized({
Expand Down