Author: jelmer Date: 2007-10-31 14:48:48 +0000 (Wed, 31 Oct 2007) New Revision: 25764
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25764 Log: Fix total number of tests count to not include skipped tests. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/selftest/output/html.pm branches/SAMBA_4_0/source/selftest/selftest.pl Changeset: Property changes on: branches/SAMBA_4_0 ___________________________________________________________________ Name: bzr:revision-info ...skipped... Name: bzr:file-ids ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/selftest/output/html.pm =================================================================== --- branches/SAMBA_4_0/source/selftest/output/html.pm 2007-10-31 05:14:31 UTC (rev 25763) +++ branches/SAMBA_4_0/source/selftest/output/html.pm 2007-10-31 14:48:48 UTC (rev 25764) @@ -256,7 +256,6 @@ my $st = $self->{statistics}; print INDEX "<tr>\n"; print INDEX " <td class=\"testSuiteTotal\">Total</td>\n"; - print INDEX " <td></td>\n"; if ($st->{SUITES_FAIL} == 0) { print INDEX " <td class=\"resultOk\">"; @@ -333,9 +332,9 @@ foreach (@{$summ->{skip_testsuites}}) { print SUMMARY "<tr>\n"; - print SUMMARY " <td>$$_[1]</td>\n"; - if (defined($$_[2])) { - print SUMMARY " <td>$$_[2]</td>\n"; + print SUMMARY " <td>$$_[0]</td>\n"; + if (defined($$_[1])) { + print SUMMARY " <td>$$_[1]</td>\n"; } else { print SUMMARY " <td></td>\n"; } Modified: branches/SAMBA_4_0/source/selftest/selftest.pl =================================================================== --- branches/SAMBA_4_0/source/selftest/selftest.pl 2007-10-31 05:14:31 UTC (rev 25763) +++ branches/SAMBA_4_0/source/selftest/selftest.pl 2007-10-31 14:48:48 UTC (rev 25764) @@ -203,15 +203,7 @@ { my ($name) = @_; - my $reason = find_in_list([EMAIL PROTECTED], $name); - - return $reason if $reason; - - return undef unless ($#includes > -1); - - return "not included" if (not find_in_list([EMAIL PROTECTED], $name)); - - return undef; + return find_in_list([EMAIL PROTECTED], $name); } sub getlog_env($); @@ -611,10 +603,35 @@ die("No testlists specified"); } -foreach (@testlists) { - push(@todo, read_testlist($_)); +my $msg_ops; +if ($opt_format eq "buildfarm") { + require output::buildfarm; + $msg_ops = new output::buildfarm($statistics); +} elsif ($opt_format eq "plain") { + require output::plain; + $msg_ops = new output::plain("$prefix/summary", $opt_verbose, $opt_immediate, $statistics); +} elsif ($opt_format eq "html") { + require output::html; + mkdir("test-results", 0777); + $msg_ops = new output::html("test-results", $statistics); +} else { + die("Invalid output format '$opt_format'"); } +foreach my $fn (@testlists) { + foreach (read_testlist($fn)) { + my $name = $$_[0]; + next if (@includes and not find_in_list([EMAIL PROTECTED], $name)); + my $skipreason = skip($name); + if ($skipreason) { + $msg_ops->skip_testsuite($name, $skipreason); + $statistics->{SUITES_SKIPPED}++; + } else { + push(@todo, $_); + } + } +} + if ($#todo == -1) { print STDERR "No tests to run\n"; exit(1); @@ -730,20 +747,6 @@ delete $running_envs{$envname}; } -my $msg_ops; -if ($opt_format eq "buildfarm") { - require output::buildfarm; - $msg_ops = new output::buildfarm($statistics); -} elsif ($opt_format eq "plain") { - require output::plain; - $msg_ops = new output::plain("$prefix/summary", $opt_verbose, $opt_immediate, $statistics); -} elsif ($opt_format eq "html") { - require output::html; - mkdir("test-results", 0777); - $msg_ops = new output::html("test-results", $statistics); -} else { - die("Invalid output format '$opt_format'"); -} if ($opt_no_lazy_setup) { setup_env($_) foreach (keys %required_envs); @@ -781,13 +784,6 @@ my $name = $$_[0]; my $envname = $$_[1]; - my $skipreason = skip($name); - if ($skipreason) { - $msg_ops->skip_testsuite($name, $skipreason); - $statistics->{SUITES_SKIPPED}++; - next; - } - my $envvars = setup_env($envname); if (not defined($envvars)) { $statistics->{SUITES_SKIPPED}++;
