Skip to content

Commit 013f742

Browse files
authored
[test] Remove also_wasm2js btest argument. NFC (#21232)
This only have one user, and we have a cleaner mechanism for doing this these days in terms of the decorator.
1 parent a9ebfb7 commit 013f742

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

test/common.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,6 @@ def browser_open(cls, url):
19121912
@classmethod
19131913
def setUpClass(cls):
19141914
super().setUpClass()
1915-
cls.also_wasm2js = int(os.getenv('EMTEST_BROWSER_ALSO_WASM2JS', '0')) == 1
19161915
cls.port = int(os.getenv('EMTEST_BROWSER_PORT', '8888'))
19171916
if not has_browser() or EMTEST_BROWSER == 'node':
19181917
return
@@ -2156,7 +2155,7 @@ def btest_exit(self, filename, assert_returncode=0, *args, **kwargs):
21562155
def btest(self, filename, expected=None, reference=None,
21572156
reference_slack=0, manual_reference=None, post_build=None,
21582157
args=None, also_proxied=False,
2159-
url_suffix='', timeout=None, also_wasm2js=False,
2158+
url_suffix='', timeout=None,
21602159
manually_trigger_reftest=False, extra_tries=1,
21612160
reporting=Reporting.FULL,
21622161
output_basename='test'):
@@ -2197,13 +2196,6 @@ def btest(self, filename, expected=None, reference=None,
21972196
else:
21982197
self.run_browser(outfile + url_suffix, expected=['/report_result?' + e for e in expected], timeout=timeout, extra_tries=extra_tries)
21992198

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

test/test_browser.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ def decorated(self, *args, **kwargs):
116116
def also_with_wasm2js(f):
117117
assert callable(f)
118118

119-
def metafunc(self, with_wasm2js):
119+
def metafunc(self, with_wasm2js, *args, **kwargs):
120120
assert self.get_setting('WASM') is None
121121
if with_wasm2js:
122122
self.require_wasm2js()
123123
self.set_setting('WASM', 0)
124-
f(self)
124+
f(self, *args, **kwargs)
125125
else:
126-
f(self)
126+
f(self, *args, **kwargs)
127127

128128
metafunc._parameterize = {'': (False,),
129129
'wasm2js': (True,)}
@@ -4838,11 +4838,11 @@ def test_fetch_to_memory(self):
48384838
})
48394839
@no_firefox('https://github.com/emscripten-core/emscripten/issues/16868')
48404840
@requires_threads
4841+
@also_with_wasm2js
48414842
def test_fetch_from_thread(self, args):
48424843
shutil.copyfile(test_file('gears.png'), 'gears.png')
48434844
self.btest_exit('fetch/test_fetch_from_thread.cpp',
4844-
args=args + ['-pthread', '-sPROXY_TO_PTHREAD', '-sFETCH_DEBUG', '-sFETCH', '-DFILE_DOES_NOT_EXIST'],
4845-
also_wasm2js=True)
4845+
args=args + ['-pthread', '-sPROXY_TO_PTHREAD', '-sFETCH_DEBUG', '-sFETCH', '-DFILE_DOES_NOT_EXIST'])
48464846

48474847
@also_with_wasm2js
48484848
def test_fetch_to_indexdb(self):

0 commit comments

Comments
 (0)