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...
This commit is contained in:
Andrew Johnson committed 2006-11-14 17:42:20 +00:00
1 parent e661027615
commit 20ede98a35
1 file changed
+3 -2
+3 -2
View File
@@ -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";'>$@