I support the autoconf package and want to integrate automated testing. I use the Boost Unit Test Framework for my unit tests and have been able to successfully integrate it into the package.
That is, it can be compiled using make check , but it fails (although I read that make check compiles and runs tests). As a result, I have to run it manually after creating tests that are bulky.
Makefile.am in the test folder is as follows:
check_PROGRAMS = prog_test prog_test_SOURCES = test_main.cpp ../src/class1.cpp class1_test.cpp class2.cpp ../src/class2_test.cpp ../src/class3.cpp ../src/class4.cpp prog_test_LDADD = $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
Makefile.am in the root folder:
SUBDIRS = src test dist_doc_DATA = README ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
Running test/prog gives the result:
Running 4 test cases... *** No errors detected
(I don't think you need the contents of my test cases to answer my question, so I skipped them for now)
So, how can I get automake to run my tests every time I run make check ?
source share