Skip to content

Commit 06561ee

Browse files
authored
Run some more tests in browser64_4gb. NFC (#20816)
1 parent 7e7beb8 commit 06561ee

File tree

4 files changed

+38
-33
lines changed

4 files changed

+38
-33
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ jobs:
802802
test_targets: "
803803
browser64
804804
skip:browser64.test_4gb_fail
805+
browser64_4gb.test_async_*
805806
browser64_4gb.test_emscripten_log
806807
"
807808
test-browser-firefox:

test/common.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,37 @@ def decorated(f):
199199
return decorated
200200

201201

202+
def no_2gb(note):
203+
assert not callable(note)
204+
205+
def decorator(f):
206+
assert callable(f)
207+
208+
@wraps(f)
209+
def decorated(self, *args, **kwargs):
210+
# 2200mb is the value used by the core_2gb test mode
211+
if self.get_setting('INITIAL_MEMORY') == '2200mb':
212+
self.skipTest(note)
213+
f(self, *args, **kwargs)
214+
return decorated
215+
return decorator
216+
217+
218+
def no_4gb(note):
219+
assert not callable(note)
220+
221+
def decorator(f):
222+
assert callable(f)
223+
224+
@wraps(f)
225+
def decorated(self, *args, **kwargs):
226+
if self.get_setting('INITIAL_MEMORY') == '4200mb':
227+
self.skipTest(note)
228+
f(self, *args, **kwargs)
229+
return decorated
230+
return decorator
231+
232+
202233
def only_windows(note=''):
203234
assert not callable(note)
204235
if not WINDOWS:

test/test_browser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
from common import BrowserCore, RunnerCore, path_from_root, has_browser, EMTEST_BROWSER, Reporting
2525
from common import create_file, parameterized, ensure_dir, disabled, test_file, WEBIDL_BINDER
26-
from common import read_file, also_with_minimal_runtime, EMRUN, no_wasm64
26+
from common import read_file, also_with_minimal_runtime, EMRUN, no_wasm64, no_4gb
2727
from tools import shared
2828
from tools import ports
2929
from tools import utils
@@ -5559,6 +5559,7 @@ def test_wasm_worker_proxied_function(self):
55595559
self.btest('wasm_worker/proxied_function.c', expected='0', args=['--js-library', test_file('wasm_worker/proxied_function.js'), '-sWASM_WORKERS', '-sASSERTIONS=0'])
55605560

55615561
@no_firefox('no 4GB support yet')
5562+
@no_4gb('uses MAXIMUM_MEMORY')
55625563
def test_4gb(self):
55635564
# TODO Convert to an actual browser test when it reaches stable.
55645565
# For now, keep this in browser as this suite runs serially, which
@@ -5654,6 +5655,7 @@ def test_emmalloc_memgrowth(self, *args):
56545655
self.btest('emmalloc_memgrowth.cpp', expected='0', args=['-sMALLOC=emmalloc', '-sALLOW_MEMORY_GROWTH=1', '-sABORTING_MALLOC=0', '-sASSERTIONS=2', '-sMINIMAL_RUNTIME=1', '-sMAXIMUM_MEMORY=4GB'])
56555656

56565657
@no_firefox('no 4GB support yet')
5658+
@no_4gb('uses MAXIMUM_MEMORY')
56575659
def test_2gb_fail(self):
56585660
# TODO Convert to an actual browser test when it reaches stable.
56595661
# For now, keep this in browser as this suite runs serially, which
@@ -5667,6 +5669,7 @@ def test_2gb_fail(self):
56675669
self.do_run_in_out_file_test('browser/test_2GB_fail.cpp')
56685670

56695671
@no_firefox('no 4GB support yet')
5672+
@no_4gb('uses MAXIMUM_MEMORY')
56705673
def test_4gb_fail(self):
56715674
# TODO Convert to an actual browser test when it reaches stable.
56725675
# For now, keep this in browser as this suite runs serially, which

test/test_core.py

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
from common import RunnerCore, path_from_root, requires_native_clang, test_file, create_file
2828
from common import skip_if, needs_dylink, no_windows, no_mac, is_slow_test, parameterized
2929
from common import env_modify, with_env_modify, disabled, flaky, node_pthreads, also_with_wasm_bigint
30-
from common import read_file, read_binary, requires_v8, requires_node, requires_node_canary, compiler_for, crossplatform
30+
from common import read_file, read_binary, requires_v8, requires_node, requires_node_canary
31+
from common import compiler_for, crossplatform, no_4gb, no_2gb
3132
from common import with_both_sjlj, also_with_standalone_wasm, can_do_standalone, no_wasm64
3233
from common import NON_ZERO, WEBIDL_BINDER, EMBUILDER, PYTHON
3334
import clang_native
@@ -258,37 +259,6 @@ def decorated(self, *args, **kwargs):
258259
return decorator
259260

260261

261-
def no_4gb(note):
262-
assert not callable(note)
263-
264-
def decorator(f):
265-
assert callable(f)
266-
267-
@wraps(f)
268-
def decorated(self, *args, **kwargs):
269-
if self.get_setting('INITIAL_MEMORY') == '4200mb':
270-
self.skipTest(note)
271-
f(self, *args, **kwargs)
272-
return decorated
273-
return decorator
274-
275-
276-
def no_2gb(note):
277-
assert not callable(note)
278-
279-
def decorator(f):
280-
assert callable(f)
281-
282-
@wraps(f)
283-
def decorated(self, *args, **kwargs):
284-
# 2200mb is the value used by the core_2gb test mode
285-
if self.get_setting('INITIAL_MEMORY') == '2200mb':
286-
self.skipTest(note)
287-
f(self, *args, **kwargs)
288-
return decorated
289-
return decorator
290-
291-
292262
def no_ubsan(note):
293263
assert not callable(note)
294264

0 commit comments

Comments
 (0)