1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-10 09:48:05 +11:00
collapseos/tests/avra/runtests.sh

30 lines
466 B
Bash
Raw Normal View History

2019-12-14 09:38:40 +11:00
#!/bin/sh -e
ZASM=../../emul/zasm/avra
2020-01-01 05:07:05 +11:00
AVRINC=../../avr
2019-12-14 09:38:40 +11:00
cmpas() {
FN=$1
EXPECTED=$(xxd ${FN%.*}.expected)
ACTUAL=$(cat ${FN} | "${ZASM}" "${AVRINC}" | xxd)
2019-12-14 09:38:40 +11:00
if [ "$ACTUAL" = "$EXPECTED" ]; then
echo ok
else
echo actual
echo "$ACTUAL"
echo expected
echo "$EXPECTED"
exit 1
fi
}
if [ ! -z $1 ]; then
cmpas $1
exit 0
fi
for fn in *.asm; do
echo "Comparing ${fn}"
cmpas $fn
done