diff options
-rw-r--r-- | dovetail/compliance/proposed_tests.yml | 4 | ||||
-rw-r--r-- | dovetail/conf/yardstick_config.yml | 2 | ||||
-rw-r--r-- | dovetail/report.py | 4 | ||||
-rwxr-xr-x | dovetail/run.py | 20 |
4 files changed, 15 insertions, 15 deletions
diff --git a/dovetail/compliance/proposed_tests.yml b/dovetail/compliance/proposed_tests.yml index de892e5d..9d63cb2a 100644 --- a/dovetail/compliance/proposed_tests.yml +++ b/dovetail/compliance/proposed_tests.yml @@ -31,9 +31,6 @@ proposed_tests: - dovetail.ipv6.tc023 - dovetail.ipv6.tc024 - dovetail.ipv6.tc025 - # nfvi, vping_ssh, vping_userdata - - dovetail.nfvi.tc001 - - dovetail.nfvi.tc002 # HA - dovetail.ha.tc001 - dovetail.ha.tc002 @@ -46,6 +43,5 @@ proposed_tests: # sdnvpn - dovetail.sdnvpn.tc001 - dovetail.sdnvpn.tc002 - - dovetail.sdnvpn.tc003 - dovetail.sdnvpn.tc004 - dovetail.sdnvpn.tc008 diff --git a/dovetail/conf/yardstick_config.yml b/dovetail/conf/yardstick_config.yml index bc207d7f..9f56cb11 100644 --- a/dovetail/conf/yardstick_config.yml +++ b/dovetail/conf/yardstick_config.yml @@ -15,7 +15,7 @@ yardstick: - 'mkdir -p /home/opnfv/yardstick/results/' - "cd /home/opnfv/repos/yardstick && source tests/ci/prepare_env.sh && yardstick -d task start tests/opnfv/test_cases/{{validate_testcase}}.yaml - --output-file /home/opnfv/yardstick/results/{{validate_testcase}}.out + --output-file /home/opnfv/yardstick/results/{{testcase}}.out --task-args '{'file': '/home/opnfv/userconfig/pre_config/pod.yaml'}'" post_condition: - '' diff --git a/dovetail/report.py b/dovetail/report.py index 0d83831d..b864de98 100644 --- a/dovetail/report.py +++ b/dovetail/report.py @@ -264,7 +264,7 @@ class FunctestCrawler(object): "errors": error_case, "skipped": skipped_case} except KeyError as e: - self.logger.error("Key error, exception: %s", e) + self.logger.error("Result data don't have key %s.", e) return None except ValueError: continue @@ -313,7 +313,7 @@ class YardstickCrawler(object): def crawl_from_file(self, testcase=None): file_path = os.path.join(dt_cfg.dovetail_config['result_dir'], - testcase.validate_testcase() + '.out') + testcase.name() + '.out') if not os.path.exists(file_path): self.logger.info('result file not found: %s', file_path) return None diff --git a/dovetail/run.py b/dovetail/run.py index 521379d7..00376360 100755 --- a/dovetail/run.py +++ b/dovetail/run.py @@ -92,14 +92,18 @@ def check_tc_result(testcase, logger): logger.error("Fail to push results to database.") if dt_cfg.dovetail_config['report_dest'] == "file": if validate_type.lower() == 'yardstick': - logger.info("Results have been stored with file %s.", - os.path.join(result_dir, - testcase.validate_testcase() + '.out')) - if validate_type.lower() == 'functest': - logger.info("Results have been stored with file %s.", - os.path.join(result_dir, functest_result)) - result = Report.get_result(testcase) - Report.check_result(testcase, result) + result_file = os.path.join(result_dir, testcase.name() + '.out') + elif validate_type.lower() == 'functest': + result_file = os.path.join(result_dir, functest_result) + else: + logger.error("Don't support %s now.", validate_type) + return + if os.path.isfile(result_file): + logger.info("Results have been stored with file %s.", result_file) + result = Report.get_result(testcase) + Report.check_result(testcase, result) + else: + logger.error("Fail to store results with file %s.", result_file) def validate_input(input_dict, check_dict, logger): |