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 @@ -1059,6 +1059,7 @@ jobs:
other.test_min_node_version
other.test_node_emscripten_num_logical_cores
other.test_js_base64_api
other.test_pthread_growth*
core2.test_hello_world
core2.test_pthread_create
core2.test_i64_invoke_bigint
Expand Down
11 changes: 11 additions & 0 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,17 @@ def require_node_25(self):
self.skipTest('test requires node v25 and current Node.js version is older than this, with EMTEST_AUTOSKIP being set')
self.fail('node v25 required to run this test. Use EMTEST_SKIP_NODE_25 to skip')

def require_node_26(self):
if 'EMTEST_SKIP_NODE_26' in os.environ or 'EMTEST_SKIP_NODE_25' in os.environ:
self.skipTest('test requires node v26 and EMTEST_SKIP_NODE_25/EMTEST_SKIP_NODE_26 is set')
nodejs = get_nodejs()
if not nodejs:
self.skipTest('Test requires nodejs to run')
if not self.try_require_node_version(26, 0, 0):
if utils.get_env_bool('EMTEST_AUTOSKIP'):
self.skipTest('test requires node v26 and current Node.js version is older than this, with EMTEST_AUTOSKIP being set')
self.fail('node v26 required to run this test. Use EMTEST_SKIP_NODE_25/EMTEST_SKIP_NODE_26 to skip')

def require_engine(self, engine, force=False):
logger.debug(f'require_engine: {engine}')
if not force and self.required_engine and self.required_engine != engine:
Expand Down
11 changes: 11 additions & 0 deletions test/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,17 @@ def decorated(self, *args, **kwargs):
return decorated


def requires_node_26(func):
assert callable(func)

@wraps(func)
def decorated(self, *args, **kwargs):
self.require_node_26()
return func(self, *args, **kwargs)

return decorated


# Used to mark dependencies in various tests to npm developer dependency
# packages, which might not be installed on Emscripten end users' systems.
def requires_dev_dependency(package):
Expand Down
10 changes: 4 additions & 6 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
requires_network,
requires_node,
requires_node_25,
requires_node_26,
requires_pthreads,
requires_v8,
requires_wasm64,
Expand Down Expand Up @@ -13104,8 +13105,7 @@ def test_pthread_sigmask(self, args):
})
def test_pthread_growth_mainthread(self, cflags):
if '-sGROWABLE_ARRAYBUFFERS' in cflags:
self.node_args.append('--experimental-wasm-rab-integration')
self.require_node_25()
self.require_node_26()
else:
self.cflags.append('-Wno-pthreads-mem-growth')
self.do_runf('pthread/test_pthread_memory_growth_mainthread.c', cflags=['-pthread', '-sALLOW_MEMORY_GROWTH', '-sINITIAL_MEMORY=32MB', '-sMAXIMUM_MEMORY=256MB'] + cflags)
Expand All @@ -13114,9 +13114,8 @@ def test_pthread_growth_mainthread(self, cflags):
def test_pthread_join_interrupted(self):
self.do_runf('pthread/test_pthread_join_interrupted.c', cflags=['-pthread'])

@requires_node_25
@requires_node_26
def test_growable_arraybuffers(self):
self.node_args.append('--experimental-wasm-rab-integration')
self.do_runf('hello_world.c',
cflags=['-O2', '-pthread', '-sALLOW_MEMORY_GROWTH', '-sGROWABLE_ARRAYBUFFERS', '-Wno-experimental'],
output_basename='growable')
Expand Down Expand Up @@ -13144,8 +13143,7 @@ def test_pthread_growth(self, cflags):
self.require_node_25()

if '-sGROWABLE_ARRAYBUFFERS' in cflags:
self.node_args.append('--experimental-wasm-rab-integration')
self.require_node_25()
self.require_node_26()
else:
self.cflags.append('-Wno-pthreads-mem-growth')
self.do_runf('pthread/test_pthread_memory_growth.c', cflags=['-pthread', '-sALLOW_MEMORY_GROWTH', '-sINITIAL_MEMORY=32MB', '-sMAXIMUM_MEMORY=256MB'] + cflags)
Expand Down
5 changes: 1 addition & 4 deletions tools/feature_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,7 @@ class Feature(IntEnum):
'chrome': 144,
'firefox': 145,
'safari': 260200,
# Supported with flag --experimental-wasm-rab-integration (TODO: Change
# this to unflagged version of Node.js 260000, see also the comment in
# Feature.WASM_EXCEPTIONS above)
'node': 240000,
Comment thread
sbc100 marked this conversation as resolved.
'node': 260000,
},

# The following features we now support unconditionally, but keeping them around
Expand Down
Loading