]> git.draconx.ca Git - dxcommon.git/commitdiff
test-tap.at: Use PATH instead of hardcoding "$builddir/t"
authorNick Bowler <nbowler@draconx.ca>
Sat, 6 Jan 2024 20:36:59 +0000 (15:36 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sat, 6 Jan 2024 20:36:59 +0000 (15:36 -0500)
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
configure.ac
snippet/test-tap.at

index 0e5e20a45e2dd207b0b166a55864b401576e107d..be7305626f439b1dadd906283ad4580a28793e7d 100644 (file)
@@ -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
 
index 1910c73b18f611f86a86d42c3131c1050d2dcbd1..b10b6258a9e929887cae333a595ade8da5e2062a 100644 (file)
@@ -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 <getopt.h>], [dx_cv_have_struct_option],
index ee4b54138268b1d0b228018c609d2bb2aad79b3b..cf9554fa77546e984445344d4e3a50b6e87adff7 100644 (file)
@@ -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