unit_tests/run_tests.pl
changeset 889 d3ecff60a3f5
parent 888 3f13aefabfce
--- a/unit_tests/run_tests.pl	Thu Mar 04 23:15:10 2010 -0800
+++ b/unit_tests/run_tests.pl	Thu Mar 04 23:18:26 2010 -0800
@@ -124,7 +124,9 @@
         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 @@
             }
             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++;
         }