diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-22 19:28:02 -0700 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-22 22:29:09 -0700 |
commit | 20c95cf6856b7d18784e8429d1ba31443a883d49 (patch) | |
tree | 4b7664dd18ffa73f7f80dec2acfd0a2e521fcf30 /selftest | |
parent | 3d0e6db9dc68aace8b2993faa45f48b3f5f4e855 (diff) | |
download | samba-20c95cf6856b7d18784e8429d1ba31443a883d49.tar.gz samba-20c95cf6856b7d18784e8429d1ba31443a883d49.tar.bz2 samba-20c95cf6856b7d18784e8429d1ba31443a883d49.zip |
selftest: Fix testsuite counts when running only a limited number of
testsuites.
Diffstat (limited to 'selftest')
-rwxr-xr-x | selftest/selftest.pl | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 6c0aab9d6b..4ed168cc37 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -686,18 +686,13 @@ if ($opt_load_list) { close(LOAD_LIST); } -Subunit::progress($#available+1); -Subunit::report_time(time()); - my $individual_tests = undef; $individual_tests = {}; foreach my $testsuite (@available) { my $name = $$testsuite[0]; my $skipreason = skip($name); - if (defined($skipreason)) { - Subunit::skip_testsuite($name, $skipreason); - } elsif (defined($restricted)) { + if (defined($restricted)) { # Find the testsuite for this test my $match = undef; foreach my $r (@$restricted) { @@ -711,9 +706,17 @@ foreach my $testsuite (@available) { $restricted_used->{$r} = 1; } } - push(@todo, $testsuite) if ($match); + if ($match) { + if (defined($skipreason)) { + Subunit::skip_testsuite($name, $skipreason); + } else { + push(@todo, $testsuite); + } + } + } elsif (defined($skipreason)) { + Subunit::skip_testsuite($name, $skipreason); } else { - push(@todo, $testsuite); + push(@todo, $testsuite); } } @@ -729,6 +732,10 @@ if (defined($restricted)) { } my $suitestotal = $#todo + 1; + +Subunit::progress($suitestotal); +Subunit::report_time(time()); + my $i = 0; $| = 1; |