slight improvement to the error output of the test framework

This commit is contained in:
JT Smith 2005-11-17 05:51:36 +00:00
parent 62506c0592
commit 9fda810ad0
2 changed files with 35 additions and 4 deletions

View file

@ -42,6 +42,7 @@ closedir(DIR);
chdir("../t");
my $someTestFailed = 0;
my @failedModules;
foreach my $file (@files) {
next unless $file =~ m/^(.*?)\.t$/;
my $testType = $1;
@ -50,7 +51,8 @@ foreach my $file (@files) {
unless (system("$^X $file --configFile=$configFile")) {
print "All $testType tests were successful.\n";
} else {
$someTestFailed = 1;
push(@failedModules,$testType);
$someTestFailed++;
print "----------------------------\n";
print "Some $testType tests failed!\n";
print "----------------------------\n";
@ -58,5 +60,13 @@ foreach my $file (@files) {
}
print "\n";
}
if ($someTestFailed) {
print "\n\n";
print "---------------------------------------\n";
print " $someTestFailed test modules experienced failures:\n";
print "\t".join("\n\t",@failedModules)."\n";
print "---------------------------------------\n";
print "\n\n";
}
exit $someTestFailed;