You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
microwatt/scripts/run_test.sh

34 lines
476 B
Bash

#!/bin/bash
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
Y=$(${MICROWATT_DIR}/scripts/hash.py tests/${TEST}.out)
cd $TMPDIR
cp ${MICROWATT_DIR}/tests/${TEST}.bin simple_ram_behavioural.bin
X=$( ${MICROWATT_DIR}/core_tb | ${MICROWATT_DIR}/scripts/hash.py )
if [ $X == $Y ]; then
echo "$TEST PASS"
else
echo "$TEST FAIL ********"
exit 1
fi