diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2016-09-29 15:23:01 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-09-29 15:23:01 +0000 |
commit | 2d33c84aff34515ad50cc461243b6f152ff2c015 (patch) | |
tree | 732f95550af43cab937a5b6fb58355cb69f02887 /reporting/functest/reporting-status.py | |
parent | 41889729b034451eaa5d42ed4a80daf69b96a0ad (diff) | |
parent | 007411f6c79773a84e02db3da032a39f9314b705 (diff) |
Merge "Add a trend line to Functest reporting And use d3js lib rather than static images"
Diffstat (limited to 'reporting/functest/reporting-status.py')
-rwxr-xr-x | reporting/functest/reporting-status.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/reporting/functest/reporting-status.py b/reporting/functest/reporting-status.py index 90699bd..9df6996 100755 --- a/reporting/functest/reporting-status.py +++ b/reporting/functest/reporting-status.py @@ -184,8 +184,13 @@ for version in conf.versions: scenario_criteria = conf.MAX_SCENARIO_CRITERIA s_score = str(scenario_score) + "/" + str(scenario_criteria) - s_score_percent = float( + s_score_percent = 0.0 + try: + s_score_percent = float( scenario_score) / float(scenario_criteria) * 100 + except: + logger.error("cannot calculate the score percent") + s_status = "KO" if scenario_score < scenario_criteria: logger.info(">>>> scenario not OK, score = %s/%s" % |