Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
504B

  1. #!/usr/bin/env bash
  2. set -e
  3. # TODO: find POSIX substitute to that PIPESTATUS thing
  4. BASE=../..
  5. ZASM="${BASE}/emul/zasm.sh"
  6. RUNBIN="${BASE}/emul/runbin/runbin"
  7. KERNEL="${BASE}/kernel"
  8. APPS="${BASE}/apps"
  9. chk() {
  10. echo "Running test $1"
  11. if ! ${ZASM} "${KERNEL}" "${APPS}" common.asm < $1 | ${RUNBIN}; then
  12. echo "failed with code ${PIPESTATUS[1]}"
  13. exit 1
  14. fi
  15. }
  16. if [ ! -z $1 ]; then
  17. chk $1
  18. exit 0
  19. fi
  20. for fn in test_*.asm; do
  21. chk "${fn}"
  22. done
  23. echo "All tests passed!"