diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-04-29 09:20:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-04-29 09:20:34 +0000 |
commit | 3aeebe978f0d1821133f8b554e5bed06eb88f9a8 (patch) | |
tree | bb4ec5c9f74a188769f1f41c808354e5097aeb02 /ci/tier_handler.py | |
parent | 5dfb6fb78a7d4339a5b68147b46ab8aa49ebf866 (diff) | |
parent | bbf10c2ae8c2205c89065d8d57e3340d9b2efd40 (diff) |
Merge "Create run_test.py using the tier mechanism to run the tests"
Diffstat (limited to 'ci/tier_handler.py')
-rw-r--r-- | ci/tier_handler.py | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/ci/tier_handler.py b/ci/tier_handler.py index 0b7559498..46dbc4347 100644 --- a/ci/tier_handler.py +++ b/ci/tier_handler.py @@ -23,17 +23,39 @@ class Tier: self.tests_array.append(testcase) def get_tests(self): - array_str = [] + array_tests = [] for test in self.tests_array: - array_str.append(test.name) - return array_str + array_tests.append(test) + return array_tests + + def get_test_names(self): + array_tests = [] + for test in self.tests_array: + array_tests.append(test.get_name()) + return array_tests + + def get_test(self, test_name): + if self.is_test(test_name): + for test in self.tests_array: + if test.get_name() == test_name: + return test + return None + + def is_test(self, test_name): + for test in self.tests_array: + if test.get_name() == test_name: + return True + return False + + def get_name(self): + return self.name def __str__(self): return ("Tier info:\n" " Name: " + self.name + "\n" " Description: " + self.description + "\n" " Order: " + str(self.order) + "\n" - " Test cases: " + str(self.get_tests()) + "\n") + " Test cases: " + str(self.get_test_names()) + "\n") class TestCase: @@ -51,6 +73,9 @@ class TestCase: return True + def get_name(self): + return self.name + def __str__(self): return ("Testcase info:\n" " Name: " + self.name + "\n" |