mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
Print status (one character per test) when not running selftest with --immediate.
This commit is contained in:
parent
05ea5e23cf
commit
beee9debea
@ -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($)
|
||||
|
Loading…
Reference in New Issue
Block a user