From 616139c01e03799f2cb047f78c60d3afc004d15e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 4 Mar 2012 04:01:28 +0100 Subject: Add TestListFilter definition. --- selftest/testlist.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'selftest') 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) -- cgit