diff options
author | justdave%syndicomm.com <> | 2001-09-01 12:06:13 +0200 |
---|---|---|
committer | justdave%syndicomm.com <> | 2001-09-01 12:06:13 +0200 |
commit | fe6d2a3abbaf4e8c10b04aab02c69c1b8c88b470 (patch) | |
tree | 6d7144eedf3b2d42906eca197772e6818dc2a64e /t | |
parent | 415a5d128205e8d6b6749f962cf25c81316389f9 (diff) | |
download | bugzilla-fe6d2a3abbaf4e8c10b04aab02c69c1b8c88b470.tar.gz bugzilla-fe6d2a3abbaf4e8c10b04aab02c69c1b8c88b470.tar.xz |
Added a --verbose option to runtests.sh that the tinderbox scripts can use to get all the warnings and errors and whatnot into the build log. Also corrected several syntax and logic errors in the 1.t test file.
Diffstat (limited to 't')
-rw-r--r-- | t/1.t | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -48,7 +48,7 @@ BEGIN { use_ok('RelationSet'); } BEGIN { use_ok('Bug'); } # and now we test the scripts -@testitems = qw( +@testitems = split("\n",qq( bug_form.pl #4 buglist.cgi #5 changepassword.cgi #6 @@ -97,20 +97,26 @@ token.cgi #48 userprefs.cgi #49 whineatnews.pl #50 xml.cgi #51 -); +)); our $warnings; +my $verbose = $::ENV{VERBOSE}; $perlapp='/usr/bonsaitools/bin/perl'; foreach $file (@testitems) { + $file =~ s/\s.*$//; # nuke everything after the first space (#comment) + next if (!$file); # skip null entries $command = "$perlapp"." -c $file 2>&1"; $loginfo=`$command`; # print '@@'.$loginfo.'##'; if ($loginfo =~ /syntax ok$/im) { $warnings{$_} = 1 foreach ($loginfo =~ /\((W.*?)\)/mg); - if ($1) { ok(0,$file."--WARNING"); } - else { - ok(1,$file."--ERROR-AND-WARNING-FREE"); + if ($1) { + if ($verbose) { print STDERR $loginfo; } + ok(0,$file."--WARNING"); + } else { + ok(1,$file); } } else { + if ($verbose) { print STDERR $loginfo; } ok(0,$file."--ERROR"); - } + } } |