summaryrefslogtreecommitdiff
path: root/scripts/test/wasm_opt.py
Commit message (Collapse)AuthorAgeFilesLines
* [test] Port tests in test/ to test/lit/basic/ (#6160)Heejin Ahn2023-12-131-58/+3
| | | | | | | | | | | | | | | | | | | | | This ports all tests from `test/` to `test/lit/basic/`. The set of commands and `CHECK` lines used are the same as the ones in #6159. Now we use `lit` to test these, this also deletes all `.wast`, `.wast.from-wast`, `.wast.fromBinary`, and `.wast.fromBinary.noDebugInfo` files from `test/` and all related test routines from the python scripts. All `CHECK` lines are generated by `update_lit_checks.py --all-items`. This also deletes these three multi-memory tests in `test/lit/`, because they seem to contain the same code with the ones in `test/`, which have been ported to `test/lit/basic/` along with other tests. - `test/lit/multi-memories-atomics64.wast` - `test/lit/multi-memories-basics.wast` - `test/lit/multi-memories-simd.wast` This also adds newlines between `(func`s in case there are none to make `CHECK` lines easy to view, and removes some extra existing newlines here and there.
* [test] Remove asm2wasm tests from scripts (#6162)Heejin Ahn2023-12-111-21/+0
| | | | We don't have `*.fromasm` files anymore. Also `BIN_DIR` and `WATERFALL_BUILD_DIR` variables don't seem to be used as well.
* Remove various testing spam (#6109)Alon Zakai2023-11-141-4/+4
| | | | | Avoid some common warnings and stop printing various stdout/stderr stuff. Helps #6104
* Add feature options to wasm-dis (#3548)Abbas Mashayekh2021-02-081-1/+1
| | | | | | This will allow .fromBinary tests be executed with the desired featurs so there will be no difference between those tests and .from-wast tests. Fixes #3545
* Warn when running a pass not compatible with DWARF (#3506)Alon Zakai2021-01-261-1/+2
| | | | | | | | | | | | Previously the addDefault* methods would avoid adding opt passes that we know are incompatible with DWARF. However, that didn't handle the case of passes that are added in other ways. For example, when running Asyncify, emcc will run --flatten before, and that pass is not compatible with DWARF. This PR lets us warn on that by annotating the passes themselves. Then we use those annotation to either not run a pass at all (matching the previous behavior) or to show a warning when necessary. Fixes emscripten-core/emscripten#13288 . That is, concretely after this PR running asyncify + DWARF will show a warning to the user.
* [TypedFunctionReferences] Enable call_ref in fuzzer, and fix minor misc fuzz ↵Alon Zakai2020-11-251-2/+4
| | | | | | | | | | | | | | | | | | | | bugs (#3401) * Count signatures in tuple locals. * Count nested signature types (confirming @aheejin was right, that was missing). * Inlining was using the wrong type. * OptimizeInstructions should return -1 for unhandled types, not error. * The fuzzer should check for ref types as well, not just typed function references, similar to what GC does. * The fuzzer now creates a function if it has no other option for creating a constant expression of a function type, then does a ref.func of that. * Handle unreachability in call_ref binary reading. * S-expression parsing fixes in more places, and add a tiny fuzzer for it. * Switch fuzzer test to just have the metrics, and not print all the fuzz output which changes a lot. Also fix noprint handling which only worked on binaries before. * Fix Properties::getLiteral() to use the specific function type properly, and make Literal's function constructor require that, to prevent future bugs. * Turn all input types into nullable types, for now.
* Improve testing on Windows (#3142)Wouter van Oortmerssen2020-09-171-0/+6
| | | | | | This PR contains: - Changes that enable/disable tests on Windows to allow for better local testing. - Also changes many abort() into Fatal() when it is really just exiting on error. This is because abort() generates a dialog window on Windows which is not great in automated scripts. - Improvements to CMake to better work with the project in IDEs (VS).
* Harmonize auto updater with test runner: wasm-opt should update .fromBinary ↵Alon Zakai2020-08-201-0/+26
| | | | | | | outputs (#3066) It was confusing that you had to run ./auto_update_tests.py binfmt to update a test checked by ./check.py wasm-opt. Instead, make ./auto_update_tests.py wasm-opt update those, so it's symmetrical.
* Skip tests that fail on windows and enable all the rest (#3035)Alon Zakai2020-08-111-0/+6
| | | | | | | | | | | | | | 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).
* Factor out wasm_opt testing. NFC. (#2737)Sam Clegg2020-04-091-0/+200
Also, factor out auto-updating of binaryenjs testing so it lives alongside the actual test code.