summaryrefslogtreecommitdiffstats
path: root/dovetail/report.py
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-02-17 09:49:16 +0000
committerxudan <xudan16@huawei.com>2017-02-17 09:58:43 +0000
commit68588d411dd58c67f3bca1130840269f26a26a00 (patch)
tree17b63a4e785bbd8cebedfb6cb4642416521f077e /dovetail/report.py
parent29500fcfd71ae240dd9258378328483f02f916eb (diff)
dovetail tool: change the way to get the functest result file
Functest has changed it's way to generate the local result file. see Gerrit: https://gerrit.opnfv.org/gerrit/#/c/28513/ Dovetail needs to do some adaptions to fit this change. JIRA: DOVETAIL-350 Change-Id: I681f74832f582f26c8874f7d2726c8588f430612 Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/report.py')
-rw-r--r--dovetail/report.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/dovetail/report.py b/dovetail/report.py
index b7b27930..ba86cf49 100644
--- a/dovetail/report.py
+++ b/dovetail/report.py
@@ -228,11 +228,14 @@ class FunctestCrawler(object):
return None
with open(file_path, 'r') as f:
for jsonfile in f:
- data = json.loads(jsonfile)
- if testcase_name == data['case_name']:
- criteria = data['details']['status']
- timestart = data['details']['timestart']
- testcase_duration = data['details']['duration']
+ try:
+ data = json.loads(jsonfile)
+ if testcase_name == data['case_name']:
+ criteria = data['details']['status']
+ timestart = data['details']['timestart']
+ testcase_duration = data['details']['duration']
+ except Exception:
+ continue
json_results = {'criteria': criteria,
'details': {"timestart": timestart,