diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c741f2e32d62..04bbebde4c6f6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -591,6 +591,7 @@ jobs: other.test_node_emscripten_num_logical_cores core2.test_pthread_create core2.test_i64_invoke_bigint + core2.test_sse2 core2.test_source_map core2.test_exceptions_wasm core2.test_pthread_unhandledrejection" @@ -630,6 +631,7 @@ jobs: EMTEST_SKIP_V8: "1" EMTEST_SKIP_EH: "1" EMTEST_SKIP_WASM64: "1" + EMTEST_SKIP_SIMD: "1" steps: - checkout - run: @@ -701,6 +703,7 @@ jobs: EMTEST_SKIP_V8: "1" EMTEST_SKIP_EH: "1" EMTEST_SKIP_WASM64: "1" + EMTEST_SKIP_SIMD: "1" EMCC_SKIP_SANITY_CHECK: "1" steps: - run: diff --git a/test/common.py b/test/common.py index 1f0a43e9d4d98..8eda93c948fd0 100644 --- a/test/common.py +++ b/test/common.py @@ -491,6 +491,23 @@ def require_wasm64(self): else: self.fail('either d8 or node >= 16 required to run wasm64 tests. Use EMTEST_SKIP_WASM64 to skip') + def require_simd(self): + if config.NODE_JS and config.NODE_JS in self.js_engines: + version = shared.check_node_version() + if version >= (16, 0, 0): + self.js_engines = [config.NODE_JS] + return + + if config.V8_ENGINE and config.V8_ENGINE in self.js_engines: + self.emcc_args.append('-sENVIRONMENT=shell') + self.js_engines = [config.V8_ENGINE] + return + + if 'EMTEST_SKIP_SIMD' in os.environ: + self.skipTest('test requires node >= 16 or d8 (and EMTEST_SKIP_SIMD is set)') + else: + self.fail('either d8 or node >= 16 required to run wasm64 tests. Use EMTEST_SKIP_SIMD to skip') + def require_wasm_eh(self): if config.NODE_JS and config.NODE_JS in self.js_engines: version = shared.check_node_version() diff --git a/test/test_core.py b/test/test_core.py index 76a6f82d38f3c..afbd0cdbda481 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -39,7 +39,7 @@ def wasm_simd(f): @wraps(f) def decorated(self, *args, **kwargs): - self.require_v8() + self.require_simd() if self.get_setting('MEMORY64') == 2: self.skipTest('https://github.com/WebAssembly/binaryen/issues/4638') if not self.is_wasm(): diff --git a/tools/shared.py b/tools/shared.py index 79ae2928b32de..b1780587347de 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -94,6 +94,8 @@ def shlex_quote(arg): # Switch to shlex.join once we can depend on python 3.8: # https://docs.python.org/3/library/shlex.html#shlex.join def shlex_join(cmd): + if type(cmd) is str: + return cmd return ' '.join(shlex_quote(x) for x in cmd)