selftest: Fix generation of test id file.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 22 Sep 2010 00:35:53 +0000 (17:35 -0700)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 22 Sep 2010 05:54:34 +0000 (22:54 -0700)
selftest/selftest.pl

index 090e87bc590c267a6e7f668f194bf34b846f7e5f..14ed26f551179b2c7ce86d0d6caf38eb27c5bb79 100755 (executable)
@@ -716,8 +716,8 @@ foreach my $testsuite (@available) {
                                $individual_tests->{$name} = [];
                                $match = $r;
                                $restricted_used->{$r} = 1;
-                       } elsif (substr($r, $name, length($name)+1) eq "$name.") {
-                               push(@{$individual_tests->{$name}}, $1);
+                       } elsif (substr($r, 0, length($name)+1) eq "$name.") {
+                               push(@{$individual_tests->{$name}}, substr($r, length($name)+1));
                                $match = $r;
                                $restricted_used->{$r} = 1;
                        }
@@ -948,8 +948,8 @@ $envvarstr
                # test runner for this test suite supports it.
                if ($$_[3] and $individual_tests and $individual_tests->{$name}) {
                        my ($fh, $listid_file) = tempfile(UNLINK => 0);
-                       foreach (@{$individual_tests->{$name}}) {
-                               print $fh "$_\n";
+                       foreach my $test (@{$individual_tests->{$name}}) {
+                               print $fh "$test\n";
                        }
                        $cmd .= " --load-list=$listid_file";
                }