summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-10-26 21:15:04 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:43:38 +0100
commite690c56ab7180f135ba0e67a24f53282c3f0d144 (patch)
treec467e0ce9aae18c2d6fbc202ed1894c163d8ce38 /source4
parent90964021eb10264b3df6be9e9d1ea7ab45c7c1da (diff)
downloadsamba-e690c56ab7180f135ba0e67a24f53282c3f0d144.tar.gz
samba-e690c56ab7180f135ba0e67a24f53282c3f0d144.tar.bz2
samba-e690c56ab7180f135ba0e67a24f53282c3f0d144.zip
r25741: Simplify calls to Subunit functions.
(This used to be commit e42de5d8346a12c3fcdb8f9af1efa650c368a442)
Diffstat (limited to 'source4')
-rw-r--r--source4/selftest/output/buildfarm.pm11
-rw-r--r--source4/selftest/output/html.pm11
-rw-r--r--source4/selftest/output/plain.pm11
-rwxr-xr-xsource4/selftest/selftest.pl10
4 files changed, 11 insertions, 32 deletions
diff --git a/source4/selftest/output/buildfarm.pm b/source4/selftest/output/buildfarm.pm
index efb1e3ef5b..b5971e47ad 100644
--- a/source4/selftest/output/buildfarm.pm
+++ b/source4/selftest/output/buildfarm.pm
@@ -97,18 +97,11 @@ sub summary($)
my ($self) = @_;
}
-sub missing_env($$$)
-{
- my ($self, $name, $envname) = @_;
-
- print "FAIL: $name (ENV[$envname] not available!)\n";
-}
-
sub skip_testsuite($$$$)
{
- my ($self, $envname, $name, $reason) = @_;
+ my ($self, $name, $reason) = @_;
- # Ignore skipped tests
+ print "SKIPPED: $name\n";
}
1;
diff --git a/source4/selftest/output/html.pm b/source4/selftest/output/html.pm
index fbf433e8d1..b8ee60edf7 100644
--- a/source4/selftest/output/html.pm
+++ b/source4/selftest/output/html.pm
@@ -349,19 +349,12 @@ sub summary($)
close(SUMMARY);
}
-sub missing_env($$$)
-{
- my ($self, $name, $envname) = @_;
-
- $self->skip_testsuite($envname, $name, "environment `$envname` not available!");
-}
-
sub skip_testsuite($$$$)
{
- my ($self, $envname, $name, $reason) = @_;
+ my ($self, $name, $reason) = @_;
push (@{$self->{error_summary}->{skip_testsuites}},
- [$envname, $name, $reason]);
+ [$name, $reason]);
}
1;
diff --git a/source4/selftest/output/plain.pm b/source4/selftest/output/plain.pm
index e4abb2d05a..0f70c6085e 100644
--- a/source4/selftest/output/plain.pm
+++ b/source4/selftest/output/plain.pm
@@ -120,16 +120,9 @@ sub summary($)
}
}
-sub missing_env($$$)
+sub skip_testsuite($$)
{
- my ($self, $name, $envname) = @_;
-
- print "FAIL: $name (ENV[$envname] not available!)\n";
-}
-
-sub skip_testsuite($$$)
-{
- my ($self, $envname, $name, $reason) = @_;
+ my ($self, $name, $reason) = @_;
if ($reason) {
print "SKIPPED: $name [$reason]\n";
diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl
index 725e1dc153..810a6f31c0 100755
--- a/source4/selftest/selftest.pl
+++ b/source4/selftest/selftest.pl
@@ -470,10 +470,10 @@ sub read_test_regexes($)
open(LF, "<$name") or die("unable to read $name: $!");
while (<LF>) {
chomp;
- if (/^(.*?)([ \t]+)\#(.*)$/) {
- push (@ret, [$1, $3]);
+ if (/^(.*?)([ \t]+)\#([\t ]*)(.*?)$/) {
+ push (@ret, [$1, $4]);
} else {
- s/^(.*?)([ \t]+)\#(.*)$//;
+ s/^(.*?)([ \t]+)\#([\t ]*)(.*?)$//;
push (@ret, [$_, undef]);
}
}
@@ -783,7 +783,7 @@ $envvarstr
my $skipreason = skip($name);
if ($skipreason) {
- $msg_ops->skip_testsuite($envname, $name, $skipreason);
+ $msg_ops->skip_testsuite($name, $skipreason);
$statistics->{SUITES_SKIPPED}++;
next;
}
@@ -791,7 +791,7 @@ $envvarstr
my $envvars = setup_env($envname);
if (not defined($envvars)) {
$statistics->{SUITES_SKIPPED}++;
- $msg_ops->missing_env($name, $envname);
+ $msg_ops->skip_testsuite($name, "unable to set up environment $envname");
next;
}