summaryrefslogtreecommitdiff
path: root/run-riscv-tests.sh
diff options
context:
space:
mode:
authortaitep <taitep@taitep.se>2025-12-30 20:18:23 +0100
committertaitep <taitep@taitep.se>2025-12-30 20:18:23 +0100
commit5a383956c9ee27d50452aa237a9f34b7f75e8f7c (patch)
treed49a782dfb068e3165825569084c23872ca9d83d /run-riscv-tests.sh
parent6a0e5e63c13c4cb480233106d2043f2706bd5183 (diff)
Improve exception dumps and general debug info, make the emulator capable of running the riscv ISA tests, and perform some general fixes i found while making it pass the tests for RV64I
Diffstat (limited to 'run-riscv-tests.sh')
-rwxr-xr-xrun-riscv-tests.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/run-riscv-tests.sh b/run-riscv-tests.sh
new file mode 100755
index 0000000..c39c59d
--- /dev/null
+++ b/run-riscv-tests.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+for f in $(cat torun.txt); do
+ result=$(cargo run $f 2>&1 | tail -n 1 | awk '{print $NF}')
+ if [[ $result != 0 ]]; then
+ testnum=$(( result >> 1 ))
+ echo $f: test $testnum failed
+ exit 1
+ fi
+done
+
+echo all tests passed