1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-20 22:28:05 +11:00
collapseos/tests/zasm/runtests.sh

34 lines
526 B
Bash
Raw Normal View History

#!/bin/sh -e
2020-01-01 05:07:05 +11:00
BASE=../..
KERNEL="${BASE}/kernel"
APPS="${BASE}/apps"
ZASM="${BASE}/emul/zasm/zasm"
2019-05-01 05:51:39 +10:00
cmpas() {
FN=$1
EXPECTED=$(xxd ${FN}.expected)
ACTUAL=$(cat ${FN} | $ZASM "${KERNEL}" "${APPS}" | xxd)
if [ "$ACTUAL" = "$EXPECTED" ]; then
echo ok
else
echo actual
echo "$ACTUAL"
echo expected
echo "$EXPECTED"
exit 1
fi
2019-05-01 05:51:39 +10:00
}
if [ ! -z $1 ]; then
cmpas $1
exit 0
fi
for fn in *.asm; do
2019-05-15 03:53:12 +10:00
echo "Comparing ${fn}"
cmpas $fn
2019-05-15 03:53:12 +10:00
done
./errtests.sh