mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-28 00:28:05 +11:00
097c677641
This allows us to get rid of the zasm.sh wrapper.
29 lines
506 B
Bash
Executable File
29 lines
506 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
# TODO: find POSIX substitute to that PIPESTATUS thing
|
|
|
|
BASE=../..
|
|
ZASM="${BASE}/emul/zasm/zasm"
|
|
RUNBIN="${BASE}/emul/runbin/runbin"
|
|
KERNEL="${BASE}/kernel"
|
|
APPS="${BASE}/apps"
|
|
|
|
chk() {
|
|
echo "Running test $1"
|
|
if ! ${ZASM} "${KERNEL}" "${APPS}" common.asm < $1 | ${RUNBIN}; then
|
|
echo "failed with code ${PIPESTATUS[1]}"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
if [ ! -z $1 ]; then
|
|
chk $1
|
|
exit 0
|
|
fi
|
|
|
|
for fn in test_*.asm; do
|
|
chk "${fn}"
|
|
done
|
|
|
|
echo "All tests passed!"
|