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.

34 lines
524B

  1. #!/bin/sh -e
  2. BASE=../..
  3. KERNEL="${BASE}/kernel"
  4. APPS="${BASE}/apps"
  5. ZASM="${BASE}/emul/zasm.sh"
  6. cmpas() {
  7. FN=$1
  8. EXPECTED=$(xxd ${FN}.expected)
  9. ACTUAL=$(cat ${FN} | $ZASM "${KERNEL}" "${APPS}" | xxd)
  10. if [ "$ACTUAL" = "$EXPECTED" ]; then
  11. echo ok
  12. else
  13. echo actual
  14. echo "$ACTUAL"
  15. echo expected
  16. echo "$EXPECTED"
  17. exit 1
  18. fi
  19. }
  20. if [ ! -z $1 ]; then
  21. cmpas $1
  22. exit 0
  23. fi
  24. for fn in *.asm; do
  25. echo "Comparing ${fn}"
  26. cmpas $fn
  27. done
  28. ./errtests.sh