1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 02:47:32 +00:00
serenity/Meta/generate-libwasm-spec-test.sh
Ali Mohammad Pur 0e4431af33 Meta: Run the Wasm spec tests in CI
Since LibWasm is still not capable of passing all of the spec tests,
ignore failing tests, only fail the build if some segfault/abort/etc
occurs.
2021-05-27 17:28:41 +04:30

22 lines
494 B
Bash

#!/usr/bin/env bash
if [ $# -ne 4 ]; then
echo "Usage: $0 <input spec file> <output path> <name> <module output path>"
exit 1
fi
INPUT_FILE="$1"
OUTPUT_PATH="$2"
NAME="$3"
MODULE_OUTPUT_PATH="$4"
mkdir -p "$OUTPUT_PATH"
mkdir -p "$MODULE_OUTPUT_PATH"
python3 "$(dirname "$0")/generate-libwasm-spec-test.py" "$INPUT_FILE" "$NAME" "$MODULE_OUTPUT_PATH" |\
if $SKIP_PRETTIER; then
cat
else
prettier --stdin-filepath "test-$NAME.js"
fi > "$OUTPUT_PATH/$NAME.js"