diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-06-05 16:36:10 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-06-11 19:59:59 +0200 |
commit | 2e311fdac56f43998bb192418f617e6e7a6fc320 (patch) | |
tree | a66483595fcf396408a96d93b97beb3327eb3db5 /selftest | |
parent | ed61cc5419651437ae0b8eb7d3dd9c56c7627388 (diff) | |
download | samba-2e311fdac56f43998bb192418f617e6e7a6fc320.tar.gz samba-2e311fdac56f43998bb192418f617e6e7a6fc320.tar.bz2 samba-2e311fdac56f43998bb192418f617e6e7a6fc320.zip |
selftest/subunit: Remove open_tests argument from parse_results.
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/Subunit.pm | 8 | ||||
-rw-r--r-- | selftest/Subunit/Filter.pm | 11 | ||||
-rwxr-xr-x | selftest/filter-subunit.pl | 2 | ||||
-rwxr-xr-x | selftest/format-subunit.pl | 2 |
4 files changed, 6 insertions, 17 deletions
diff --git a/selftest/Subunit.pm b/selftest/Subunit.pm index 71d65f0ee5..16aab73926 100644 --- a/selftest/Subunit.pm +++ b/selftest/Subunit.pm @@ -23,14 +23,14 @@ require Exporter; use strict; -sub parse_results($$$$) +sub parse_results($$$) { - my ($msg_ops, $statistics, $fh, $open_tests) = @_; + my ($msg_ops, $statistics, $fh) = @_; my $unexpected_ok = 0; my $expected_fail = 0; my $unexpected_fail = 0; my $unexpected_err = 0; - my $orig_open_len = $#$open_tests; + my $open_tests = []; while(<$fh>) { if (/^test: (.+)\n/) { @@ -103,7 +103,7 @@ sub parse_results($$$$) } } - while ($#$open_tests > $orig_open_len) { + while ($#$open_tests+1 > 0) { $msg_ops->end_test(pop(@$open_tests), "error", 1, "was started but never finished!"); $statistics->{TESTS_ERROR}++; diff --git a/selftest/Subunit/Filter.pm b/selftest/Subunit/Filter.pm index 799b5dd7fb..3a9e4f9409 100644 --- a/selftest/Subunit/Filter.pm +++ b/selftest/Subunit/Filter.pm @@ -40,17 +40,6 @@ sub find_in_list($$) return undef; } -my $statistics = { - SUITES_FAIL => 0, - - TESTS_UNEXPECTED_OK => 0, - TESTS_EXPECTED_OK => 0, - TESTS_UNEXPECTED_FAIL => 0, - TESTS_EXPECTED_FAIL => 0, - TESTS_ERROR => 0, - TESTS_SKIP => 0, -}; - sub control_msg() { # We regenerate control messages, so ignore this diff --git a/selftest/filter-subunit.pl b/selftest/filter-subunit.pl index cbc078765e..912070a0d4 100755 --- a/selftest/filter-subunit.pl +++ b/selftest/filter-subunit.pl @@ -93,6 +93,6 @@ my $statistics = { my $msg_ops = new Subunit::Filter($opt_prefix, \@expected_failures); -parse_results($msg_ops, $statistics, *STDIN, []); +parse_results($msg_ops, $statistics, *STDIN); 0; diff --git a/selftest/format-subunit.pl b/selftest/format-subunit.pl index acaac697aa..77e4b34f38 100755 --- a/selftest/format-subunit.pl +++ b/selftest/format-subunit.pl @@ -92,7 +92,7 @@ if ($opt_format eq "buildfarm") { die("Invalid output format '$opt_format'"); } -my $expected_ret = parse_results($msg_ops, $statistics, *STDIN, []); +my $expected_ret = parse_results($msg_ops, $statistics, *STDIN); $msg_ops->summary(); |