diff options
Diffstat (limited to 'reporting/functest/reportingUtils.py')
-rw-r--r-- | reporting/functest/reportingUtils.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/reporting/functest/reportingUtils.py b/reporting/functest/reportingUtils.py index 9ba02e8..74d6f19 100644 --- a/reporting/functest/reportingUtils.py +++ b/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 |