summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhongbo tian <hongbo.tianhongbo@huawei.com>2017-02-07 11:35:53 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-07 11:35:53 +0000
commitbd1698c47eb49766cf92cba54dbb2b469a03f7c9 (patch)
tree141944b22f005855a5bfab58736041e16599cdbd
parent066c814c764cc3e89ccefe8bed06a9f2918ff2be (diff)
parent29b10e25d60c34dde4c0cf9b2b11ca1904101270 (diff)
Merge "dovetail tool: report.py bugfix and tempest skipped testcase added"
-rw-r--r--dovetail/compliance/debug.yml2
-rw-r--r--dovetail/report.py17
2 files changed, 8 insertions, 11 deletions
diff --git a/dovetail/compliance/debug.yml b/dovetail/compliance/debug.yml
index bbcccd75..87003c47 100644
--- a/dovetail/compliance/debug.yml
+++ b/dovetail/compliance/debug.yml
@@ -8,6 +8,8 @@ debug:
- dovetail.example.tc002
- dovetail.ipv6.tc008
- dovetail.ipv6.tc009
+ - dovetail.ipv6.tc018
+ - dovetail.ipv6.tc019
- dovetail.nfvi.tc001
- dovetail.nfvi.tc002
- dovetail.nfvi.tc101
diff --git a/dovetail/report.py b/dovetail/report.py
index 286c3893..6145ad89 100644
--- a/dovetail/report.py
+++ b/dovetail/report.py
@@ -214,13 +214,6 @@ class FunctestCrawler:
def crawl_from_file(self, testcase=None):
dovetail_config = dt_cfg.dovetail_config
- file_path = \
- os.path.join(dovetail_config['result_dir'],
- dovetail_config[self.type]['result']['file_path'])
- if not os.path.exists(file_path):
- self.logger.info('result file not found: %s', file_path)
- return None
-
criteria = 'FAIL'
timestart = 0
testcase_duration = 0
@@ -254,10 +247,9 @@ class FunctestCrawler:
return None
with open(file_path, 'r') as myfile:
output = myfile.read()
- error_logs = ""
- for match in re.findall('(.*?)[. ]*FAILED', output):
- error_logs += match
+ error_logs = " ".join(re.findall('(.*?)[. ]*fail ', output))
+ skipped = " ".join(re.findall('(.*?)[. ]*skip:', output))
failed_num = int(re.findall(' - Failures: (\d*)', output)[0])
if failed_num != 0:
@@ -268,7 +260,8 @@ class FunctestCrawler:
json_results = {'criteria': criteria, 'details': {"timestart": '',
"duration": int(dur_sec_int),
"tests": int(num_tests), "failures": failed_num,
- "errors": error_logs}}
+ "errors": error_logs,
+ "skipped": skipped}}
self.logger.debug('Results: %s', str(json_results))
return json_results
@@ -402,6 +395,8 @@ class FunctestChecker:
all_passed = True
for sub_testcase in sub_testcase_list:
self.logger.debug('check sub_testcase:%s', sub_testcase)
+ # TO DO: should think the test case when skipped, should think
+ # together with the "dovetail report"
if sub_testcase in db_result['details']['errors']:
testcase.sub_testcase_passed(sub_testcase, False)
all_passed = False