diff options
Diffstat (limited to 'tools/asm-processor/run-tests.sh')
| -rwxr-xr-x | tools/asm-processor/run-tests.sh | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/tools/asm-processor/run-tests.sh b/tools/asm-processor/run-tests.sh index 5cae0a7..0448ffb 100755 --- a/tools/asm-processor/run-tests.sh +++ b/tools/asm-processor/run-tests.sh @@ -1,6 +1,23 @@ #!/usr/bin/env bash -for A in tests/*.c tests/*.p; do - OBJDUMPFLAGS=-srt - echo $A - ./compile-test.sh "$A" && mips-linux-gnu-objdump $OBJDUMPFLAGS "${A%.*}.o" | diff - "${A%.*}.objdump" || echo FAIL "$A" + +TESTS=${*:-python rust-release} + +if [[ -z "$MIPS_CC" ]]; then + echo "MIPS_CC not set" + exit 1 +fi + +cd "$(dirname "${BASH_SOURCE[0]}")" + +FAILED=0 + +OBJDUMPFLAGS=-srt +for typ in $TESTS; do + for A in tests/*.c tests/*.p; do + echo "$A ($typ)" + ./compile-test.sh "$A" $typ && mips-linux-gnu-objdump $OBJDUMPFLAGS "${A%.*}.o" | diff -w "${A%.*}.objdump" - || (echo FAIL "$A" && exit 1) + FAILED=$(( $? + $FAILED )) + done done + +exit $(( $FAILED != 0 )) |
