diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2025-09-04 17:56:01 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-04 17:56:01 -0700 |
| commit | 61a38830b94c28b3fcead3e22161c3dd621d25c9 (patch) | |
| tree | 8ae9664d2feae319bb7da12ddd7cc7e06751f1ae /tools/asm-processor/run-tests.sh | |
| parent | a4d5910cdb9bed05fa5aea4476a3cf4ef178be06 (diff) | |
* git subrepo pull tools/asm-processor
subrepo:
subdir: "tools/asm-processor"
merged: "5c3984fc"
upstream:
origin: "git@github.com:simonlindholm/asm-processor.git"
branch: "main"
commit: "5c3984fc"
git-subrepo:
version: "0.4.9"
origin: "git@github.com:ingydotnet/git-subrepo.git"
commit: "ea10886"
* Fix things needed for new spimdisasm release
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 )) |
