]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Use the configured 'kyua' binary to run the tests
authorMichael Jeanson <mjeanson@debian.org>
Thu, 15 Feb 2024 18:42:56 +0000 (13:42 -0500)
committerMichael Jeanson <mjeanson@debian.org>
Fri, 1 Mar 2024 19:54:26 +0000 (14:54 -0500)
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>
Makefile.am
configure.ac

index 23c5c689a202c4091c002c3ab58728aba12a5b67..3d0c917d4f57182c9c24c1f0e1d2c15d2c30cc32 100644 (file)
@@ -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
index 7cc1efc99ef0a40b13f809b4030ffbb512946a8d..e2b8ee0ff7fd68840be480c1a7042bb9e1782a27 100644 (file)
@@ -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])