commit 93c313d88156c339e9e92434bcaca2c2cda0c76d parent 2b4e352f88e5d5bccc4b05989b5c19792a371dcd Author: Bradley Gannon <bradley@bradleygannon.com> Date: Wed, 22 Jul 2026 18:04:01 -0400 Add test runner script for ACT suite Diffstat:
| A | tests/run.sh | | | 26 | ++++++++++++++++++++++++++ |
1 file changed, 26 insertions(+), 0 deletions(-)
diff --git a/tests/run.sh b/tests/run.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) +test_dir="$script_dir/perilus-rv32i/elfs/rv32i/I" +test_stems=$(find "$test_dir" -name "*.elf" | xargs -L 1 basename -s .elf | sort) +tmp_dir="/tmp/perilus" + +if [ ! -d $tmp_dir ] +then + mkdir "$tmp_dir" +fi + +exit_code=0 +for test_stem in $test_stems +do + echo -en "$test_stem:\t" + riscv64-none-elf-objcopy -O binary "$test_dir/$test_stem.elf" "$tmp_dir/$test_stem.bin" + if cd "$script_dir/../sim" && cargo run --release -q -- test "$tmp_dir/$test_stem.bin" + then + echo -e "PASS" + else + exit_code=1 + fi +done + +exit $exit_code