1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-21 02:18:06 +11:00
collapseos/tools/tests/unit/runtests.sh
2019-07-23 14:59:38 -04:00

30 lines
448 B
Bash
Executable File

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