-
Notifications
You must be signed in to change notification settings - Fork 3
/
test.sh
executable file
·34 lines (29 loc) · 937 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
set -e
WASMINNA_PATH=$(dirname "$0")
if [ -z "$WASM_SPEC_PATH" ]; then
WASM_SPEC_PATH="$WASMINNA_PATH"/../spec
printf "\e[33mno WASM_SPEC_PATH set, guessing %s\e[0m\n" "$WASM_SPEC_PATH"
fi
for test in s_expression_parser_test float_test preprocessor_test execute_function_test
do
file=$test.rb
printf "\e[1m%s\e[0m: " "$(basename "$file")"
ruby -I"$WASMINNA_PATH"/lib "$WASMINNA_PATH"/test/$file
done
for file in "$WASM_SPEC_PATH"/test/core/*.wast
do
printf "\e[1m%s\e[0m: " "$(basename "$file")"
ruby -I"$WASMINNA_PATH"/lib "$WASMINNA_PATH"/run_wast.rb "$file"
done
for pending in
do
file=$pending.wast
printf "\e[1m%s\e[0m (pending): " "$(basename "$file")"
if ruby -I"$WASMINNA_PATH"/lib "$WASMINNA_PATH"/run_wast.rb "$WASM_SPEC_PATH"/test/core/"$file"; then
printf "\e[31merror: pending test passed\e[0m\n"
exit 1
else
printf "\e[32mpending test failed successfully\e[0m\n"
fi
done