Skip to content

Commit

Permalink
List subsection in the condensed error output.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 5, 2010
1 parent eae869e commit 6ac132d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions unit_tests/run_tests.pl
Expand Up @@ -124,7 +124,9 @@ sub compare_files {
my $d = "$module/$testtype";
next if (not -d $d); # no tests at the moment.
opendir(TESTDIR, $d) || die("Failed to open dir '$d': $!\n");
print(" ... $module / $testtype ...\n");
my $subsection = " ... $module / $testtype ...\n";
print($subsection);
my $addedsubsection = 0;
my $fname = readdir(TESTDIR);
while (defined $fname) {
my $isfail = 0;
Expand Down Expand Up @@ -153,7 +155,14 @@ sub compare_files {
}
my $output = "$result ${origfname}${reason}\n";
print($output);
push(@fails, $output) if $isfail;

if ($isfail) {
if (!$addedsubsection) {
$addedsubsection = 1;
push(@fails, $subsection);
}
push(@fails, $output);
}

$totaltests++;
}
Expand Down

0 comments on commit 6ac132d

Please sign in to comment.