From 5255b0884bd50f2e96d2cbd5951cb4ef98eece5d Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Sat, 6 Jan 2024 15:36:59 -0500 Subject: [PATCH] test-tap.at: Use PATH instead of hardcoding "$builddir/t" Hardcoding "$builddir/t" doesn't work at all if VPATH builds need to run programs in "$srcdir", which we do now need. Generally PATH lookups are more flexible in Autotest and work out much better. Technically this is a change in behaviour so some downstream projects may need to be updated. --- Makefile.am | 4 ++-- configure.ac | 2 +- snippet/test-tap.at | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0e5e20a..be73056 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,8 +12,8 @@ EXTRA_DIST = scripts/fix-gnulib.pl scripts/fix-ltdl.pl \ scripts/bake-config.awk scripts/gen-options.awk \ scripts/gen-strtab.awk scripts/gen-tree.awk scripts/join.awk \ scripts/pe-subsys.awk src/copysym.h src/help.h src/pack.h \ - src/tap.h t/getopt/getopt.h t/nls/gettext.h t/nls/mbswidth.h \ - tests/data/gnulib.mk + src/tap.h t/tapcheck.sh t/getopt/getopt.h t/nls/gettext.h \ + t/nls/mbswidth.h tests/data/gnulib.mk check_LIBRARIES = t/libdummy.a t/libempty.a diff --git a/configure.ac b/configure.ac index 1910c73..b10b625 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,7 @@ AC_SUBST([STUB_INCLUDES], [@&t@]) AC_CHECK_FUNCS_ONCE([wcwidth]) AM_CONDITIONAL([HAVE_WCWIDTH], [test x"$ac_cv_func_wcwidth" = x"yes"]) -AC_CONFIG_TESTDIR([.]) +AC_CONFIG_TESTDIR([.], [t:$srcdir/t]) DX_PROG_AUTOTEST_AM AC_CACHE_CHECK([for struct option in ], [dx_cv_have_struct_option], diff --git a/snippet/test-tap.at b/snippet/test-tap.at index ee4b541..cf9554f 100644 --- a/snippet/test-tap.at +++ b/snippet/test-tap.at @@ -17,9 +17,9 @@ m4_defun([_TEST_TAP_PREPARE], [m4_divert_push([PREPARE_TESTS])dnl # Run a test program, and, if prove is installed, use it to interpret the # TAP-formatted output. test_run_tap () { - program=$[1]; shift + program=$[1] - "$builddir/t/$program" "$[@]" >"$program.tap" + "$[@]" >"$program.tap" status=$? cat "$program.tap" # Older versions of prove do not support the -e option so the -- 2.43.2