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.

30 lines
448B

  1. #!/usr/bin/env bash
  2. set -e
  3. BASE=../../..
  4. TOOLS=../..
  5. ZASM="${TOOLS}/zasm.sh"
  6. RUNBIN="${TOOLS}/emul/runbin/runbin"
  7. KERNEL="${BASE}/kernel"
  8. APPS="${BASE}/apps"
  9. chk() {
  10. echo "Running test $1"
  11. if ! ${ZASM} "${KERNEL}" "${APPS}" < $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 *.asm; do
  21. chk "${fn}"
  22. done
  23. echo "All tests passed!"