tests: separate tests that need to run on z80 vs those that don't
This commit is contained in:
parent
ceabc9920f
commit
785b375028
@ -4,8 +4,6 @@ git submodule init
|
|||||||
git submodule update
|
git submodule update
|
||||||
git clean -fxd
|
git clean -fxd
|
||||||
|
|
||||||
make -C cvm
|
|
||||||
make -C emul
|
|
||||||
make -C tests
|
make -C tests
|
||||||
|
|
||||||
# verify that forth.bin is stable
|
# verify that forth.bin is stable
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
EMULDIR = ../emul
|
CDIR = ../cvm
|
||||||
|
EDIR = ../emul
|
||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
run:
|
run:
|
||||||
$(MAKE) -C $(EMULDIR) all
|
$(MAKE) -C $(CDIR) all
|
||||||
cd forth && ./runtests.sh
|
$(MAKE) -C $(EDIR) all
|
||||||
|
cd cvm && ./runtests.sh
|
||||||
|
cd z80 && ./runtests.sh
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Testing Collapse OS
|
# Testing Collapse OS
|
||||||
|
|
||||||
This folder contains Collapse OS' automated testing suite. To run, it needs
|
This folder contains Collapse OS' automated testing suite. You can run all tests
|
||||||
`/emul` to be built. You can run all tests with `make`.
|
with `make`.
|
||||||
|
26
tests/cvm/runtests.sh
Executable file
26
tests/cvm/runtests.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
BASE=../..
|
||||||
|
EXEC="${BASE}/cvm/forth"
|
||||||
|
TMP=$(mktemp)
|
||||||
|
|
||||||
|
chk() {
|
||||||
|
echo "Running test $1"
|
||||||
|
cat ../harness.fs $1 > ${TMP}
|
||||||
|
if ! ${EXEC} ${TMP}; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ ! -z $1 ]; then
|
||||||
|
chk $1
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# those tests run without any builtin
|
||||||
|
for fn in test_*.fs; do
|
||||||
|
chk "${fn}"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "All tests passed!"
|
||||||
|
rm ${TMP}
|
@ -6,7 +6,7 @@ TMP=$(mktemp)
|
|||||||
|
|
||||||
chk() {
|
chk() {
|
||||||
echo "Running test $1"
|
echo "Running test $1"
|
||||||
cat harness.fs $1 > ${TMP}
|
cat ../harness.fs $1 > ${TMP}
|
||||||
if ! ${EXEC} ${TMP}; then
|
if ! ${EXEC} ${TMP}; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user