]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Don't rely on the TEST_VERBOSE environment variable (no longer exported from runtests...
authorjake%acutex.net <>
Thu, 25 Oct 2001 01:41:49 +0000 (01:41 +0000)
committerjake%acutex.net <>
Thu, 25 Oct 2001 01:41:49 +0000 (01:41 +0000)
runtests.sh
t/001compile.t
t/002goodperl.t
t/003safesys.t
t/004template.t
t/005no_tabs.t

index ab18e2e00448c9eb9056651203874439156eb8a8..7b67b17616635de32d15f0209fccc041261df1da 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/sh
 
-export TEST_VERBOSE=0
+TEST_VERBOSE=0
 PART1='use Test::Harness qw(&runtests $verbose); $verbose='
 PART2='; runtests @ARGV;'
 for f in $*; do
   if [ $f == "--verbose" ] ; then
-    export TEST_VERBOSE=1
+    TEST_VERBOSE=1
   fi
 done
 
index c297241dfb14315a9787606d5b18fbea1de3ba27..4fc5686625db72730b77d71e27f4b21f4b128d14 100644 (file)
@@ -45,8 +45,9 @@ use strict;
 
 # First now we test the scripts                                                   
 my @testitems = @Support::Files::testitems; 
-#my %warnings;
-my $verbose = $::ENV{TEST_VERBOSE};
+# Capture the TESTERR from Test::More for printing errors.
+# This will handle verbosity for us automatically
+*TESTOUT = \*Test::More::TESTOUT;
 my $perlapp = $^X;
 
 foreach my $file (@testitems) {
@@ -63,15 +64,14 @@ foreach my $file (@testitems) {
         my $loginfo=`$command`;
         #print '@@'.$loginfo.'##';
         if ($loginfo =~ /syntax ok$/im) {
-#                $warnings{$_} = 1 foreach ($loginfo =~ /\((W.*?)\)/mg);
                 if ($loginfo ne "$file syntax OK\n") {
-                        if ($verbose) { print STDERR $loginfo; }
+                        print TESTOUT $loginfo;
                         ok(0,$file."--WARNING");
                 } else {
                         ok(1,$file);
                 }
         } else {
-                if ($verbose) { print STDERR $loginfo; }
+                print TESTOUT $loginfo;
                 ok(0,$file."--ERROR");
         }
 }      
index 3615d489a6ef7580bdd5025ebd54ecba14abe24e..9047e09ff59b38254c2cc0cdc6dd40d4dfd37f45 100644 (file)
@@ -44,7 +44,6 @@ BEGIN { use Test::More tests => $tests; }
 use strict;
 
 my @testitems = @Support::Files::testitems; # get the files to test.
-my $verbose = $::ENV{TEST_VERBOSE};
 
 foreach my $file (@testitems) {
         $file =~ s/\s.*$//; # nuke everything after the first space (#comment)
index 94d137aa97ec3580e33b9eeba339d8c2bdc38ef8..98e9d2d64bea9a746dc579e364b930bde8978e38 100644 (file)
@@ -44,7 +44,9 @@ BEGIN { use Test::More tests => $tests; }
 use strict;
 
 my @testitems = @Support::Files::testitems; 
-my $verbose = $::ENV{TEST_VERBOSE};
+# Capture the TESTERR from Test::More for printing errors.
+# This will handle verbosity for us automatically
+*TESTOUT = \*Test::More::TESTOUT;
 my $perlapp = $^X;
 
 foreach my $file (@testitems) {
@@ -54,7 +56,7 @@ foreach my $file (@testitems) {
         my $loginfo=`$command`;
         if ($loginfo =~ /arguments for Support::Systemexec::(system|exec)/im) {
                 ok(0,"$file DOES NOT use proper system or exec calls");
-                if ($verbose) { print STDERR $loginfo; }
+                print TESTOUT $loginfo;
         } else {
                 ok(1,"$file uses proper system and exec calls");
         }
index f66176a7217564c049570801a3b0c4ce0ed9a418..92d9c511c97151aabbfeb32844e940d65d3f1488 100644 (file)
@@ -34,7 +34,6 @@ use Template;
 
 my @testitems = @Support::Templates::testitems;
 my $include_path = $Support::Templates::include_path;
-my $verbose = $::ENV{TEST_VERBOSE};
 
 # Check to make sure all templates that are referenced in
 # Bugzilla exist in the proper place.
index 66b2af5d613ea499c94522eb4a369b3901b4dded..e420baaaaab2c686691a77b16685213eaeffcf35 100644 (file)
@@ -32,7 +32,6 @@ BEGIN { use Test::More tests => $tests; }
 use strict;
 
 my @testitems = @Support::Files::testitems;
-my $verbose = $::ENV{TEST_VERBOSE};
 
 foreach my $file (@testitems) {
     open (FILE, "$file");