1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:47:35 +00:00

LibWasm+Meta: Implement instantiation/execution primitives in test-wasm

This also optionally generates a test suite from the WebAssembly
testsuite, which can be enabled via passing `INCLUDE_WASM_SPEC_TESTS`
to cmake, which will generate test-wasm-compatible tests and the
required fixtures.
The generated directories are excluded from git since there's no point
in committing them.
This commit is contained in:
Ali Mohammad Pur 2021-05-07 10:02:58 +04:30 committed by Linus Groh
parent 541091500c
commit 24b2a6c93a
5 changed files with 396 additions and 7 deletions

View file

@ -267,11 +267,9 @@ if(INCLUDE_WASM_SPEC_TESTS)
file(GLOB WASM_TESTS "${CMAKE_BINARY_DIR}/testsuite-master/*.wast")
foreach(PATH ${WASM_TESTS})
get_filename_component(NAME ${PATH} NAME_WLE)
message(STATUS "Compiling WebAssembly test ${NAME}...")
message(STATUS "Generating test cases for WebAssembly test ${NAME}...")
execute_process(
COMMAND wasm-as -n ${PATH} -o "${WASM_SPEC_TEST_PATH}/${NAME}.wasm"
OUTPUT_QUIET
ERROR_QUIET)
COMMAND bash ${CMAKE_SOURCE_DIR}/Meta/generate-libwasm-spec-test.sh "${PATH}" "${CMAKE_SOURCE_DIR}/Userland/Libraries/LibWasm/Tests/Spec" "${NAME}" "${WASM_SPEC_TEST_PATH}")
endforeach()
file(REMOVE testsuite-master)
endif()