[darcs-devel] Re: need perl help with the test environment

Junio C Hamano junkio at cox.net
Sun Apr 10 11:51:27 PDT 2005


>>>>> "TP" == Tommy Pettersson <ptp at lysator.liu.se> writes:

TP> Another option might be to change in the makefile to:

TP>   test_perl:    darcs
TP>           @cd tests && perl perl_harness *.pl

TP> and make a (rather short) perl_harness that loads the modules,
TP> sets the environment variables and then just calls runtests.
TP> ...
TP> What do you think?

That sounds cleaner.  Something along these lines?

--- GNUmakefile
+++ GNUmakefile
@@ -192,7 +192,7 @@
 test check:    test_unit test_perl test_shell
 
 test_perl:     darcs
-	@cd tests && perl -Ilib/perl -MTest::Harness -e 'runtests @ARGV' *.pl
+	@cd tests && perl perl_harness *.pl
 
 test_unit:     darcs unit
 	./unit


--- tests/perl_harness
+++ tests/perl_harness
@@ -0,0 +1,8 @@
+#!/usr/bin/perl -w
+
+use lib 'lib/perl';
+use Test::Harness;
+
+$ENV{DARCS_DONT_COLOR} = 1;
+$ENV{DARCS_DONT_ESCAPE_ANYTHING} = 1;
+runtests(@ARGV);





More information about the darcs-devel mailing list