From: Leo Wang Date: Wed, 14 Dec 2016 07:48:16 +0000 (-0500) Subject: [dovetail tool] support shell scripts for testcase validation X-Git-Tag: ovp.0.9.0~261 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F31%2F25931%2F1;p=dovetail.git [dovetail tool] support shell scripts for testcase validation JIRA: DOVETAIL-46 1. for now a testcase has two kinds of validation types(functest, yardstick), and it is not enough to check the complete funcionality 2. add new validation type(shell) for extra validation of the test case to make result more accurate and more convincing. Change-Id: I60c1b54335b94e0cb150232432adb958b8f5a143 Signed-off-by: Leo Wang --- diff --git a/dovetail/testcase.py b/dovetail/testcase.py index 79522923..af8b325e 100644 --- a/dovetail/testcase.py +++ b/dovetail/testcase.py @@ -23,7 +23,7 @@ class Testcase(object): def __init__(self, testcase_yaml): self.testcase = testcase_yaml.values()[0] - self.logger.debug('testcase:%s', self.testcase) + # self.logger.debug('testcase:%s', self.testcase) self.testcase['passed'] = False self.cmds = [] self.sub_testcase_status = {} @@ -163,7 +163,6 @@ class Testcase(object): else: cls.logger.error('failed to create testcase: %s', testcase_file) - cls.logger.debug(cls.testcase_list) @classmethod def get(cls, testcase_name): @@ -183,14 +182,16 @@ class FunctestTestcase(Testcase): def prepare_cmd(self): ret = super(FunctestTestcase, self).prepare_cmd() if not ret: + return False + else: for cmd in \ dt_cfg.dovetail_config[self.name]['cmds']: cmd_lines = Parser.parse_cmd(cmd, self) if not cmd_lines: return False + self.logger.debug('cmd_lines:%s', cmd_lines) self.cmds.append(cmd_lines) - return True - return ret + return True class YardstickTestcase(Testcase):