README 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. The `check.mk' file in this directory will improve the behaviour of
  2. `make check' when using Automake. If you create one test program for
  3. each module you are testing in your program, then this will do this
  4. following:
  5. 1) Allow tests to be compiled and run in parallel
  6. 2) Only recompile and rerun test programs when the sources change
  7. 3) Produce a .log file with the output from each test
  8. 4) Only display the contents of .log files for failed tests
  9. 5) Print either a red or green status message at the end according to
  10. whether some tests failed or all tests passed
  11. Modifications to your project should be minimal. A working example
  12. can be found in libspmt, here:
  13. https://svn.sable.mcgill.ca/sable/spmt/libspmt/tests/
  14. First, copy check.mk to trunk/build-aux/check.mk
  15. Second, add the following lines to tests/Makefile.am after `TESTS' and
  16. `check_PROGRAMS' are defined:
  17. -----
  18. # quiet errors re: check.mk not knowing how to create .log
  19. .log:
  20. LAZY_TEST_SUITE = 1
  21. TEST_LOGS = $(TESTS:=.log)
  22. # improved make check
  23. include $(top_srcdir)/build-aux/check.mk
  24. -----
  25. Third, rebuild and test with `make check'.