summaryrefslogtreecommitdiffstats
path: root/ci/tier_handler.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-04-28 00:08:26 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2016-04-28 15:19:09 +0200
commitbbf10c2ae8c2205c89065d8d57e3340d9b2efd40 (patch)
tree8b1f93740679ab5d674d7939801ac4be12110b43 /ci/tier_handler.py
parentaab51caef627cb40d78680563d984dd5c1dbbeef (diff)
Create run_test.py using the tier mechanism to run the tests
JIRA: FUNCTEST-227 JIRA: FUNCTEST-190 Change-Id: I5445ad36ec65e62d48c8f5b16352caea2e51e3c9 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'ci/tier_handler.py')
-rw-r--r--ci/tier_handler.py33
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"