diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-05-01 18:37:38 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-05-01 18:42:08 +0300 |
| commit | 7790e27b3423901e2080bfd3c600a65a48d42886 (patch) | |
| tree | e53f3d2b01fd24ade5eff042cb5d09bd1865c540 /tests/Makefile | |
| parent | dbf8737fd34a0766691999e3271e9c5662ffae0d (diff) | |
| download | fwd-7790e27b3423901e2080bfd3c600a65a48d42886.tar.gz fwd-7790e27b3423901e2080bfd3c600a65a48d42886.zip | |
start adding proper tests
Diffstat (limited to 'tests/Makefile')
| -rw-r--r-- | tests/Makefile | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..ce009fc --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,39 @@ +check: + $(MAKE) -f scripts/makefile check + +.DEFAULT: + $(MAKE) -f scripts/makefile $< + +TESTS != find . -name test.mk +DO != echo -n > tests.mk && rm -rf reports + +# collect tests that are expected to pass into XPASS, each testcase is assumed +# to be in a separate directory, let's call it $NAME, and have a $NAME/test.mk +# file which just appends the $NAME of to XPASS if the test should pass, so +# +# XPASS += $NAME +# +# or to XFAIL along, with the expected error message with the format +# +# XFAIL += $NAME,'error message' +# +# Note that it's very important to use single quotes here, otherwise Make might +# start splitting the error message along spaces into arguments. +# +# Each test is assumed to have a fwd file called $NAME/$NAME.fwd, which should +# exercise some part of the compiler. The test framework links all libraries in +# `../mod` into the binary automatically. Test logs, along with some other +# useful stuff, is written out to `reports/$NAME`. +XPASS := +XFAIL := + +include $(TESTS) + +DO != ./scripts/gen-xpass $(XPASS) +DO != ./scripts/gen-xfail $(XFAIL) + +RM ?= rm + +.PHONY: clean +clean: + $(RM) -rf reports |
