mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
selftest: Drop support for TESTSUITE-IDLIST, and remove its last user.
Change-Id: Ic616676bb770fa4769195d73c4309915646caae0 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
13a1406fa1
commit
f6e3cd7f03
@ -568,9 +568,8 @@ sub read_testlist($)
|
||||
open(IN, $filename) or die("Unable to open $filename: $!");
|
||||
|
||||
while (<IN>) {
|
||||
if (/-- TEST(-LOADLIST|-IDLIST|) --\n/) {
|
||||
if (/-- TEST(-LOADLIST|) --\n/) {
|
||||
my $supports_loadlist = (defined($1) and $1 eq "-LOADLIST");
|
||||
my $supports_idlist = (defined($1) and $1 eq "-IDLIST");
|
||||
my $name = <IN>;
|
||||
$name =~ s/\n//g;
|
||||
my $env = <IN>;
|
||||
@ -578,7 +577,7 @@ sub read_testlist($)
|
||||
my $cmdline = <IN>;
|
||||
$cmdline =~ s/\n//g;
|
||||
if (should_run_test($name) == 1) {
|
||||
push (@ret, [$name, $env, $cmdline, $supports_loadlist, $supports_idlist]);
|
||||
push (@ret, [$name, $env, $cmdline, $supports_loadlist]);
|
||||
}
|
||||
} else {
|
||||
print;
|
||||
@ -823,7 +822,6 @@ sub setup_env($$)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return undef unless defined($testenv_vars);
|
||||
|
||||
$running_envs{$envname} = $testenv_vars;
|
||||
@ -995,9 +993,8 @@ $envvarstr
|
||||
print $fh substr($test, length($name)+1) . "\n";
|
||||
}
|
||||
$cmd =~ s/\$LOADLIST/--load-list=$listid_file/g;
|
||||
} elsif ($$_[4]) {
|
||||
$cmd =~ s/\s+[^\s]+\s*$//;
|
||||
$cmd .= " " . join(' ', @{$individual_tests->{$name}});
|
||||
} else {
|
||||
warn("Unable to run individual tests in $name, it does not support --loadlist.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,19 +133,6 @@ def plantestsuite_loadlist(name, env, cmdline):
|
||||
print "%s $LOADLIST 2>&1 | %s" % (cmdline, add_prefix(name, env, support_list))
|
||||
|
||||
|
||||
def plantestsuite_idlist(name, env, cmdline):
|
||||
print "-- TEST-IDLIST --"
|
||||
if env == "none":
|
||||
fullname = name
|
||||
else:
|
||||
fullname = "%s(%s)" % (name, env)
|
||||
print fullname
|
||||
print env
|
||||
if isinstance(cmdline, list):
|
||||
cmdline = " ".join(cmdline)
|
||||
print cmdline
|
||||
|
||||
|
||||
def skiptestsuite(name, reason):
|
||||
"""Indicate that a testsuite was skipped.
|
||||
|
||||
@ -178,10 +165,10 @@ def planpythontestsuite(env, module, name=None, extra_path=[]):
|
||||
"%s/lib/testtools" % srcdir(),
|
||||
"%s/lib/extras" % srcdir(),
|
||||
"%s/lib/mimeparse" % srcdir()])
|
||||
args = [python, "-m", "subunit.run", "$LISTOPT", module]
|
||||
args = [python, "-m", "subunit.run", "$LISTOPT", "$LOADLIST", module]
|
||||
if pypath:
|
||||
args.insert(0, "PYTHONPATH=%s" % ":".join(["$PYTHONPATH"] + pypath))
|
||||
plantestsuite_idlist(name, env, args)
|
||||
plantestsuite_loadlist(name, env, args)
|
||||
|
||||
|
||||
def get_env_torture_options():
|
||||
|
@ -79,11 +79,10 @@ def read_testlist(inf, outf):
|
||||
return
|
||||
if l.startswith("-- TEST") and l.endswith(" --\n"):
|
||||
supports_loadlist = l.startswith("-- TEST-LOADLIST")
|
||||
supports_idlist = l.startswith("-- TEST-IDLIST")
|
||||
name = inf.readline().rstrip("\n")
|
||||
env = inf.readline().rstrip("\n")
|
||||
cmdline = inf.readline().rstrip("\n")
|
||||
yield (name, env, cmdline, supports_loadlist, supports_idlist)
|
||||
yield (name, env, cmdline, supports_loadlist)
|
||||
else:
|
||||
outf.write(l)
|
||||
|
||||
|
@ -67,14 +67,14 @@ class ReadTestlistTests(TestCase):
|
||||
def test_read_list(self):
|
||||
inf = StringIO("-- TEST --\nfoo\nbar\nbla\n")
|
||||
outf = StringIO()
|
||||
self.assertEquals([('foo', 'bar', 'bla', False, False)],
|
||||
self.assertEquals([('foo', 'bar', 'bla', False)],
|
||||
list(read_testlist(inf, outf)))
|
||||
self.assertEquals("", outf.getvalue())
|
||||
|
||||
def test_read_list_passes_through(self):
|
||||
inf = StringIO("MORENOISE\n-- TEST --\nfoo\nbar\nbla\nNOISE\n")
|
||||
outf = StringIO()
|
||||
self.assertEquals([('foo', 'bar', 'bla', False, False)],
|
||||
self.assertEquals([('foo', 'bar', 'bla', False)],
|
||||
list(read_testlist(inf, outf)))
|
||||
self.assertEquals("MORENOISE\nNOISE\n", outf.getvalue())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user