diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 01:24:14 +0100 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 01:24:14 +0100 |
| commit | 98567ec798aa8ca2cfbcb85c774dd470f30e30d4 (patch) | |
| tree | 5113d5cc24d1ad5f93810b6442ce584a36950dc8 /test/GNUmakefile | |
| parent | ad3856a6b766087df0036de0b556f4700a6498c9 (diff) | |
| parent | 8d11c6c8213f46f0fa19826917c255edd5d43cb1 (diff) | |
mzuenni tests
Diffstat (limited to 'test/GNUmakefile')
| -rw-r--r-- | test/GNUmakefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/GNUmakefile b/test/GNUmakefile new file mode 100644 index 0000000..10e3b34 --- /dev/null +++ b/test/GNUmakefile @@ -0,0 +1,30 @@ + +TESTS = $(basename $(shell find . -type f -name '*.cpp')) +CXX = g++ -std=gnu++20 -I ../content/ -O2 -Wall -Wextra -Wshadow -Werror + +test: $(TESTS:=.ok) + +missing: + @find ../content -name '*.cpp' | sed 's|^../content/||' \ + | while read -r f ; do [ -e "$$f" ] || echo "$$f" ; done \ + | sort > missing.tmp + @sort missing.ignore | comm -23 missing.tmp - + @rm missing.tmp + +clean: + rm -f $(TESTS:=.test) $(TESTS:=.ok) $(TESTS:=.d) + +%.ok: %.test + timeout --foreground --verbose 60 prlimit -s$$((1<<32)) ./$< + @touch $@ + +%.test: %.cpp + $(CXX) -o $@ $< + +%.d: %.cpp + $(CXX) -M -MT '$*.test $*.d' -MF $@ $< + +.PHONY: test clean +.SECONDARY: $(TESTS:=.test) + +include $(TESTS:=.d) |
