Meta: Use extract_tar_path for WASM spec test generation

This commit is contained in:
kleines Filmröllchen 2023-01-09 23:52:22 +01:00 committed by Linus Groh
parent d3d93ef1df
commit 904a4dd314
Notes: sideshowbarker 2024-07-17 00:16:31 +09:00

View file

@ -25,12 +25,8 @@ if(INCLUDE_WASM_SPEC_TESTS)
if(EXISTS ${WASM_SPEC_TEST_GZ_PATH} AND NOT EXISTS ${WASM_SPEC_TEST_PATH}/const_0.wasm)
message(STATUS "Extracting the WebAssembly testsuite from ${WASM_SPEC_TEST_GZ_PATH}...")
extract_tar_path("${CMAKE_CURRENT_BINARY_DIR}" "${WASM_SPEC_TEST_GZ_PATH}" "testsuite-main/*.wast" "${WASM_SPEC_TEST_PATH}")
file(MAKE_DIRECTORY ${WASM_SPEC_TEST_PATH})
if (CMAKE_VERSION VERSION_LESS 3.18.0)
execute_process(COMMAND "${TAR_TOOL}" -xzf ${WASM_SPEC_TEST_GZ_PATH})
else()
file(ARCHIVE_EXTRACT INPUT ${WASM_SPEC_TEST_GZ_PATH} )
endif()
file(GLOB WASM_TESTS "${CMAKE_CURRENT_BINARY_DIR}/testsuite-main/*.wast")
foreach(PATH ${WASM_TESTS})
get_filename_component(NAME ${PATH} NAME_WLE)