summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2017-05-05 03:46:12 -0400
committerMatthewLi <matthew.lijun@huawei.com>2017-05-08 06:15:18 -0400
commitfbd256602d650c7e86af26b544d86b3b4559625e (patch)
treecf17834d1c25cff6e052b7ea45128f9356372e46
parentb878b9407ecf605eb57a5a1c53c30a0d90da5ca7 (diff)
fix ha testcase PASS/FAIL judgement
JIRA: DOVETAIL-425 Change-Id: Ifee2473956e0a1a3ad9c98beff92d94327251614 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
-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