add module testing

Also fix module import
This commit is contained in:
2026-09-14 23:35:48 +03:00
parent 522c5a2c01
commit dae19715df
5 changed files with 80 additions and 7 deletions

View File

@@ -60,13 +60,18 @@ sextest:
SEX_TEST_PROGRAMS = hello-world lists comments unicode
# Multi-module linking is checked end to end; see tests/modules/Makefile.
check-modules: sexc
@$(MAKE) --no-print-directory -C ./tests/modules check SEXC=../../sexc
run-tests: sexc sex-tests sextest
./sex-tests && ./sextest --sexc=./sexc $(SEX_TEST_PROGRAMS:%=./tests/sex-programs/%.sex)
./sex-tests && ./sextest --sexc=./sexc $(SEX_TEST_PROGRAMS:%=./tests/sex-programs/%.sex) && $(MAKE) check-modules
clean:
rm -f $(OBJ) main.o
rm -f *.import.scm
rm -f *.link
rm -f sexc sex-tests sextest
$(MAKE) -C ./tests/modules clean
.PHONY: clean run-tests sex-tests sextest
.PHONY: clean run-tests sex-tests sextest check-modules