diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-06-05 16:10:12 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-06-11 19:59:59 +0200 |
commit | 68578d6374236e0606b21f5168956c3a515b7b0c (patch) | |
tree | 5bdb214f3da7fc4a494b22c6bcfb0d6e281b9e35 /selftest/output | |
parent | e979560c134b70954a167ecdc6aad957763c8006 (diff) | |
download | samba-68578d6374236e0606b21f5168956c3a515b7b0c.tar.gz samba-68578d6374236e0606b21f5168956c3a515b7b0c.tar.bz2 samba-68578d6374236e0606b21f5168956c3a515b7b0c.zip |
selftest: Fix handling of testsuite, reintroduce progress indication.
Diffstat (limited to 'selftest/output')
-rw-r--r-- | selftest/output/plain.pm | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/selftest/output/plain.pm b/selftest/output/plain.pm index 2427136073..bfdced2936 100644 --- a/selftest/output/plain.pm +++ b/selftest/output/plain.pm @@ -1,6 +1,6 @@ #!/usr/bin/perl # Plain text output for selftest -# Copyright (C) 2008 Jelmer Vernooij <jelmer@samba.org> +# Copyright (C) 2008-2009 Jelmer Vernooij <jelmer@samba.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -41,6 +41,12 @@ sub new($$$$$$$) { bless($self, $class); } +sub testsuite_count($$) +{ + my ($self, $count) = @_; + $self->{totalsuites} = $count; +} + sub report_time($$) { my ($self, $time) = @_; @@ -101,23 +107,21 @@ sub control_msg($$) #$self->output_msg($output); } -sub end_testsuite($$$$$) +sub end_testsuite($$$$) { - my ($self, $name, $result, $unexpected, $reason) = @_; + my ($self, $name, $result, $reason) = @_; my $out = ""; + my $unexpected = 0; - if ($unexpected) { - if ($result eq "success" and not defined($reason)) { - $reason = "Expected negative exit code, got positive exit code"; - } + if ($result eq "success" or $result eq "xfail") { + $self->{suites_ok}++; + } else { $self->output_msg("ERROR: $reason\n"); push (@{$self->{suitesfailed}}, $name); - } else { - $self->{suites_ok}++; - } - - if ($unexpected and $self->{immediate} and not $self->{verbose}) { - $out .= $self->{test_output}->{$name}; + if ($self->{immediate} and not $self->{verbose}) { + $out .= $self->{test_output}->{$name}; + } + $unexpected = 1; } if (not $self->{immediate}) { |