1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-17 17:48:06 +11:00
collapseos/tools/tests/unit/runtests.sh

28 lines
431 B
Bash
Raw Normal View History

#!/bin/sh -e
BASE=../../..
TOOLS=../..
ZASM="${TOOLS}/zasm.sh"
RUNBIN="${TOOLS}/emul/runbin/runbin"
KERNEL="${BASE}/kernel"
APPS="${BASE}/apps"
2019-07-23 23:28:39 +10:00
chk() {
echo "Running test $1"
if ! ${ZASM} "${KERNEL}" "${APPS}" < $1 | ${RUNBIN}; then
echo "failed with code ${PIPESTATUS[1]}"
exit 1
fi
2019-07-23 23:28:39 +10:00
}
if [ ! -z $1 ]; then
2019-07-23 23:28:39 +10:00
chk $1
exit 0
fi
for fn in *.asm; do
chk "${fn}"
done
echo "All tests passed!"