summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhongbo tian <hongbo.tianhongbo@huawei.com>2017-05-09 01:24:02 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-09 01:24:02 +0000
commite8e815b8b288437e058d8fa4acda22b71726fe34 (patch)
treeae8f1dff601fd71dad8d6f7c09ce57c54b586b2b
parent99a152e76db09908d2f5984b4625ecb7f05f7ef9 (diff)
parentfbd256602d650c7e86af26b544d86b3b4559625e (diff)
Merge "fix ha testcase PASS/FAIL judgement"
-rw-r--r--dovetail/report.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/dovetail/report.py b/dovetail/report.py
index 2c6200d3..0d83831d 100644
--- a/dovetail/report.py
+++ b/dovetail/report.py
@@ -322,7 +322,12 @@ class YardstickCrawler(object):
for jsonfile in f:
data = json.loads(jsonfile)
if 1 == data['status']:
- criteria = 'PASS'
+ try:
+ v = data['result'][1]['benchmark']['data']['sla_pass']
+ if 1 == v:
+ criteria = 'PASS'
+ except KeyError as e:
+ self.logger.error('pass flag not found %s', e)
json_results = {'criteria': criteria}
self.logger.debug('Results: %s', str(json_results))
return json_results