From: Michael Jeanson Date: Thu, 15 Feb 2024 18:42:56 +0000 (-0500) Subject: Use the configured 'kyua' binary to run the tests X-Git-Tag: RELEASE_1_4_5~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f58e41ce9d543688c3385c15a693dc9c60e1d193;p=thirdparty%2Fmlmmj.git Use the configured 'kyua' binary to run the tests 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 --- diff --git a/Makefile.am b/Makefile.am index 23c5c689..3d0c917d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -62,11 +62,11 @@ SUFFIXES = .sh # 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 diff --git a/configure.ac b/configure.ac index 7cc1efc9..e2b8ee0f 100644 --- a/configure.ac +++ b/configure.ac @@ -80,6 +80,10 @@ AC_CHECK_FUNCS([arc4random_uniform copy_file_range]) 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])