summaryrefslogtreecommitdiffstats
path: root/utils/test/reporting/functest/reportingUtils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/test/reporting/functest/reportingUtils.py')
-rw-r--r--utils/test/reporting/functest/reportingUtils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/test/reporting/functest/reportingUtils.py b/utils/test/reporting/functest/reportingUtils.py
index 9ba02e821..74d6f19c9 100644
--- a/utils/test/reporting/functest/reportingUtils.py
+++ b/utils/test/reporting/functest/reportingUtils.py
@@ -176,3 +176,11 @@ def getJenkinsUrl(build_tag):
print 'Impossible to get jenkins url:'
return jenkins_url
+
+def getScenarioPercent(scenario_score,scenario_criteria):
+ score = 0.0
+ try:
+ score = float(scenario_score) / float(scenario_criteria) * 100
+ except:
+ print 'Impossible to calculate the percentage score'
+ return score