Add some integration tests and runner
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
25
run_asm_tests.sh
Executable file
25
run_asm_tests.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
here="$(dirname "$0")"
|
||||
cd "$here"
|
||||
|
||||
tests="./tests"
|
||||
|
||||
RED="\e[31m"
|
||||
GREEN="\e[32m"
|
||||
RESET="\e[0m"
|
||||
|
||||
# Build project
|
||||
cargo build
|
||||
|
||||
find "$tests" -type f -name '*.asm' | \
|
||||
while read fname; do
|
||||
test_name="$(basename "${fname%.asm}")"
|
||||
printf "%s ... " "$test_name"
|
||||
cargo run --quiet "$fname"
|
||||
exit_code="$?"
|
||||
if (( "$exit_code" == 0 )); then
|
||||
echo -e "${GREEN}OK${RESET}"
|
||||
else
|
||||
echo -e "${RED}FAIL${RESET} ($exit_code)"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user