From 6ac132d70263dcad04057065c866d558b0405033 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 4 Mar 2010 23:18:26 -0800 Subject: [PATCH] List subsection in the condensed error output. --- unit_tests/run_tests.pl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/unit_tests/run_tests.pl b/unit_tests/run_tests.pl index 3e00852a..968bdafc 100755 --- a/unit_tests/run_tests.pl +++ b/unit_tests/run_tests.pl @@ -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; @@ -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++; }