Files
rasp/run_asm_tests.sh

26 lines
470 B
Bash
Raw Normal View History

#!/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