From 20ede98a35fe28eed9cf1c827235d800647c8cb4 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 14 Nov 2006 17:42:20 +0000 Subject: [PATCH] Make .t files work with prove, where $cwd may be a parent directory. Won't work if you give prove an absolute path to the .t file though... --- src/libCom/test/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libCom/test/Makefile b/src/libCom/test/Makefile index 265d3b58d..d8729a3de 100644 --- a/src/libCom/test/Makefile +++ b/src/libCom/test/Makefile @@ -157,7 +157,8 @@ test: $(TEST_SCRIPTS) @$(CP) $< $@ # Some versions of Test::Harness expect test programs in perl only. -# Generate a 1-line test program to run the real test binary +# Generate a 1-line perl program to exec the real test binary. +# Uses the $0 runtime path to itself to find the executable. %.t: %$(EXE) @$(RM) $@ - @echo 'exec "./$<";' >$@ + @echo '($$e=$$0)=~s/.t$$/$(EXE)/;exec "./$$e" or die "exec failed";'>$@