Skip to content

[test] Remove also_wasm2js btest argument. NFC #21232

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
Feb 1, 2024
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
10 changes: 1 addition & 9 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,6 @@ def browser_open(cls, url):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.also_wasm2js = int(os.getenv('EMTEST_BROWSER_ALSO_WASM2JS', '0')) == 1
cls.port = int(os.getenv('EMTEST_BROWSER_PORT', '8888'))
if not has_browser() or EMTEST_BROWSER == 'node':
return
Expand Down Expand Up @@ -2156,7 +2155,7 @@ def btest_exit(self, filename, assert_returncode=0, *args, **kwargs):
def btest(self, filename, expected=None, reference=None,
reference_slack=0, manual_reference=None, post_build=None,
args=None, also_proxied=False,
url_suffix='', timeout=None, also_wasm2js=False,
url_suffix='', timeout=None,
manually_trigger_reftest=False, extra_tries=1,
reporting=Reporting.FULL,
output_basename='test'):
Expand Down Expand Up @@ -2197,13 +2196,6 @@ def btest(self, filename, expected=None, reference=None,
else:
self.run_browser(outfile + url_suffix, expected=['/report_result?' + e for e in expected], timeout=timeout, extra_tries=extra_tries)

# Tests can opt into being run under wasmj2s as well
# Ignore this under MEMORY64 where wasm2js is not yet supported.
if 'WASM=0' not in original_args and (also_wasm2js or self.also_wasm2js) and not self.is_wasm64():
print('WASM=0')
self.btest(filename, expected, reference, reference_slack, manual_reference, post_build,
original_args + ['-sWASM=0'], also_proxied=False, timeout=timeout)

if also_proxied:
print('proxied...')
if reference:
Expand Down
10 changes: 5 additions & 5 deletions test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ def decorated(self, *args, **kwargs):
def also_with_wasm2js(f):
assert callable(f)

def metafunc(self, with_wasm2js):
def metafunc(self, with_wasm2js, *args, **kwargs):
assert self.get_setting('WASM') is None
if with_wasm2js:
self.require_wasm2js()
self.set_setting('WASM', 0)
f(self)
f(self, *args, **kwargs)
else:
f(self)
f(self, *args, **kwargs)

metafunc._parameterize = {'': (False,),
'wasm2js': (True,)}
Expand Down Expand Up @@ -4838,11 +4838,11 @@ def test_fetch_to_memory(self):
})
@no_firefox('https://github.com/emscripten-core/emscripten/issues/16868')
@requires_threads
@also_with_wasm2js
def test_fetch_from_thread(self, args):
shutil.copyfile(test_file('gears.png'), 'gears.png')
self.btest_exit('fetch/test_fetch_from_thread.cpp',
args=args + ['-pthread', '-sPROXY_TO_PTHREAD', '-sFETCH_DEBUG', '-sFETCH', '-DFILE_DOES_NOT_EXIST'],
also_wasm2js=True)
args=args + ['-pthread', '-sPROXY_TO_PTHREAD', '-sFETCH_DEBUG', '-sFETCH', '-DFILE_DOES_NOT_EXIST'])

@also_with_wasm2js
def test_fetch_to_indexdb(self):
Expand Down