$fh->open($test) or print "can't open $test. $!\n";
my $first = <$fh>;
my $s = $switches;
+ $s .= " $ENV{'HARNESS_PERL_SWITCHES'}"
+ if exists $ENV{'HARNESS_PERL_SWITCHES'};
$s .= join " ", q[ "-T"], map {qq["-I$_"]} @INC
if $first =~ /^#!.*\bperl.*-\w*T/;
$fh->close or print "can't close $test. $!\n";
the moment runtests() was called. Putting absolute path into
C<HARNESS_FILELEAK_IN_DIR> may give more predicatable results.
+The value of C<HARNESS_PERL_SWITCHES> will be prepended to the
+switches used to invoke perl on each test. For example, setting
+C<HARNESS_PERL_SWITCHES> to "-W" will run all tests with all
+warnings enabled.
+
Harness sets C<HARNESS_ACTIVE> before executing the individual tests.
This allows the tests to determine if they are being executed through the
harness or by any other means.
$(PERLEXE) -I..\lib harness
cd ..\win32
+test-wide : test-prep
+ set HARNESS_PERL_SWITCHES=-C
+ cd ..\t
+ $(PERLEXE) -I..\lib harness
+ cd ..\win32
+
+test-wide-notty : test-prep
+ set PERL_SKIP_TTY_TEST=1
+ set HARNESS_PERL_SWITCHES=-C
+ cd ..\t
+ $(PERLEXE) -I..\lib harness
+ cd ..\win32
+
clean :
-@erase miniperlmain$(o)
-@erase $(MINIPERL)
test-notty : test-prep
set PERL_SKIP_TTY_TEST=1 && \
- cd ..\t && $(PERLEXE) -I.\lib harness
+ cd ..\t && $(PERLEXE) -I.\lib harness
+
+test-wide : test-prep
+ set HARNESS_PERL_SWITCHES=-C && \
+ cd ..\t && $(PERLEXE) -I..\lib harness
+
+test-wide-notty : test-prep
+ set PERL_SKIP_TTY_TEST=1 && \
+ set HARNESS_PERL_SWITCHES=-C && \
+ cd ..\t && $(PERLEXE) -I..\lib harness
clean :
-@erase miniperlmain$(o)