]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
nlcanon tests: Fix last commit.
authorBruno Haible <bruno@clisp.org>
Mon, 4 Aug 2025 23:20:58 +0000 (01:20 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 4 Aug 2025 23:20:58 +0000 (01:20 +0200)
* tests/init.sh (setup_): Revert last change.
* modules/test-framework-sh (Makefile.am): Augment TESTS_ENVIRONMENT
here.
* modules/nlcanon-tests (Makefile.am): Don't augment TESTS_ENVIRONMENT
here.

ChangeLog
modules/nlcanon-tests
modules/test-framework-sh
tests/init.sh

index c9ef6c7cef02ba049ab276ff27bb0f5d09953234..ab88105b472b44aeecbbba31fe337d39cd92c4b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2025-08-04  Bruno Haible  <bruno@clisp.org>
+
+       nlcanon tests: Fix last commit.
+       * tests/init.sh (setup_): Revert last change.
+       * modules/test-framework-sh (Makefile.am): Augment TESTS_ENVIRONMENT
+       here.
+       * modules/nlcanon-tests (Makefile.am): Don't augment TESTS_ENVIRONMENT
+       here.
+
 2025-08-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        vma-iter: pacify Coverity Scan
index bfcecda38e2daccd92b7eb81277a36c9810fcf2e..23a733e628653b27be4d1d57ddf86aa5978959a8 100644 (file)
@@ -6,5 +6,3 @@ test-framework-sh
 
 Makefile.am:
 TESTS += test-nlcanon.sh
-TESTS_ENVIRONMENT += \
-  top_builddir='@top_builddir@'
index 249f426608b78848ef949a7375bcb16170191103..2a10d461ff186cd5960bde57c0f6d834c94986fd 100644 (file)
@@ -9,6 +9,12 @@ Depends-on:
 configure.ac:
 
 Makefile.am:
+# The value of top_builddir, determined by Autoconf and stored in the Makefile,
+# consists of n times '..', where n is the depth of the $(srcdir) under
+# $(top_srcdir). Here we need one more '..', because the test framework
+# (init.sh) arranges to run the tests in a subdirectory of depth 1 under the
+# directory where the Makefile sits.
+TESTS_ENVIRONMENT += top_builddir='../@top_builddir@'
 
 Include:
 
index d3ce11dbee4b5a9609af23590093311062c35bea..d695020545f3b48304c078a03dafa7da7c2fa9bb 100644 (file)
@@ -428,21 +428,13 @@ setup_ ()
   test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
     || fail_ "failed to create temporary directory in $initial_cwd_"
   cd "$test_dir_" || fail_ "failed to cd to temporary directory"
-  # Set variables srcdir, builddir, and optionally top_builddir,
-  # for the convenience of the test.
+  # Set variables srcdir, builddir, for the convenience of the test.
   case $srcdir in
     /* | ?:*) ;;
     *) srcdir="../$srcdir" ;;
   esac
   builddir=".."
   export srcdir builddir
-  if test -n "$top_builddir"; then
-    case $top_builddir in
-      /* | ?:*) ;;
-      *) top_builddir="../$top_builddir" ;;
-    esac
-    export top_builddir
-  fi
 
   # As autoconf-generated configure scripts do, ensure that IFS
   # is defined initially, so that saving and restoring $IFS works.