From: Jelmer Vernooij Date: Sun, 4 Mar 2012 03:01:28 +0000 (+0100) Subject: Add TestListFilter definition. X-Git-Tag: tdb-1.2.10~399 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=616139c01e03799f2cb047f78c60d3afc004d15e;p=thirdparty%2Fsamba.git Add TestListFilter definition. --- diff --git a/selftest/testlist.py b/selftest/testlist.py index c37701280b4..bc88f9d0c0f 100644 --- a/selftest/testlist.py +++ b/selftest/testlist.py @@ -85,3 +85,16 @@ def read_testlist(inf, outf): yield (name, env, cmdline, supports_loadlist, supports_idlist) else: outf.write(l) + + +class TestListFilter(object): + """Interface for something that can filter a test list.""" + + def should_run_testsuite(self, name): + """Whether to run a specific testsuite. + + :param name: Name of the testsuite + :return: List of tests to run. None means run the whole testsuite. + Return an empty list to not run this testsuite + """ + raise NotImplementedError(self.should_run_testsuite)