summaryrefslogtreecommitdiff
path: root/test/find_exe.py
Commit message (Collapse)AuthorAgeFilesLines
* Rename wasm-opcodecnt to wasm-stats (#2298)Soni L2023-09-191-3/+3
|
* Remove support for python2 (#1321)Sam Clegg2020-01-311-1/+1
|
* Avoid os.path.relpath in gen-spec-js.py (#1246)Sam Clegg2019-11-211-3/+0
| | | | | | | | | relpath here was failing with on windows when TMPDIR is on a different drive. This is because `new_module_filename` lives in the TMPDIR where and json_dir might be on different drive. These paths don't get embedded in the final JS anyway because we embed them directly binary strings so its not important that they are relative.
* wasm-decompile: Added initial tests. (#1195)Wouter van Oortmerssen2019-10-241-1/+5
| | | These are pretty minimal, more will be added as part of feature-PRs.
* Switch python indentation from 2-space to 4-space (#1145)Sam Clegg2019-08-151-32/+32
| | | | | | | | pep8 specifies 4 space indentation. The use of 2 spaces is, I believe, a historical anomaly where certain large organizations such as google chose 2 over 4 and have yet to make the switch. For a project like wabt with little python code I think the cost of switching is small enough to justify the churn.
* Add wasm-strip tool to strip custom sections (#902)Ben Smith2018-08-271-1/+5
| | | | | | There's a lot more that this tool could do, but even this is helpful for now. Fixes issue #631.
* Remove wasm-link tool (#793)Sam Clegg2018-03-051-6/+2
| | | | | | This is been superseded by lld and we no longer have the bandwidth to maintain a separate linker.
* Replace `run-gen-spec-js.py` with `RUN` commands (#741)Ben Smith2018-01-261-0/+1
| | | | | This does remove some functionality (the ability to run directly with a specified JS-engine), but it wasn't actually tested anywhere. IMO, it's better to just remove for simplicity's sake.
* Remove `run-objdump.py`; replace with `RUN` cmds (#732)Ben Smith2018-01-241-0/+2
| | | | | | | | | | | | | | | | * Remove `run-objdump.py`; replace with `RUN` cmds This CL introduces two new TOOLs for tests: * `run-objdump-gen-wasm`: Run objdump on wasm files generated by `gen-wasm.py`. * `run-objdump-spec`: Run objdump on wasm files generated by `wast2json`. For now, this requires each test to specify the files manually: `%(temp_file)s.0.wasm %(temp_file)s.1.wasm` etc. `gen_wasm_py` has been added as a new RUN variable as well. * Call FixPythonExecutable after expanding variables
* Add wasm2c tool (#710)Ben Smith2018-01-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add `wasm2c`, a new tool that reads a `.wasm` file and generates a C source file and its accompanying header file. The C output currently only supports gcc/clang compilers, since it uses builtins for some functionality. The resulting C code is not standalone; there are runtime functions that must be provided, as well as pointers to all imports. The C runtime symbols that must be provided are as follows: * `void wasm_rt_trap(wasm_rt_trap_t code)`: Called when the WebAssembly code traps. This function must not return. * `u32 wasm_rt_register_func_type(u32 param_count, u32 result_count, ...)`: Register a function type with the given signature. This function must check whether this signature has already been registered and return the original index. * `void wasm_rt_allocate_memory(wasm_rt_memory_t*, u32 initial, u32 max)`: Allocate the memory buffer for the given memory object, given the number of pages. The memory must be zeroed before returning. * `u32 wasm_rt_grow_memory(wasm_rt_memory_t*, u32 delta)`: Grow memory by the given number of pages. If allocation fails, or the new pages size is larger than the maximum, return -1. Otherwise return the previous number of pages. The newly allocated memory must be zeroed. * `void wasm_rt_allocate_table(wasm_rt_table_t*, u32 initial, u32 max)`: Allocate the buffer for the given table object. The buffer must be zeroed before returning. * `u32 wasm_rt_call_stack_depth`: A symbol that tracks the current call stack depth. If this value exceeds `WASM_RT_MAX_CALL_STACK_DEPTH` then a trap occurs. This value defaults to 500, but can redefined. An example implementation can be found in `spec-wasm2c-prefix.c`. All functionality from the WebAssembly MVP is supported, and the generated code passes all of the core spec tests. There is a new test tool called `run-spec-wasm2c.py` which runs the following: * `wast2json` to convert the spec test to json and wasm files * `wasm2c` to convert the wasm to C source and headers * a C compiler (default `cc`) to compile and link all C source files, including a C test runner (`spec-wasm2c-prefix.c`) * Finally, the resulting executable to produce output
* Add wasm-validate tool (#664)Ben Smith2017-10-311-0/+5
| | | | It's currently identical to wasm2wat, without the part to write out a .wat file.
* Add spectest-interp tool; split from wasm-interp (#643)Ben Smith2017-10-031-1/+5
| | | | | | * `wasm-interp` tool now only runs `.wasm` file, not spec tests * `wasm-interp` has a new flag `--host-print` for importing a print function named "host.print" * `spectest-interp` tool runs only `.json` files
* Rename `wast-desugar` to `wat-desugar`. (#642)Ben Smith2017-09-281-3/+3
|
* Rename wast2wasm -> wat2wasm, wast2json (#617)Ben Smith2017-09-081-4/+8
| | | | * wat2wasm only parses wat files (individual modules) * wast2json parses spec test files and generates json + wasm
* Rename wasm2wast -> wasm2wat (#616)Ben Smith2017-09-081-3/+3
| | | See issue #543.
* Change default tools path from 'out' to 'bin' (#456)Sam Clegg2017-05-251-1/+1
| | | This is where 'make install' will put stuff by default.
* Rename wasmdump to wasm-objdump (#455)Sam Clegg2017-05-251-3/+3
| | | | This is more consistent with how llvm and binutils name such tools.
* Add support for yapf python formatting tool (#276)Sam Clegg2017-01-181-3/+3
| | | | | | | | | | | | | | * Add support for yapf python formatting tool This changs adds .style.yapf to define the python style we are using. I also ran yapf over all the python files: $ yapf -i `git ls-files *.py` Going forward, we should probably add a travis test to prevent regressions. We should probably also switch to more conventional 4-space indentation, which is used by almost everybody outside of Google.
* Pass --bindir to test helpers rather than full path to each tool (#273)Sam Clegg2017-01-121-1/+7
| | | This simplifies the invocations and aids maintainability.
* Add support for linkable modules (#228)Sam Clegg2017-01-111-1/+5
| | | | | | | | | | | | | | This change adds support for writing wasm modules such that they are compatible with the proposed linking spec: https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md Basically this means that wast2wasm will generate and extra 'reloc' sections and will pad any LEBs in the code section that might require relocation. This mode is activated by passing the -r flag to wast2wasm. Also, start work on wasm-link which should be able to link such modules together.
* wast-desugar: reformats and desugars a wast fileBen Smith2016-10-191-16/+22
|
* Add wasmdump binary for inspecting wasm files (#161)Sam Clegg2016-10-121-0/+5
| | | | | | * Add wasmdump binary for inspecting wasm files Run this tool to as part of the 'dump' tests rather than using the -d flag to wast2wasm.
* Add wasmopcodecnt testsBen Smith2016-10-101-2/+9
| | | | | Also rename the last few places using SexprWasm, WasmWast. Make formatting a little nicer too.
* Fix broken 'run-tests' target (#104)Sam Clegg2016-09-221-6/+6
| | | | | | | | This is followup to (#102) which renamed the executable files. It propagated the rename the tools and test runner. It also fixes the 'run-tests' target which was passing the wrong argument name to the run_tests.py script.
* remove JavaScript engine testing (#89)Ben Smith2016-06-171-17/+0
| | | | | It's not really the appropriate place to handle it. Now that we have wasm-wast and wasm-interp, we can at least verify that the tools are internally consistent.
* Fix Windows (#86)Michael Ferris2016-06-171-0/+2
| | | | | | | | | | | | | | | | | | | | * Fix build on Windows Changed stderr and stdout to binary mode on Windows. This avoids printing \r\r\n which causes tests to fail Make sure not to print backward slash in .json file * Explicitly pass the program name to print usage instead of getting it from argv. The format was too different between Linux and Windows (forward slash vs backward slash && .exe at the on Windows). This was failing a lot of baseline checks in the test suite. * Read wast file as binary instead of text mode. Buffer offset to file offset is unreliable in text mode. Added support for carriage return when searching for line offset * Test tools, search binary using .exe on Windows Account for backward slash in spec.js * Fix diffing file by ignoring endline (this is too unstable between Windows and other platforms) * CR Fixes
* Teach test scripts about ch.exe (#87)Michael Ferris2016-06-081-1/+3
|
* update run-tests.py/other scripts for SM supportBen Smith2016-05-101-2/+8
|
* wasm interpreterBen Smith2016-04-021-0/+6
| | | | Works by generating an instruction stream for a simple stack machine.
* add roundtrip test to run-testsBen Smith2016-03-211-0/+7
|
* nicer overriding of various executables w/ testingBen Smith2016-03-211-0/+58
* run-tests.py now takes a `--d8-executable` flag * Added a `TOOL` directive to tests to reduce boilerplate * Change all tests to use the new `TOOL` directive * Factor out executable searching with fallback to find_exe.py This fixes issue #43.