This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
authorNicholas Clark <nick@ccl4.org>
Wed, 22 Oct 2003 18:32:17 +0000 (18:32 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 22 Oct 2003 18:32:17 +0000 (18:32 +0000)
[ 21515]
Add a test.taintwarn makefile target,
to run the whole test suite with the -t switch.
p4raw-link: @21515 on //depot/perl: b26492eee9e9f6169aa5698b42a13506468cb846

p4raw-id: //depot/maint-5.8/perl@21518
p4raw-integrated: from //depot/perl@21517 'copy in' Makefile.SH
(@20832..) t/TEST (@20993..) pod/perlhack.pod (@21198..)

Makefile.SH
pod/perlhack.pod
t/TEST

index 2245f6e..713b2a3 100644 (file)
@@ -1055,7 +1055,7 @@ makedepend: makedepend.SH config.sh
        utest ucheck test.utf8 check.utf8 test.torture torturetest \
        test.third check.third utest.third ucheck.third test_notty.third \
        test.deparse test_notty.deparse test_harness test_harness_notty \
-       test.bytecompile minitest coretest
+       test.bytecompile minitest coretest test.taintwarn
 
 # Cannot delegate rebuilding of t/perl to make
 # to allow interlaced test and minitest
@@ -1155,6 +1155,11 @@ test.deparse:    test_prep
 test_notty.deparse:    test_prep
        PERL=./perl TEST_ARGS=-deparse $(MAKE) _test_notty
 
+# Targets to run the test suite with -t
+
+test.taintwarn:        test_prep
+       PERL=./perl TEST_ARGS=-taintwarn $(MAKE) _test
+
 # Can't depend on lib/Config.pm because that might be where miniperl
 # is crashing.
 minitest: miniperl$(EXE_EXT) lib/re.pm
index c815177..5d746ac 100644 (file)
@@ -1810,7 +1810,12 @@ Run F<perl> on all core tests (F<t/*> and F<lib/[a-z]*> pragma tests).
 
 =item test.deparse
 
-Run all the tests through the B::Deparse.  Not all tests will succeed.
+Run all the tests through B::Deparse.  Not all tests will succeed.
+
+=item test.taintwarn
+
+Run all tests with the B<-t> command-line switch.  Not all tests
+are expected to succeed (until they're specifically fixed, of course).
 
 =item minitest
 
diff --git a/t/TEST b/t/TEST
index 5885060..08787e2 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -21,8 +21,9 @@ if ($#ARGV >= 0) {
        $verbose = 1 if $1 eq 'v';
        $torture = 1 if $1 eq 'torture';
        $with_utf= 1 if $1 eq 'utf8';
-        $bytecompile = 1 if $1 eq 'bytecompile';
-        $compile = 1 if $1 eq 'compile';
+       $bytecompile = 1 if $1 eq 'bytecompile';
+       $compile = 1 if $1 eq 'compile';
+       $taintwarn = 1 if $1 eq 'taintwarn';
        if ($1 =~ /^deparse(,.+)?$/) {
            $deparse = 1;
            $deparse_opts = $1;
@@ -220,7 +221,13 @@ EOT
            $switch = qq{"-$1"};
        }
        else {
-           $switch = '';
+           if ($taintwarn) {
+               # not all tests are expected to pass with this option
+               $switch = '"-t"';
+           }
+           else {
+               $switch = '';
+           }
        }
 
         my $test_executable; # for 'compile' tests