One of the newly added tests fails like this on the shell side:

$ GNULIB_TOOL_IMPL=sh ./test-cache-2-26.sh
gnulib-tool: option --conditional-dependencies is not supported with 
--with-tests
FAIL: gnulib-tool exited with code 1.
$ GNULIB_TOOL_IMPL=py ./test-cache-2-26.sh
diff: ./test-cache-2-26.result: No such file or directory
FAIL: gnulib-tool's result has unexpected differences.

The error "option --conditional-dependencies is not supported with --with-tests"
is not longer justified since the 2017-12-28 patch. (There were two instances
of this error message, and I mistakenly removed only one of them.)

This patch fixes it.


2024-04-12  Bruno Haible  <br...@clisp.org>

        gnulib-tool.sh: Accept conditional dependencies with tests.
        * gnulib-tool.sh (func_import): Don't reject the combination of
        gl_CONDITIONAL_DEPENDENCIES and gl_WITH_TESTS.

diff --git a/gnulib-tool.sh b/gnulib-tool.sh
index 507607376f..5f0c6f530e 100755
--- a/gnulib-tool.sh
+++ b/gnulib-tool.sh
@@ -5278,11 +5278,6 @@ func_import ()
     if test -z "$vc_files"; then
       vc_files="$cached_vc_files"
     fi
-    # Ensure constraints.
-    if test "$cond_dependencies" = true && $inctests; then
-      echo "gnulib-tool: option --conditional-dependencies is not supported 
with --with-tests" 1>&2
-      func_exit 1
-    fi
   fi
   # --without-*-tests options are not supported here.
   excl_cxx_tests=




Reply via email to