selftest: Use idlist testing for python tests.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 22 Sep 2010 03:58:23 +0000 (20:58 -0700)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 22 Sep 2010 05:54:37 +0000 (22:54 -0700)
selftest/selftest.pl
source4/selftest/tests.sh

index 37433de42d44a03df6b10433d5653636216cf714..a21ecbabe48bf28c5b9bbb1e992bcf39647140d9 100755 (executable)
@@ -633,7 +633,7 @@ sub read_testlist($)
        open(IN, $filename) or die("Unable to open $filename: $!");
 
        while (<IN>) {
-               if (/-- TEST(-LOADLIST|IDLIST)? --\n/) {
+               if (/-- TEST(-LOADLIST|-IDLIST|) --\n/) {
                        my $supports_loadlist = (defined($1) and $1 eq "-LOADLIST");
                        my $supports_idlist = (defined($1) and $1 eq "-IDLIST");
                        my $name = <IN>;
@@ -955,7 +955,8 @@ $envvarstr
                                }
                                $cmd .= " --load-list=$listid_file";
                        } elsif ($$_[4]) {
-                               $cmd .= join(' ', @{$individual_tests->{$name}});
+                               $cmd =~ s/\s+[^\s]+\s*$//;
+                               $cmd .= " " . join(' ', @{$individual_tests->{$name}});
                        }
                }
 
index f31f0823d3d06c3b89fb576c16d3e68b4b890454..719f4a65b14dc08d40ee13dfbdb61e70f28dffb3 100755 (executable)
@@ -102,10 +102,9 @@ planperltestsuite() {
 planpythontestsuite() {
        name=$1
        env=$2
-       shift 2
-       other_args="$*"
-       cmdline="$SUBUNITRUN $other_args"
-       plantestsuite "$name" "$env" $cmdline
+       module="$3"
+       shift 3
+       plantestsuite_idlist "$name" "$env" python -m subunit.run $module
 }
 
 plansmbtorturetestsuite() {