mirror of
https://github.com/antonblanchard/microwatt.git
synced 2026-01-25 19:46:10 +00:00
Add test cases for new exceptions and supervisor state
This adds test cases for: - sc, illegals and decrementer exceptions - decrementer overflow - rfid - mt/mf sprg0/1 srr0/1 - mtdec - mtmsrd - sc It also adds these test cases to make check/check_light Signed-off-by: Michael Neuling <mikey@neuling.org>
This commit is contained in:
38
scripts/run_test_console.sh
Executable file
38
scripts/run_test_console.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Runs a test and checks the console output against known good output
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: run_test.sh <test>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TEST=$1
|
||||
|
||||
TMPDIR=$(mktemp -d)
|
||||
|
||||
function finish {
|
||||
rm -rf "$TMPDIR"
|
||||
}
|
||||
|
||||
trap finish EXIT
|
||||
|
||||
MICROWATT_DIR=$PWD
|
||||
|
||||
cd $TMPDIR
|
||||
|
||||
cp ${MICROWATT_DIR}/tests/${TEST}.bin main_ram.bin
|
||||
|
||||
${MICROWATT_DIR}/core_tb > /dev/null 2> test1.out || true
|
||||
|
||||
grep -v "Failed to bind debug socket" test1.out > test.out
|
||||
|
||||
cp ${MICROWATT_DIR}/tests/${TEST}.console_out exp.out
|
||||
|
||||
cp test.out /tmp
|
||||
cp exp.out /tmp
|
||||
|
||||
diff -q test.out exp.out && echo "$TEST PASS" && exit 0
|
||||
|
||||
echo "$TEST FAIL ********"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user