From fbd256602d650c7e86af26b544d86b3b4559625e Mon Sep 17 00:00:00 2001 From: MatthewLi Date: Fri, 5 May 2017 03:46:12 -0400 Subject: fix ha testcase PASS/FAIL judgement JIRA: DOVETAIL-425 Change-Id: Ifee2473956e0a1a3ad9c98beff92d94327251614 Signed-off-by: MatthewLi --- dovetail/report.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit 1.2.3-korg