Skip to content
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
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,7 @@ jobs:
test_targets: "
browser64
skip:browser64.test_4gb_fail
browser64_4gb.test_async_*
browser64_4gb.test_emscripten_log
"
test-browser-firefox:
Expand Down
31 changes: 31 additions & 0 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,37 @@ def decorated(f):
return decorated


def no_2gb(note):
assert not callable(note)

def decorator(f):
assert callable(f)

@wraps(f)
def decorated(self, *args, **kwargs):
# 2200mb is the value used by the core_2gb test mode
if self.get_setting('INITIAL_MEMORY') == '2200mb':
self.skipTest(note)
f(self, *args, **kwargs)
return decorated
return decorator


def no_4gb(note):
assert not callable(note)

def decorator(f):
assert callable(f)

@wraps(f)
def decorated(self, *args, **kwargs):
if self.get_setting('INITIAL_MEMORY') == '4200mb':
self.skipTest(note)
f(self, *args, **kwargs)
return decorated
return decorator


def only_windows(note=''):
assert not callable(note)
if not WINDOWS:
Expand Down
5 changes: 4 additions & 1 deletion test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

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

@no_firefox('no 4GB support yet')
@no_4gb('uses MAXIMUM_MEMORY')
def test_4gb(self):
# TODO Convert to an actual browser test when it reaches stable.
# For now, keep this in browser as this suite runs serially, which
Expand Down Expand Up @@ -5654,6 +5655,7 @@ def test_emmalloc_memgrowth(self, *args):
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'])

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

@no_firefox('no 4GB support yet')
@no_4gb('uses MAXIMUM_MEMORY')
def test_4gb_fail(self):
# TODO Convert to an actual browser test when it reaches stable.
# For now, keep this in browser as this suite runs serially, which
Expand Down
34 changes: 2 additions & 32 deletions test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
from common import RunnerCore, path_from_root, requires_native_clang, test_file, create_file
from common import skip_if, needs_dylink, no_windows, no_mac, is_slow_test, parameterized
from common import env_modify, with_env_modify, disabled, flaky, node_pthreads, also_with_wasm_bigint
from common import read_file, read_binary, requires_v8, requires_node, requires_node_canary, compiler_for, crossplatform
from common import read_file, read_binary, requires_v8, requires_node, requires_node_canary
from common import compiler_for, crossplatform, no_4gb, no_2gb
from common import with_both_sjlj, also_with_standalone_wasm, can_do_standalone, no_wasm64
from common import NON_ZERO, WEBIDL_BINDER, EMBUILDER, PYTHON
import clang_native
Expand Down Expand Up @@ -258,37 +259,6 @@ def decorated(self, *args, **kwargs):
return decorator


def no_4gb(note):
assert not callable(note)

def decorator(f):
assert callable(f)

@wraps(f)
def decorated(self, *args, **kwargs):
if self.get_setting('INITIAL_MEMORY') == '4200mb':
self.skipTest(note)
f(self, *args, **kwargs)
return decorated
return decorator


def no_2gb(note):
assert not callable(note)

def decorator(f):
assert callable(f)

@wraps(f)
def decorated(self, *args, **kwargs):
# 2200mb is the value used by the core_2gb test mode
if self.get_setting('INITIAL_MEMORY') == '2200mb':
self.skipTest(note)
f(self, *args, **kwargs)
return decorated
return decorator


def no_ubsan(note):
assert not callable(note)

Expand Down