summaryrefslogtreecommitdiffstats
path: root/dovetail
diff options
context:
space:
mode:
Diffstat (limited to 'dovetail')
-rw-r--r--dovetail/compliance/proposed_tests.yml4
-rw-r--r--dovetail/conf/yardstick_config.yml2
-rw-r--r--dovetail/container.py5
-rw-r--r--dovetail/report.py4
-rwxr-xr-xdovetail/run.py39
5 files changed, 25 insertions, 29 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/container.py b/dovetail/container.py
index e527a46a..dd73096d 100644
--- a/dovetail/container.py
+++ b/dovetail/container.py
@@ -102,8 +102,9 @@ class Container(object):
return None
if dovetail_config['report_dest'].startswith("http"):
- cls.logger.info("Yardstick can't push results to DB.")
- cls.logger.info("Results will be stored with files.")
+ envs = envs + " -e DISPATCHER=http"
+ envs = envs + " -e TARGET=%s" % dovetail_config['report_dest']
+ envs = envs + " -e NODE_NAME=master"
log_vol = '-v %s:%s ' % (dovetail_config['result_dir'],
dovetail_config["yardstick"]['result']['log'])
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 986ee801..c56b343c 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -77,29 +77,28 @@ def check_tc_result(testcase, logger):
dovetail_result = os.path.join(result_dir,
dt_cfg.dovetail_config['result_file'])
if dt_cfg.dovetail_config['report_dest'].startswith("http"):
- if validate_type.lower() == 'yardstick':
- logger.info("Results have been stored with file %s.",
- os.path.join(result_dir,
- testcase.validate_testcase() + '.out'))
+ if dt_utils.store_db_results(dt_cfg.dovetail_config['report_dest'],
+ dt_cfg.dovetail_config['build_tag'],
+ testcase.name(), dovetail_result,
+ logger):
+ logger.info("Results have been pushed to database and stored "
+ "with local file %s.", dovetail_result)
else:
- if dt_utils.store_db_results(dt_cfg.dovetail_config['report_dest'],
- dt_cfg.dovetail_config['build_tag'],
- testcase.name(), dovetail_result,
- logger):
- logger.info("Results have been pushed to database and stored "
- "with local file %s.", dovetail_result)
- else:
- logger.error("Fail to push results to database.")
+ 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):