diff --git a/tests/Makefile b/tests/Makefile index 18b12af..f18c348 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,9 +1,6 @@ -CDIR = ../cvm -EDIR = ../emul - .PHONY: run run: - $(MAKE) -C $(CDIR) all - $(MAKE) -C $(EDIR) all - cd cvm && ./runtests.sh + $(MAKE) -C ../cvm all + $(MAKE) -C ../emul all + cd all && ./runtests.sh cd z80 && ./runtests.sh diff --git a/tests/cvm/runtests.sh b/tests/all/runtests.sh similarity index 57% rename from tests/cvm/runtests.sh rename to tests/all/runtests.sh index 4379dda..92943dd 100755 --- a/tests/cvm/runtests.sh +++ b/tests/all/runtests.sh @@ -1,13 +1,18 @@ #!/bin/sh -e BASE=../.. -EXEC="${BASE}/cvm/forth" +CVM="${BASE}/cvm/forth" +Z80="${BASE}/emul/forth" TMP=$(mktemp) chk() { - echo "Running test $1" cat ../harness.fs $1 > ${TMP} - if ! ${EXEC} ${TMP}; then + echo "Running test $1 under CVM" + if ! ${CVM} ${TMP}; then + exit 1 + fi + echo "Running test $1 under Z80" + if ! ${Z80} ${TMP}; then exit 1 fi } diff --git a/tests/cvm/test_ari.fs b/tests/all/test_ari.fs similarity index 100% rename from tests/cvm/test_ari.fs rename to tests/all/test_ari.fs diff --git a/tests/cvm/test_cmp.fs b/tests/all/test_cmp.fs similarity index 100% rename from tests/cvm/test_cmp.fs rename to tests/all/test_cmp.fs diff --git a/tests/cvm/test_parse.fs b/tests/all/test_parse.fs similarity index 100% rename from tests/cvm/test_parse.fs rename to tests/all/test_parse.fs