summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-09-21 22:26:44 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-21 22:26:44 +0200
commitbeee9debeab72ce172575be6a93f1fb712bb6026 (patch)
tree9cf67d00afc45b55bd8fd234f3732d43cf67c2f3
parent05ea5e23cf4e70de0bd658b1c5c0ead133967091 (diff)
downloadsamba-beee9debeab72ce172575be6a93f1fb712bb6026.tar.gz
samba-beee9debeab72ce172575be6a93f1fb712bb6026.tar.bz2
samba-beee9debeab72ce172575be6a93f1fb712bb6026.zip
Print status (one character per test) when not running selftest with --immediate.
-rw-r--r--source4/selftest/output/plain.pm23
1 files changed, 19 insertions, 4 deletions
diff --git a/source4/selftest/output/plain.pm b/source4/selftest/output/plain.pm
index 4bec4e0fdc..bad6505e93 100644
--- a/source4/selftest/output/plain.pm
+++ b/source4/selftest/output/plain.pm
@@ -48,10 +48,7 @@ sub start_testsuite($$)
if ($self->{immediate}) {
print "$out\n";
} else {
- require Term::ReadKey;
- my ($wchar, $hchar, $wpixels, $hpixels) = Term::ReadKey::GetTerminalSize();
- foreach (1..$wchar) { $out.= " "; }
- print "\r".substr($out, 0, $wchar);
+ print "$out: ";
}
}
@@ -94,6 +91,13 @@ sub end_testsuite($$$$$)
$out .= $self->{test_output}->{$name};
}
+ if (not $self->{immediate}) {
+ if (not $unexpected) {
+ $out .= " ok\n";
+ } else {
+ $out .= " " . uc($result) . "\n";
+ }
+ }
print $out;
}
@@ -120,6 +124,10 @@ sub end_test($$$$$)
unless ($unexpected) {
$self->{test_output}->{$self->{NAME}} = "";
+ if ($result eq "failure") { print "f"; }
+ elsif ($result eq "skip") { print "s"; }
+ elsif ($result eq "success") { print "."; }
+ else { print "?($result)"; }
return;
}
@@ -133,6 +141,13 @@ sub end_test($$$$$)
print $self->{test_output}->{$self->{NAME}};
$self->{test_output}->{$self->{NAME}} = "";
}
+
+ if (not $self->{immediate}) {
+ if ($result eq "error") { print "E"; }
+ elsif ($result eq "failure") { print "F"; }
+ elsif ($result eq "success") { print "S"; }
+ else { print "?"; }
+ }
}
sub summary($)