diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-05 02:20:56 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-05 02:20:56 +0200 |
commit | ef9657017cf082bd49ed81f3df85a0fb1786f715 (patch) | |
tree | 15722fed3ebaaf01fc1274d1cc89d209c2ac2e58 | |
parent | 3c250677245e89ce0062db1758c855b051ddef77 (diff) | |
download | samba-ef9657017cf082bd49ed81f3df85a0fb1786f715.tar.gz samba-ef9657017cf082bd49ed81f3df85a0fb1786f715.tar.bz2 samba-ef9657017cf082bd49ed81f3df85a0fb1786f715.zip |
selftest: Print out unmatched tests when using --load-list.
-rwxr-xr-x | selftest/selftest.pl | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl index cf79c83441..2d936e24ca 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -698,8 +698,8 @@ my $restricted = undef; if ($opt_load_list) { $restricted = []; open(LOAD_LIST, "<$opt_load_list") or die("Unable to open $opt_load_list"); - while (<LOAD_LIST>) { - chomp; + while (<LOAD_LIST>) { + chomp; push (@$restricted, $_); } close(LOAD_LIST); @@ -723,8 +723,7 @@ foreach my $testsuite (@available) { if ($r eq $name) { $individual_tests->{$name} = []; $match = 1; - } - if ($r =~ /^$name\.(.*)$/) { + } elsif ($r =~ /^$name\.(.*)$/) { push(@{$individual_tests->{$name}}, $1); $match = 1; } @@ -735,10 +734,16 @@ foreach my $testsuite (@available) { } } -if ($#todo == -1) { +if (defined($restricted)) { + foreach (@$restricted) { + unless (defined($individual_tests->{$_})) { + print "No test or testsuite found matching $_\n"; + } + } +} elsif ($#todo == -1) { print STDERR "No tests to run\n"; exit(1); - } +} my $suitestotal = $#todo + 1; my $i = 0; @@ -938,7 +943,7 @@ $envvarstr $cmd =~ s/([\(\)])/\\$1/g; my $name = $$_[0]; my $envname = $$_[1]; - + my $envvars = setup_env($envname); if (not defined($envvars)) { Subunit::skip_testsuite($name, |