mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-21 02:28:05 +11:00
8926c33ab1
It needs bash after all. On OpenBSD, /usr/sh works, but not on Ubuntu.
36 lines
547 B
Bash
Executable File
36 lines
547 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
KERNEL=../../../kernel
|
|
APPS=../../../apps
|
|
ZASM=../../zasm.sh
|
|
ASMFILE=${APPS}/zasm/instr.asm
|
|
|
|
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
|
|
}
|
|
|
|
if [[ ! -z $1 ]]; then
|
|
cmpas $1
|
|
exit 0
|
|
fi
|
|
|
|
for fn in *.asm; do
|
|
echo "Comparing ${fn}"
|
|
cmpas $fn
|
|
done
|
|
|
|
./errtests.sh
|