selftest/plain: Allow caller to not specify the number of expected
authorJelmer Vernooij <jelmer@samba.org>
Wed, 3 Jun 2009 15:16:25 +0000 (17:16 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 3 Jun 2009 15:16:25 +0000 (17:16 +0200)
testsuites to run.

selftest/output/plain.pm

index 26056038f53d0facf7c44fb35be83668343904f0..509e0669102f2d409fa7066066fe90434293adcd 100644 (file)
@@ -65,7 +65,11 @@ sub start_testsuite($$)
        $self->{test_output}->{$name} = "" unless($self->{verbose});
 
        my $out = "";
        $self->{test_output}->{$name} = "" unless($self->{verbose});
 
        my $out = "";
-       $out .= "[$self->{index}/$self->{totalsuites} in ".$duration."s";
+       $out .= "[$self->{index}";
+       if ($self->{totalsuites}) {
+               $out .= "/$self->{totalsuites}";
+       }
+       $out.= " in ".$duration."s";
        $out .= sprintf(", %d errors", ($#{$self->{suitesfailed}}+1)) if ($#{$self->{suitesfailed}} > -1);
        $out .= "] $name"; 
        if ($self->{immediate}) {
        $out .= sprintf(", %d errors", ($#{$self->{suitesfailed}}+1)) if ($#{$self->{suitesfailed}} > -1);
        $out .= "] $name"; 
        if ($self->{immediate}) {