From c5c6ef4c6c33ce8e972789866418a9c0dc185e47 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Tue, 31 Dec 2019 13:07:05 -0500 Subject: [PATCH] Move "tests" folder to root --- README.md | 3 +-- runtests.sh | 14 ++++---------- {tools/tests => tests}/Makefile | 6 +++--- {tools/tests => tests}/README.md | 0 {tools/tests => tests}/avra/blink_tn45.asm | 0 {tools/tests => tests}/avra/blink_tn45.expected | 0 {tools/tests => tests}/avra/runtests.sh | 4 ++-- {tools/tests => tests}/avra/seg7multiplex.asm | 0 {tools/tests => tests}/avra/seg7multiplex.expected | Bin {tools/tests => tests}/avra/test1.asm | 0 {tools/tests => tests}/avra/test1.expected | Bin {tools/tests => tests}/avra/testldst.asm | 0 {tools/tests => tests}/avra/testldst.expected | 0 {tools/tests => tests}/shell/cfsin/bar | 0 {tools/tests => tests}/shell/cfsin/foo | 0 {tools/tests => tests}/shell/fls.expected | 0 {tools/tests => tests}/shell/fls.replay | 0 {tools/tests => tests}/shell/print.expected | 0 {tools/tests => tests}/shell/print.replay | 0 {tools/tests => tests}/shell/runtests.sh | 4 ++-- {tools/tests => tests}/shell/test.cfs | Bin {tools/tests => tests}/unit/common.asm | 0 {tools/tests => tests}/unit/runtests.sh | 4 ++-- {tools/tests => tests}/unit/test_basic_parse.asm | 0 {tools/tests => tests}/unit/test_core.asm | 0 {tools/tests => tests}/unit/test_ed_util.asm | 0 {tools/tests => tests}/unit/test_expr.asm | 0 {tools/tests => tests}/unit/test_lib_ari.asm | 0 {tools/tests => tests}/unit/test_lib_fmt.asm | 0 {tools/tests => tests}/unit/test_lib_parse.asm | 0 {tools/tests => tests}/unit/test_symbol.asm | 0 {tools/tests => tests}/unit/test_util_z.asm | 0 {tools/tests => tests}/unit/test_z_instr.asm | 0 {tools/tests => tests}/zasm/allinstrs.asm | 0 {tools/tests => tests}/zasm/allinstrs.asm.expected | Bin {tools/tests => tests}/zasm/errtests.sh | 2 +- {tools/tests => tests}/zasm/geninstrs.py | 0 {tools/tests => tests}/zasm/runtests.sh | 9 +++++---- {tools/tests => tests}/zasm/test1.asm | 0 {tools/tests => tests}/zasm/test1.asm.expected | Bin {tools/tests => tests}/zasm/test10.asm | 0 {tools/tests => tests}/zasm/test10.asm.expected | 0 {tools/tests => tests}/zasm/test2.asm | 0 {tools/tests => tests}/zasm/test2.asm.expected | Bin {tools/tests => tests}/zasm/test3.asm | 0 {tools/tests => tests}/zasm/test3.asm.expected | 0 {tools/tests => tests}/zasm/test4.asm | 0 {tools/tests => tests}/zasm/test4.asm.expected | Bin {tools/tests => tests}/zasm/test5.asm | 0 {tools/tests => tests}/zasm/test5.asm.expected | 0 {tools/tests => tests}/zasm/test6.asm | 0 {tools/tests => tests}/zasm/test6.asm.expected | 0 {tools/tests => tests}/zasm/test7.asm | 0 {tools/tests => tests}/zasm/test7.asm.expected | 0 {tools/tests => tests}/zasm/test8.asm | 0 {tools/tests => tests}/zasm/test8.asm.expected | 0 {tools/tests => tests}/zasm/test9.asm | 0 {tools/tests => tests}/zasm/test9.asm.expected | Bin 58 files changed, 20 insertions(+), 26 deletions(-) rename {tools/tests => tests}/Makefile (75%) rename {tools/tests => tests}/README.md (100%) rename {tools/tests => tests}/avra/blink_tn45.asm (100%) rename {tools/tests => tests}/avra/blink_tn45.expected (100%) rename {tools/tests => tests}/avra/runtests.sh (91%) rename {tools/tests => tests}/avra/seg7multiplex.asm (100%) rename {tools/tests => tests}/avra/seg7multiplex.expected (100%) rename {tools/tests => tests}/avra/test1.asm (100%) rename {tools/tests => tests}/avra/test1.expected (100%) rename {tools/tests => tests}/avra/testldst.asm (100%) rename {tools/tests => tests}/avra/testldst.expected (100%) rename {tools/tests => tests}/shell/cfsin/bar (100%) rename {tools/tests => tests}/shell/cfsin/foo (100%) rename {tools/tests => tests}/shell/fls.expected (100%) rename {tools/tests => tests}/shell/fls.replay (100%) rename {tools/tests => tests}/shell/print.expected (100%) rename {tools/tests => tests}/shell/print.replay (100%) rename {tools/tests => tests}/shell/runtests.sh (88%) rename {tools/tests => tests}/shell/test.cfs (100%) rename {tools/tests => tests}/unit/common.asm (100%) rename {tools/tests => tests}/unit/runtests.sh (93%) rename {tools/tests => tests}/unit/test_basic_parse.asm (100%) rename {tools/tests => tests}/unit/test_core.asm (100%) rename {tools/tests => tests}/unit/test_ed_util.asm (100%) rename {tools/tests => tests}/unit/test_expr.asm (100%) rename {tools/tests => tests}/unit/test_lib_ari.asm (100%) rename {tools/tests => tests}/unit/test_lib_fmt.asm (100%) rename {tools/tests => tests}/unit/test_lib_parse.asm (100%) rename {tools/tests => tests}/unit/test_symbol.asm (100%) rename {tools/tests => tests}/unit/test_util_z.asm (100%) rename {tools/tests => tests}/unit/test_z_instr.asm (100%) rename {tools/tests => tests}/zasm/allinstrs.asm (100%) rename {tools/tests => tests}/zasm/allinstrs.asm.expected (100%) rename {tools/tests => tests}/zasm/errtests.sh (98%) rename {tools/tests => tests}/zasm/geninstrs.py (100%) rename {tools/tests => tests}/zasm/runtests.sh (79%) rename {tools/tests => tests}/zasm/test1.asm (100%) rename {tools/tests => tests}/zasm/test1.asm.expected (100%) rename {tools/tests => tests}/zasm/test10.asm (100%) rename {tools/tests => tests}/zasm/test10.asm.expected (100%) rename {tools/tests => tests}/zasm/test2.asm (100%) rename {tools/tests => tests}/zasm/test2.asm.expected (100%) rename {tools/tests => tests}/zasm/test3.asm (100%) rename {tools/tests => tests}/zasm/test3.asm.expected (100%) rename {tools/tests => tests}/zasm/test4.asm (100%) rename {tools/tests => tests}/zasm/test4.asm.expected (100%) rename {tools/tests => tests}/zasm/test5.asm (100%) rename {tools/tests => tests}/zasm/test5.asm.expected (100%) rename {tools/tests => tests}/zasm/test6.asm (100%) rename {tools/tests => tests}/zasm/test6.asm.expected (100%) rename {tools/tests => tests}/zasm/test7.asm (100%) rename {tools/tests => tests}/zasm/test7.asm.expected (100%) rename {tools/tests => tests}/zasm/test8.asm (100%) rename {tools/tests => tests}/zasm/test8.asm.expected (100%) rename {tools/tests => tests}/zasm/test9.asm (100%) rename {tools/tests => tests}/zasm/test9.asm.expected (100%) diff --git a/README.md b/README.md index d20d0ca..a66151a 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,7 @@ path to giving Collapse OS a try. * `tools`: Tools for working with Collapse OS from "modern" environments. Mostly development tools, but also contains emulated zasm, which is necessary to build Collapse OS from a non-Collapse OS machine. - -Each folder has a README with more details. +* `tests`: Automated test suite for the whole project. ## Status diff --git a/runtests.sh b/runtests.sh index cd8a12b..9ff61e1 100755 --- a/runtests.sh +++ b/runtests.sh @@ -4,15 +4,9 @@ git submodule init git submodule update git clean -fxd -cd tools/emul -make - -cd ../tests -make +make -C tools/emul +make -C tests # let's try again with an updated zasm -cd ../emul -make updatebootstrap all - -cd ../tests -make +make -C tools/emul updatebootstrap all +make -C tests diff --git a/tools/tests/Makefile b/tests/Makefile similarity index 75% rename from tools/tests/Makefile rename to tests/Makefile index dec94c9..5bacf33 100644 --- a/tools/tests/Makefile +++ b/tests/Makefile @@ -1,5 +1,5 @@ -EMULDIR = ../emul -CFSPACK = ../cfspack/cfspack +EMULDIR = ../tools/emul +CFSPACK = ../tools/cfspack/cfspack .PHONY: run run: @@ -10,7 +10,7 @@ run: cd shell && ./runtests.sh $(CFSPACK): - $(MAKE) -C ../cfspack + $(MAKE) -C ../tools/cfspack .PHONY: cfs cfs: $(CFSPACK) diff --git a/tools/tests/README.md b/tests/README.md similarity index 100% rename from tools/tests/README.md rename to tests/README.md diff --git a/tools/tests/avra/blink_tn45.asm b/tests/avra/blink_tn45.asm similarity index 100% rename from tools/tests/avra/blink_tn45.asm rename to tests/avra/blink_tn45.asm diff --git a/tools/tests/avra/blink_tn45.expected b/tests/avra/blink_tn45.expected similarity index 100% rename from tools/tests/avra/blink_tn45.expected rename to tests/avra/blink_tn45.expected diff --git a/tools/tests/avra/runtests.sh b/tests/avra/runtests.sh similarity index 91% rename from tools/tests/avra/runtests.sh rename to tests/avra/runtests.sh index 03ca0a6..6a047f7 100755 --- a/tools/tests/avra/runtests.sh +++ b/tests/avra/runtests.sh @@ -1,7 +1,7 @@ #!/bin/sh -e -ZASM=../../zasm.sh -AVRINC=../../../avr +ZASM=../../tools/zasm.sh +AVRINC=../../avr cmpas() { FN=$1 diff --git a/tools/tests/avra/seg7multiplex.asm b/tests/avra/seg7multiplex.asm similarity index 100% rename from tools/tests/avra/seg7multiplex.asm rename to tests/avra/seg7multiplex.asm diff --git a/tools/tests/avra/seg7multiplex.expected b/tests/avra/seg7multiplex.expected similarity index 100% rename from tools/tests/avra/seg7multiplex.expected rename to tests/avra/seg7multiplex.expected diff --git a/tools/tests/avra/test1.asm b/tests/avra/test1.asm similarity index 100% rename from tools/tests/avra/test1.asm rename to tests/avra/test1.asm diff --git a/tools/tests/avra/test1.expected b/tests/avra/test1.expected similarity index 100% rename from tools/tests/avra/test1.expected rename to tests/avra/test1.expected diff --git a/tools/tests/avra/testldst.asm b/tests/avra/testldst.asm similarity index 100% rename from tools/tests/avra/testldst.asm rename to tests/avra/testldst.asm diff --git a/tools/tests/avra/testldst.expected b/tests/avra/testldst.expected similarity index 100% rename from tools/tests/avra/testldst.expected rename to tests/avra/testldst.expected diff --git a/tools/tests/shell/cfsin/bar b/tests/shell/cfsin/bar similarity index 100% rename from tools/tests/shell/cfsin/bar rename to tests/shell/cfsin/bar diff --git a/tools/tests/shell/cfsin/foo b/tests/shell/cfsin/foo similarity index 100% rename from tools/tests/shell/cfsin/foo rename to tests/shell/cfsin/foo diff --git a/tools/tests/shell/fls.expected b/tests/shell/fls.expected similarity index 100% rename from tools/tests/shell/fls.expected rename to tests/shell/fls.expected diff --git a/tools/tests/shell/fls.replay b/tests/shell/fls.replay similarity index 100% rename from tools/tests/shell/fls.replay rename to tests/shell/fls.replay diff --git a/tools/tests/shell/print.expected b/tests/shell/print.expected similarity index 100% rename from tools/tests/shell/print.expected rename to tests/shell/print.expected diff --git a/tools/tests/shell/print.replay b/tests/shell/print.replay similarity index 100% rename from tools/tests/shell/print.replay rename to tests/shell/print.replay diff --git a/tools/tests/shell/runtests.sh b/tests/shell/runtests.sh similarity index 88% rename from tools/tests/shell/runtests.sh rename to tests/shell/runtests.sh index 0972641..8a961c6 100755 --- a/tools/tests/shell/runtests.sh +++ b/tests/shell/runtests.sh @@ -1,7 +1,7 @@ #!/bin/sh -e -EMULDIR=../../emul -SHELL=../../emul/shell/shell +EMULDIR=../../tools/emul +SHELL="${EMULDIR}/shell/shell" replay() { fn=$1 diff --git a/tools/tests/shell/test.cfs b/tests/shell/test.cfs similarity index 100% rename from tools/tests/shell/test.cfs rename to tests/shell/test.cfs diff --git a/tools/tests/unit/common.asm b/tests/unit/common.asm similarity index 100% rename from tools/tests/unit/common.asm rename to tests/unit/common.asm diff --git a/tools/tests/unit/runtests.sh b/tests/unit/runtests.sh similarity index 93% rename from tools/tests/unit/runtests.sh rename to tests/unit/runtests.sh index c3f0519..5f3dedb 100755 --- a/tools/tests/unit/runtests.sh +++ b/tests/unit/runtests.sh @@ -2,8 +2,8 @@ set -e # TODO: find POSIX substitute to that PIPESTATUS thing -BASE=../../.. -TOOLS=../.. +BASE=../.. +TOOLS="${BASE}/tools" ZASM="${TOOLS}/zasm.sh" RUNBIN="${TOOLS}/emul/runbin/runbin" KERNEL="${BASE}/kernel" diff --git a/tools/tests/unit/test_basic_parse.asm b/tests/unit/test_basic_parse.asm similarity index 100% rename from tools/tests/unit/test_basic_parse.asm rename to tests/unit/test_basic_parse.asm diff --git a/tools/tests/unit/test_core.asm b/tests/unit/test_core.asm similarity index 100% rename from tools/tests/unit/test_core.asm rename to tests/unit/test_core.asm diff --git a/tools/tests/unit/test_ed_util.asm b/tests/unit/test_ed_util.asm similarity index 100% rename from tools/tests/unit/test_ed_util.asm rename to tests/unit/test_ed_util.asm diff --git a/tools/tests/unit/test_expr.asm b/tests/unit/test_expr.asm similarity index 100% rename from tools/tests/unit/test_expr.asm rename to tests/unit/test_expr.asm diff --git a/tools/tests/unit/test_lib_ari.asm b/tests/unit/test_lib_ari.asm similarity index 100% rename from tools/tests/unit/test_lib_ari.asm rename to tests/unit/test_lib_ari.asm diff --git a/tools/tests/unit/test_lib_fmt.asm b/tests/unit/test_lib_fmt.asm similarity index 100% rename from tools/tests/unit/test_lib_fmt.asm rename to tests/unit/test_lib_fmt.asm diff --git a/tools/tests/unit/test_lib_parse.asm b/tests/unit/test_lib_parse.asm similarity index 100% rename from tools/tests/unit/test_lib_parse.asm rename to tests/unit/test_lib_parse.asm diff --git a/tools/tests/unit/test_symbol.asm b/tests/unit/test_symbol.asm similarity index 100% rename from tools/tests/unit/test_symbol.asm rename to tests/unit/test_symbol.asm diff --git a/tools/tests/unit/test_util_z.asm b/tests/unit/test_util_z.asm similarity index 100% rename from tools/tests/unit/test_util_z.asm rename to tests/unit/test_util_z.asm diff --git a/tools/tests/unit/test_z_instr.asm b/tests/unit/test_z_instr.asm similarity index 100% rename from tools/tests/unit/test_z_instr.asm rename to tests/unit/test_z_instr.asm diff --git a/tools/tests/zasm/allinstrs.asm b/tests/zasm/allinstrs.asm similarity index 100% rename from tools/tests/zasm/allinstrs.asm rename to tests/zasm/allinstrs.asm diff --git a/tools/tests/zasm/allinstrs.asm.expected b/tests/zasm/allinstrs.asm.expected similarity index 100% rename from tools/tests/zasm/allinstrs.asm.expected rename to tests/zasm/allinstrs.asm.expected diff --git a/tools/tests/zasm/errtests.sh b/tests/zasm/errtests.sh similarity index 98% rename from tools/tests/zasm/errtests.sh rename to tests/zasm/errtests.sh index 1a41161..ae3d152 100755 --- a/tools/tests/zasm/errtests.sh +++ b/tests/zasm/errtests.sh @@ -2,7 +2,7 @@ # no "set -e" because we test errors -ZASM=../../zasm.sh +ZASM=../../tools/zasm.sh chkerr() { echo "Check that '$1' results in error $2" diff --git a/tools/tests/zasm/geninstrs.py b/tests/zasm/geninstrs.py similarity index 100% rename from tools/tests/zasm/geninstrs.py rename to tests/zasm/geninstrs.py diff --git a/tools/tests/zasm/runtests.sh b/tests/zasm/runtests.sh similarity index 79% rename from tools/tests/zasm/runtests.sh rename to tests/zasm/runtests.sh index 50282b2..3e1f48b 100755 --- a/tools/tests/zasm/runtests.sh +++ b/tests/zasm/runtests.sh @@ -1,9 +1,10 @@ #!/bin/sh -e -KERNEL=../../../kernel -APPS=../../../apps -ZASM=../../zasm.sh -ASMFILE=${APPS}/zasm/instr.asm +BASE=../.. +KERNEL="${BASE}/kernel" +APPS="${BASE}/apps" +ZASM="${BASE}/tools/zasm.sh" +ASMFILE="${APPS}/zasm/instr.asm" cmpas() { FN=$1 diff --git a/tools/tests/zasm/test1.asm b/tests/zasm/test1.asm similarity index 100% rename from tools/tests/zasm/test1.asm rename to tests/zasm/test1.asm diff --git a/tools/tests/zasm/test1.asm.expected b/tests/zasm/test1.asm.expected similarity index 100% rename from tools/tests/zasm/test1.asm.expected rename to tests/zasm/test1.asm.expected diff --git a/tools/tests/zasm/test10.asm b/tests/zasm/test10.asm similarity index 100% rename from tools/tests/zasm/test10.asm rename to tests/zasm/test10.asm diff --git a/tools/tests/zasm/test10.asm.expected b/tests/zasm/test10.asm.expected similarity index 100% rename from tools/tests/zasm/test10.asm.expected rename to tests/zasm/test10.asm.expected diff --git a/tools/tests/zasm/test2.asm b/tests/zasm/test2.asm similarity index 100% rename from tools/tests/zasm/test2.asm rename to tests/zasm/test2.asm diff --git a/tools/tests/zasm/test2.asm.expected b/tests/zasm/test2.asm.expected similarity index 100% rename from tools/tests/zasm/test2.asm.expected rename to tests/zasm/test2.asm.expected diff --git a/tools/tests/zasm/test3.asm b/tests/zasm/test3.asm similarity index 100% rename from tools/tests/zasm/test3.asm rename to tests/zasm/test3.asm diff --git a/tools/tests/zasm/test3.asm.expected b/tests/zasm/test3.asm.expected similarity index 100% rename from tools/tests/zasm/test3.asm.expected rename to tests/zasm/test3.asm.expected diff --git a/tools/tests/zasm/test4.asm b/tests/zasm/test4.asm similarity index 100% rename from tools/tests/zasm/test4.asm rename to tests/zasm/test4.asm diff --git a/tools/tests/zasm/test4.asm.expected b/tests/zasm/test4.asm.expected similarity index 100% rename from tools/tests/zasm/test4.asm.expected rename to tests/zasm/test4.asm.expected diff --git a/tools/tests/zasm/test5.asm b/tests/zasm/test5.asm similarity index 100% rename from tools/tests/zasm/test5.asm rename to tests/zasm/test5.asm diff --git a/tools/tests/zasm/test5.asm.expected b/tests/zasm/test5.asm.expected similarity index 100% rename from tools/tests/zasm/test5.asm.expected rename to tests/zasm/test5.asm.expected diff --git a/tools/tests/zasm/test6.asm b/tests/zasm/test6.asm similarity index 100% rename from tools/tests/zasm/test6.asm rename to tests/zasm/test6.asm diff --git a/tools/tests/zasm/test6.asm.expected b/tests/zasm/test6.asm.expected similarity index 100% rename from tools/tests/zasm/test6.asm.expected rename to tests/zasm/test6.asm.expected diff --git a/tools/tests/zasm/test7.asm b/tests/zasm/test7.asm similarity index 100% rename from tools/tests/zasm/test7.asm rename to tests/zasm/test7.asm diff --git a/tools/tests/zasm/test7.asm.expected b/tests/zasm/test7.asm.expected similarity index 100% rename from tools/tests/zasm/test7.asm.expected rename to tests/zasm/test7.asm.expected diff --git a/tools/tests/zasm/test8.asm b/tests/zasm/test8.asm similarity index 100% rename from tools/tests/zasm/test8.asm rename to tests/zasm/test8.asm diff --git a/tools/tests/zasm/test8.asm.expected b/tests/zasm/test8.asm.expected similarity index 100% rename from tools/tests/zasm/test8.asm.expected rename to tests/zasm/test8.asm.expected diff --git a/tools/tests/zasm/test9.asm b/tests/zasm/test9.asm similarity index 100% rename from tools/tests/zasm/test9.asm rename to tests/zasm/test9.asm diff --git a/tools/tests/zasm/test9.asm.expected b/tests/zasm/test9.asm.expected similarity index 100% rename from tools/tests/zasm/test9.asm.expected rename to tests/zasm/test9.asm.expected