You should have this in your configure.ac:
AC_REQUIRE_AUX_FILE([tap-driver.sh])
...
AC_PROG_AWK
And this in your Makefile.am:
check_PROGRAMS = test_runner
test_runner_SOURCES = main.cpp
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
$(top_srcdir)/tap-driver.sh
TESTS = test_runner
The LOG_DRIVER
variable is what makes it invoke the tap-driver.sh
script, otherwise the default generic test driver is used. You can optionally define specific drivers for each file extension (say, one for .py, another for .sh, etc), but in this case, a single global LOG_DRIVER
is enough.
UPDATE for automake 1.15
As user ecerulm pointed out, tap-driver.pl
is being deprecated, so I changed the answer to consider only tap-driver.sh
.