diff options
Diffstat (limited to 'Libraries/Tests/ATFTests.py')
-rwxr-xr-x | Libraries/Tests/ATFTests.py | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/Libraries/Tests/ATFTests.py b/Libraries/Tests/ATFTests.py new file mode 100755 index 0000000..245e96a --- /dev/null +++ b/Libraries/Tests/ATFTests.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python + +############################################################################## +## ATFTests Class contains variables and methods for storing and retrieving +## information about "TESTS" that has to be executed. +## +## Variables: +## TestUnits: List of TestUnits to be run. +## +## KeyWords: List of keywords to be used to select tests under each +## TestUnit. +## +## Version: Glusterfs version. This is used to select tests based on version +## of Glusterfs. +############################################################################## + +class Tests(): + def __init__(self): + self.TestUnits = [] + self.KeyWords = [] + self.Version = '' + + def add_testunits(self, testunit): + """ + Description: + Add a testunit to TestUnits List + + Parameter: + testunit: Name of the Testing Unit + + Returns: + """ + + self.TestUnits.append(testunit) + return + + def sort_testunits(self): + """ + Description: + Sort the TestUnit List in Descending Order + + Parameter: + + Returns: + """ + + self.TestUnits.sort() + self.TestUnits.reverse() + return + + def get_testunits(self): + """ + Description: + Return TestUnits List + + Parameters: + + Returns: + Success: Testunit Name + Failure: '' + """ + + return self.TestUnits + + def add_keywords(self, keyname): + """ + Description: + Add Keywords to KeyWords List + + Parameters: + keyname: Keyword + + Returns: + """ + + self.KeyWords.append(keyname) + return + + def set_version(self, version): + """ + Description: + Set Glusterfs Version under test. + + Parameters: + version: Glusterfs version + + Returns: + """ + + self.Version = version + return + + def get_version(self): + """ + Description: + Returns Glusterfs Vesrion under test + + Parameters: + + Returns: + Glusterfs Version + """ + + return self.Version + |