summaryrefslogtreecommitdiff
path: root/test/riscv/run_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/riscv/run_tests.sh')
-rwxr-xr-xtest/riscv/run_tests.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/riscv/run_tests.sh b/test/riscv/run_tests.sh
index 006ed425..d73fa287 100755
--- a/test/riscv/run_tests.sh
+++ b/test/riscv/run_tests.sh
@@ -69,5 +69,24 @@ done
finish_suite "RISCV tests"
+if make -C $SAILDIR/riscv riscv_c;
+then
+ green "Building RISCV specification to C" "ok"
+else
+ red "Building RISCV specification to C" "fail"
+fi
+
+for test in $DIR/tests/*.elf; do
+ sail -elf $test -o ${test%.elf}.bin 2> /dev/null;
+ if timeout 5 $SAILDIR/riscv/riscv_c --binary=0x1000,reset_vec.bin --image=${test%.elf}.bin > ${test%.elf}.cout 2>&1 && grep -q SUCCESS ${test%.elf}.cout
+ then
+ green "$(basename $test)" "ok"
+ else
+ red "$(basename $test)" "fail"
+ fi
+done
+
+finish_suite "RISCV C tests"
+
printf "</testsuites>\n" >> $DIR/tests.xml