瀏覽代碼

tests: run "generic" tests under all Collapse OS architectures

There's no reason to run them only under CVM.
master
Virgil Dupras 3 年之前
父節點
當前提交
c072096909
共有 5 個文件被更改,包括 11 次插入9 次删除
  1. +3
    -6
      tests/Makefile
  2. +8
    -3
      tests/all/runtests.sh
  3. +0
    -0
      tests/all/test_ari.fs
  4. +0
    -0
      tests/all/test_cmp.fs
  5. +0
    -0
      tests/all/test_parse.fs

+ 3
- 6
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

tests/cvm/runtests.sh → 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
}

tests/cvm/test_ari.fs → tests/all/test_ari.fs 查看文件


tests/cvm/test_cmp.fs → tests/all/test_cmp.fs 查看文件


tests/cvm/test_parse.fs → tests/all/test_parse.fs 查看文件


Loading…
取消
儲存