The configure script uses 'AC_PATH_PROG' to find a kyua binary, use it
in the Makefile to run the test suite.
Signed-off-by: Michael Jeanson <mjeanson@debian.org>
# Run the Kyua test suite when the 'check' target is invoked
check-local: $(check_SCRIPTS) $(check_PROGRAMS)
failed=no; \
- kyua --config='$(top_builddir)/kyua.conf' test \
+ $(KYUA) --config='$(top_builddir)/kyua.conf' test \
--kyuafile='$(top_srcdir)/Kyuafile' --build-root='$(top_builddir)' \
|| failed=yes; \
if [ "$${failed}" = yes ]; then \
- kyua report --results-file='$(abs_top_srcdir)' \
+ $(KYUA) report --results-file='$(abs_top_srcdir)' \
--verbose --results-filter=broken,failed; \
exit 1; \
fi
AS_IF([test x"$enable_tests" = xyes], [
PKG_CHECK_MODULES([ATF], [atf-c])
AC_PATH_PROG([KYUA], [kyua])
+
+ AS_IF([test "x$KYUA" == "x"], [
+ AC_MSG_ERROR([A 'kyua' binary is required when the tests are enabled. Set the PATH or use the KYUA environment variable to specify its location.])
+ ])
])
AM_CONDITIONAL([WANT_TESTS], [test x"$enable_tests" = xyes])