summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xauto_update_tests.py10
-rwxr-xr-xcheck.py16
-rwxr-xr-xscripts/emcc-tests.sh4
-rw-r--r--scripts/test/binaryenjs.py7
4 files changed, 26 insertions, 11 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py
index 107a5f178..5cfff9c0e 100755
--- a/auto_update_tests.py
+++ b/auto_update_tests.py
@@ -243,12 +243,18 @@ TEST_SUITES = OrderedDict([
def main():
+ all_suites = TEST_SUITES.keys()
+ skip_by_default = ['binaryenjs']
+
if shared.options.list_suites:
- for suite in TEST_SUITES.keys():
+ for suite in all_suites:
print(suite)
return 0
- for test in shared.requested or TEST_SUITES.keys():
+ if not shared.requested:
+ shared.requested = [s for s in all_suites if s not in skip_by_default]
+
+ for test in shared.requested:
TEST_SUITES[test]()
print('\n[ success! ]')
diff --git a/check.py b/check.py
index 083e6910d..770f483b5 100755
--- a/check.py
+++ b/check.py
@@ -365,17 +365,29 @@ TEST_SUITES = OrderedDict([
('gcc', run_gcc_tests),
('unit', run_unittest),
('binaryenjs', binaryenjs.test_binaryen_js),
+ ('binaryenjs_wasm', binaryenjs.test_binaryen_wasm),
])
# Run all the tests
def main():
+ all_suites = TEST_SUITES.keys()
+ skip_by_default = ['binaryenjs', 'binaryenjs_wasm']
+
if shared.options.list_suites:
- for suite in TEST_SUITES.keys():
+ for suite in all_suites:
print(suite)
return 0
- for test in shared.requested or TEST_SUITES.keys():
+ for r in shared.requested:
+ if r not in all_suites:
+ print('invalid test suite: %s (see --list-suites)\n' % r)
+ return 1
+
+ if not shared.requested:
+ shared.requested = [s for s in all_suites if s not in skip_by_default]
+
+ for test in shared.requested:
TEST_SUITES[test]()
# Check/display the results
diff --git a/scripts/emcc-tests.sh b/scripts/emcc-tests.sh
index bea5760e6..691d67fa6 100755
--- a/scripts/emcc-tests.sh
+++ b/scripts/emcc-tests.sh
@@ -6,11 +6,11 @@ echo "emcc-tests: build:wasm"
emcmake cmake -DCMAKE_BUILD_TYPE=Release
emmake make -j4 binaryen_wasm
echo "emcc-tests: test:wasm"
-python3 -m scripts.test.binaryenjs wasm
+./check.py binaryenjs_wasm
echo "emcc-tests: done:wasm"
echo "emcc-tests: build:js"
emmake make -j4 binaryen_js
echo "emcc-tests: test:js"
-python3 -m scripts.test.binaryenjs js
+./check.py binaryenjs
echo "emcc-tests: done:js"
diff --git a/scripts/test/binaryenjs.py b/scripts/test/binaryenjs.py
index 645c2501a..c5974145d 100644
--- a/scripts/test/binaryenjs.py
+++ b/scripts/test/binaryenjs.py
@@ -21,14 +21,11 @@ from . import support
def do_test_binaryen_js_with(which):
if not (shared.MOZJS or shared.NODEJS):
- print('no vm to run binaryen.js tests')
- return
+ shared.fail_with_error('no vm to run binaryen.js tests')
node_has_wasm = shared.NODEJS and support.node_has_webassembly(shared.NODEJS)
-
if not os.path.exists(which):
- print('no ' + which + ' build to test')
- return
+ shared.fail_with_error('no ' + which + ' build to test')
print('\n[ checking binaryen.js testcases (' + which + ')... ]\n')