From 1b16aa3d211885a5b8f761115005db5b30752225 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Wed, 14 Jun 2023 14:02:40 +0200 Subject: [PATCH] testing: run nbft-test.sh only if jq is available Execute nbft-test.sh in make check only when nbft is enabled and also the jq utility is available. --- configure.ac | 2 ++ testing/Makefile.am | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 6c35b2d09..3032fbcf6 100644 --- a/configure.ac +++ b/configure.ac @@ -238,6 +238,8 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_MKDIR_P AC_PROG_LIBTOOL +AC_PATH_PROG(JQ, jq) +AM_CONDITIONAL([nbft_test], [test "x$enable_nbft" = "xyes" -a "x$JQ" != "x"]) # Checks for libraries. AC_CHECK_LIB([dl], [dlopen], [LIBDL_LIBS="-ldl"],[ diff --git a/testing/Makefile.am b/testing/Makefile.am index dc2ce62ec..8ad8b0021 100644 --- a/testing/Makefile.am +++ b/testing/Makefile.am @@ -52,8 +52,11 @@ EXTRA_DIST = ibft xpath \ TESTS = socket-mock-test \ bitmask-test \ bitmap-test \ - nbft-test.sh \ json-test \ ptr_array-test +if nbft_test +TESTS += nbft-test.sh +endif + # vim: ai