diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-18 21:52:23 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-18 21:52:23 +0100 |
commit | b136033421eb045b28f5928e4d2f9604cf704690 (patch) | |
tree | f8e7df1b8a424810d1e4fcaa7ac1e55640083647 /source4 | |
parent | 984d7d84225f1fc4747dd2837623023e30a8ba36 (diff) | |
download | samba-b136033421eb045b28f5928e4d2f9604cf704690.tar.gz samba-b136033421eb045b28f5928e4d2f9604cf704690.tar.bz2 samba-b136033421eb045b28f5928e4d2f9604cf704690.zip |
When not using --immediate, use a one-line progress indicator in selftest.
(This used to be commit 16b4af184187f29f1f710609ee37029a3f15a294)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/selftest/output/plain.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/selftest/output/plain.pm b/source4/selftest/output/plain.pm index 1e6dead326..e491a999ab 100644 --- a/source4/selftest/output/plain.pm +++ b/source4/selftest/output/plain.pm @@ -46,8 +46,15 @@ sub start_testsuite($$) my $out = ""; $out .= "[$self->{index}/$self->{totalsuites} in ".$duration."s"; $out .= sprintf(", %d errors", ($#{$self->{suitesfailed}}+1)) if ($#{$self->{suitesfailed}} > -1); - $out .= "] $name\n", - print "$out"; + $out .= "] $name"; + 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); + } } sub output_msg($$) |