diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-05 03:16:48 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-05 03:16:48 +0200 |
commit | 851ad13047b7abe6cd0666c74984ddff37e5e096 (patch) | |
tree | 1393439ed2e00adc7ae42e0d02cc1a36c4157d86 | |
parent | 474c98fe263455f97f764195d44fb7b7406748b0 (diff) | |
download | samba-851ad13047b7abe6cd0666c74984ddff37e5e096.tar.gz samba-851ad13047b7abe6cd0666c74984ddff37e5e096.tar.bz2 samba-851ad13047b7abe6cd0666c74984ddff37e5e096.zip |
selftest: Cope with parentheses in testnames in --load-list.
-rwxr-xr-x | selftest/selftest.pl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 2d936e24ca..00db9518cc 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -694,6 +694,7 @@ foreach my $fn (@testlists) { } my $restricted = undef; +my $restricted_used = {}; if ($opt_load_list) { $restricted = []; @@ -718,14 +719,16 @@ foreach my $testsuite (@available) { Subunit::skip_testsuite($name, $skipreason); } elsif (defined($restricted)) { # Find the testsuite for this test - my $match = 0; + my $match = undef; foreach my $r (@$restricted) { if ($r eq $name) { $individual_tests->{$name} = []; - $match = 1; - } elsif ($r =~ /^$name\.(.*)$/) { + $match = $r; + $restricted_used->{$r} = 1; + } elsif (substr($r, $name, length($name)+1) eq "$name.") { push(@{$individual_tests->{$name}}, $1); - $match = 1; + $match = $r; + $restricted_used->{$r} = 1; } } push(@todo, $testsuite) if ($match); @@ -736,7 +739,7 @@ foreach my $testsuite (@available) { if (defined($restricted)) { foreach (@$restricted) { - unless (defined($individual_tests->{$_})) { + unless (defined($restricted_used->{$_})) { print "No test or testsuite found matching $_\n"; } } |