check modules and exit codes with the test egg

Written as shell inside make, a check said only that it failed and left
the reason to rerunning it by hand; now each says what it expected.
This commit is contained in:
2026-10-14 23:22:10 +03:00
parent 397766822d
commit c33bfd704d
5 changed files with 167 additions and 101 deletions

View File

@@ -114,16 +114,15 @@ SEX_TEST_PROGRAMS = c11 \
unnamed-params \
wildcards
# 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
# The failure paths are checked end to end; see tests/exit-code/Makefile.
check-exit-code: sexc
@$(MAKE) --no-print-directory -C ./tests/exit-code check SEXC=../../sexc
check run-tests: sexc sex-tests sextest
./sex-tests && ./sextest --sexc=./sexc $(SEX_TEST_PROGRAMS:%=./tests/sex-programs/%.sex) && $(MAKE) check-modules && $(MAKE) check-exit-code
./sex-tests
./sextest --sexc=./sexc $(SEX_TEST_PROGRAMS:%=./tests/sex-programs/%.sex)
@$(MAKE) --no-print-directory check-modules
@$(MAKE) --no-print-directory check-exit-code
# The end-to-end checks, each on its own: run with the eggs on the path
check-modules check-exit-code: check-%: sexc
cd tests/$* && SEXC='$(CURDIR)/sexc' $(CSI) -s check.scm
install: all installdirs
$(INSTALL_PROGRAM) sexc $(DESTDIR)$(bindir)/sexc
@@ -145,8 +144,5 @@ clean:
rm -f *.import.scm
rm -f *.link
rm -f sexc sex-tests sextest
$(MAKE) -C ./tests/modules clean
.PHONY: all check run-tests check-modules check-exit-code \
install install-strip installdirs uninstall \
clean
.PHONY: all check run-tests check-modules check-exit-code install install-strip installdirs uninstall clean