mirror of
https://github.com/antonblanchard/chiselwatt.git
synced 2026-01-13 15:27:47 +00:00
We weren't propagating all errors back to Travis CI, so make check wasn't actually being tested. Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
33 lines
596 B
Bash
Executable File
33 lines
596 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
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
|
|
|
|
CHISELWATT_DIR=$PWD
|
|
|
|
cd $TMPDIR
|
|
|
|
${CHISELWATT_DIR}/scripts/bin2hex.py ${CHISELWATT_DIR}/tests/${TEST}.bin > insns.hex
|
|
|
|
${CHISELWATT_DIR}/chiselwatt 2> test.err | grep -v "^$" | grep -v GPR31 > test.out || true
|
|
|
|
grep -v "^$" ${CHISELWATT_DIR}/tests/${TEST}.out | grep -v GPR31 | grep -v XER > exp.out
|
|
|
|
diff --strip-trailing-cr -q test.out exp.out && echo "$TEST PASS" && exit 0
|
|
|
|
cat test.err
|
|
echo "$TEST FAIL ********"
|
|
exit 1
|