diff options
author | Alon Zakai <azakai@google.com> | 2020-08-11 10:31:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 10:31:51 -0700 |
commit | f067a45c1e88124173af992e66a7125fe6ab366a (patch) | |
tree | 769d3079cb03a59b5c6689dd1879db404fb61551 /scripts/test | |
parent | 454a1cb0b90397593472b9dd31c5418e23c40be3 (diff) | |
download | binaryen-f067a45c1e88124173af992e66a7125fe6ab366a.tar.gz binaryen-f067a45c1e88124173af992e66a7125fe6ab366a.tar.bz2 binaryen-f067a45c1e88124173af992e66a7125fe6ab366a.zip |
Skip tests that fail on windows and enable all the rest (#3035)
This lets us run most tests at least on that platform.
Add a new function for skipping those tests, skip_if_on_windows,
so that it's easy to find which tests are disabled on windows for later fixing
efforts.
This fixes a few minor issues for windows, like comparisons
should ignore \r in some cases.
Rename all passes tests that use --dwarfdump to contain "dwarf"
in their name, which makes it easy to skip those (and is clearer
anyhow).
Diffstat (limited to 'scripts/test')
-rw-r--r-- | scripts/test/shared.py | 16 | ||||
-rw-r--r-- | scripts/test/wasm2js.py | 2 | ||||
-rw-r--r-- | scripts/test/wasm_opt.py | 6 |
3 files changed, 21 insertions, 3 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py index d677c33a6..b0cd72d17 100644 --- a/scripts/test/shared.py +++ b/scripts/test/shared.py @@ -376,13 +376,13 @@ else: # 11/27/2019: We updated the spec test suite to upstream spec repo. For some # files that started failing after this update, we added the new files to this -# blacklist and preserved old ones by renaming them to 'old_[FILENAME].wast' +# skip-list and preserved old ones by renaming them to 'old_[FILENAME].wast' # not to lose coverage. When the cause of the error is fixed or the unsupported # construct gets support so the new test passes, we can delete the # corresponding 'old_[FILENAME].wast' file. When you fix the new file and # delete the old file, make sure you rename the corresponding .wast.log file in # expected-output/ if any. -SPEC_TEST_BLACKLIST = [ +SPEC_TESTS_TO_SKIP = [ # Stacky code / notation 'block.wast', 'call.wast', @@ -437,7 +437,7 @@ SPEC_TEST_BLACKLIST = [ 'unreached-invalid.wast' # 'assert_invalid' failure ] options.spec_tests = [t for t in options.spec_tests if os.path.basename(t) not - in SPEC_TEST_BLACKLIST] + in SPEC_TESTS_TO_SKIP] # check utilities @@ -507,3 +507,13 @@ def with_pass_debug(check): else: if 'BINARYEN_PASS_DEBUG' in os.environ: del os.environ['BINARYEN_PASS_DEBUG'] + + +# checks if we are on windows, and if so logs out that a test is being skipped, +# and returns True. This is a central location for all test skipping on +# windows, so that we can easily find which tests are skipped. +def skip_if_on_windows(name): + if get_platform() == 'windows': + print('skipping test "%s" on windows' % name) + return True + return False diff --git a/scripts/test/wasm2js.py b/scripts/test/wasm2js.py index 3ccf3c9dc..5ae146d19 100644 --- a/scripts/test/wasm2js.py +++ b/scripts/test/wasm2js.py @@ -121,6 +121,8 @@ def test_asserts_output(): def test_wasm2js(): print('\n[ checking wasm2js testcases... ]\n') + if shared.skip_if_on_windows('wasm2js'): + return test_wasm2js_output() test_asserts_output() diff --git a/scripts/test/wasm_opt.py b/scripts/test/wasm_opt.py index 8c6bbdec5..986ce2f61 100644 --- a/scripts/test/wasm_opt.py +++ b/scripts/test/wasm_opt.py @@ -45,6 +45,12 @@ def test_wasm_opt(): for t in shared.get_tests(shared.get_test_dir('passes'), ['.wast', '.wasm']): print('..', os.path.basename(t)) + # windows has some failures that need to be investigated: + # * ttf tests have different outputs - order of execution of params? + # * dwarf tests print windows slashes instead of unix + if ('translate-to-fuzz' in t or 'dwarf' in t) and \ + shared.skip_if_on_windows('fuzz translation tests'): + continue binary = '.wasm' in t base = os.path.basename(t).replace('.wast', '').replace('.wasm', '') passname = base |