collapseos/tools/tests/zasm/runtests.sh

36 lines
537 B
Bash
Raw Normal View History

#!/bin/sh
set -e
KERNEL=../../../kernel
2019-05-17 20:47:43 -04:00
APPS=../../../apps
ZASM=../../zasm.sh
2019-05-17 20:47:43 -04:00
ASMFILE=${APPS}/zasm/instr.asm
2019-04-30 15:51:39 -04: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-04-30 15:51:39 -04:00
}
if [[ ! -z $1 ]]; then
cmpas $1
exit 0
fi
for fn in *.asm; do
2019-05-14 13:53:12 -04:00
echo "Comparing ${fn}"
cmpas $fn
2019-05-14 13:53:12 -04:00
done
./errtests.sh