This makes it easier for me to test just a single suite - simply change the runnable property to return False, then add one that returns True to the subclass you're experimenting with. --- tests/anaconda_storage/framework/__init__.py | 3 +++ .../anaconda_storage/framework/suites/__init__.py | 7 +++++++ 2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/tests/anaconda_storage/framework/__init__.py b/tests/anaconda_storage/framework/__init__.py index e8be283..cff3e64 100644 --- a/tests/anaconda_storage/framework/__init__.py +++ b/tests/anaconda_storage/framework/__init__.py @@ -236,6 +236,9 @@ class StorageTestFramework(object): os.chdir(self.basedir)
obj = suite(self.basedir, self.diskimagesdir) + if not obj.runnable: + continue + logging.info("===== Running Test Suite %s =====" % obj.name) logging.info("----- Creating Disk Images -----") obj.setup() diff --git a/tests/anaconda_storage/framework/suites/__init__.py b/tests/anaconda_storage/framework/suites/__init__.py index 8779b38..9899a59 100644 --- a/tests/anaconda_storage/framework/suites/__init__.py +++ b/tests/anaconda_storage/framework/suites/__init__.py @@ -104,6 +104,13 @@ class BaseSuite(object):
open(self._runningReportDir + "/FAILED", "w").close()
+ @property + def runnable(self): + """If this method returns False, the suite will not be run by the test + framework. Test suites can override this method as needed. + """ + return True + def run(self, token, livecd, resultsdir): """Execute this test suite. This is done by iterating over all test case objects, writing out config files, and then running their