summaryrefslogtreecommitdiffstats
path: root/reporting/functest/reporting-status.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-09-29 15:23:01 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-29 15:23:01 +0000
commit2d33c84aff34515ad50cc461243b6f152ff2c015 (patch)
tree732f95550af43cab937a5b6fb58355cb69f02887 /reporting/functest/reporting-status.py
parent41889729b034451eaa5d42ed4a80daf69b96a0ad (diff)
parent007411f6c79773a84e02db3da032a39f9314b705 (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-xreporting/functest/reporting-status.py7
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" %