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
21 changes: 21 additions & 0 deletions tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,27 @@ def metafunc(self, with_minimal_runtime):
return metafunc


def also_with_wasm_bigint(f):
assert callable(f)

def metafunc(self, with_bigint):
if with_bigint:
if not self.is_wasm():
self.skipTest('wasm2js does not support WASM_BIGINT')
if self.get_setting('WASM_BIGINT') is not None:
self.skipTest('redundant in bigint test config')
self.set_setting('WASM_BIGINT')
self.require_node()
self.node_args.append('--experimental-wasm-bigint')
f(self)
else:
f(self)

metafunc._parameterize = {'': (False,),
'bigint': (True,)}
return metafunc


def ensure_dir(dirname):
dirname = Path(dirname)
dirname.mkdir(parents=True, exist_ok=True)
Expand Down
23 changes: 1 addition & 22 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from tools import shared, building, config, webassembly
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, node_pthreads
from common import env_modify, with_env_modify, disabled, node_pthreads, also_with_wasm_bigint
from common import read_file, read_binary, require_v8, require_node
from common import NON_ZERO, WEBIDL_BINDER, EMBUILDER
import clang_native
Expand Down Expand Up @@ -68,27 +68,6 @@ def decorated(self):
return decorated


def also_with_wasm_bigint(f):
assert callable(f)

def metafunc(self, with_bigint):
if with_bigint:
if not self.is_wasm():
self.skipTest('wasm2js does not support WASM_BIGINT')
if self.get_setting('WASM_BIGINT') is not None:
self.skipTest('redundant in bigint test config')
self.set_setting('WASM_BIGINT')
self.require_node()
self.node_args.append('--experimental-wasm-bigint')
f(self)
else:
f(self)

metafunc._parameterize = {'': (False,),
'bigint': (True,)}
return metafunc


# without EMTEST_ALL_ENGINES set we only run tests in a single VM by
# default. in some tests we know that cross-VM differences may happen and
# so are worth testing, and they should be marked with this decorator
Expand Down
3 changes: 2 additions & 1 deletion tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from common import env_modify, no_mac, no_windows, requires_native_clang, with_env_modify
from common import create_file, parameterized, NON_ZERO, node_pthreads, TEST_ROOT, test_file
from common import compiler_for, read_file, read_binary, EMBUILDER, require_v8, require_node
from common import also_with_minimal_runtime
from common import also_with_minimal_runtime, also_with_wasm_bigint
from tools import shared, building, utils, deps_info, response_file
import common
import jsrun
Expand Down Expand Up @@ -11972,5 +11972,6 @@ def test_no_cfi(self):
err = self.expect_fail([EMCC, '-fsanitize=cfi', '-flto', test_file('hello_world.c')])
self.assertContained('emcc: error: emscripten does not currently support -fsanitize=cfi', err)

@also_with_wasm_bigint
def test_parseTools(self):
self.do_other_test('test_parseTools.c', emcc_args=['--js-library', test_file('other/test_parseTools.js')])