X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/8d1d7d3eb07fe738fe5458acee84ef84919638ce..refs/heads/master:/test/Makefile.am diff --git a/test/Makefile.am b/test/Makefile.am index 300ad69..2f0dce7 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -7,7 +7,7 @@ ###----- Licensing notice --------------------------------------------------- ### -### This file is part of the Sensble Object Design, an object system for C. +### This file is part of the Sensible Object Design, an object system for C. ### ### SOD is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by @@ -29,15 +29,56 @@ include $(top_srcdir)/vars.am ### The silly Chimaera example. check_PROGRAMS += chimaera - -EXTRA_DIST += chimaera.sod +EXTRA_DIST += chimaera.sod chimaera.ref nodist_chimaera_SOURCES = chimaera.c chimaera.h BUILT_SOURCES += $(nodist_chimaera_SOURCES) - -EXTRA_DIST += chimaera.ref -CLEANFILES += chimaera.out check-local:: chimaera chimaera.ref ./chimaera >chimaera.out diff -u $(srcdir)/chimaera.ref chimaera.out +-include chimaera.c-dep chimaera.h-dep +CLEANFILES += chimaera.out + +###-------------------------------------------------------------------------- +### Other tests. + +TESTS += test +check_PROGRAMS += test +EXTRA_DIST += test.sod +nodist_test_SOURCES = test.c test.h +BUILT_SOURCES += $(nodist_test_SOURCES) +-include test.c-dep test.h-dep + +EXTRA_DIST += bad.sod bad.ref +bad.out: bad.sod $(SOD) + $(SOD) -tc $(srcdir)/bad.sod >bad.raw-out 2>bad.raw-err; rc=$$?; \ + { sed 's/^/| /' bad.raw-out; \ + sed 's/^/* /; s,$(srcdir)/,test/,' bad.raw-err; \ + echo "; rc = $$rc"; } >$@.new && \ + mv $@.new $@ +check-local:: bad.out + diff -u $(srcdir)/bad.ref bad.out +CLEANFILES += bad.raw-out bad.raw-err bad.out + +check_PROGRAMS += kwtest +EXTRA_DIST += kwtest.ref +kwtest.out: kwtest$(EXEEXT) + ./kwtest >kwtest.out +check-local:: kwtest.out kwtest.ref + diff -u $(srcdir)/kwtest.ref kwtest.out +CLEANFILES += kwtest.out + +check_PROGRAMS += rat +EXTRA_DIST += rat.sod rat.ref +nodist_rat_SOURCES = rat.c rat.h +BUILT_SOURCES += $(nodist_rat_SOURCES) +rat.out: rat$(EXEEXT) + ./rat >rat.out +check-local:: rat.out rat.ref + diff -u $(srcdir)/rat.ref rat.out +-include rat.c-dep rat.h-dep +CLEANFILES += rat.out + +check_PROGRAMS += kwbench +kwbench_SOURCES = kwbench.c kwbench-back.c kwbench.h ###----- That's all, folks --------------------------------------------------