aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2017-05-10 07:54:08 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-10 07:54:08 +0000
commit5b536321b8722f87715cab7bae3f6813bb73fd2a (patch)
tree0f6038f9628a67481684eeeed2c2d5f5e74467f8 /functest/opnfv_tests
parentce80dec85ee484d5c0cd6ed2a48c60529938a706 (diff)
parentf2bbfb690ce435c389b548d6b299ff82f658ea80 (diff)
Merge "Conform ODL with last framework updates"
Diffstat (limited to 'functest/opnfv_tests')
-rwxr-xr-xfunctest/opnfv_tests/sdn/odl/odl.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/functest/opnfv_tests/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py
index f92cb95d..e50d9c13 100755
--- a/functest/opnfv_tests/sdn/odl/odl.py
+++ b/functest/opnfv_tests/sdn/odl/odl.py
@@ -16,6 +16,8 @@ Example:
$ python odl.py
"""
+from __future__ import division
+
import argparse
import errno
import fileinput
@@ -100,7 +102,12 @@ class ODLTests(testcase.TestCase):
result = robot.api.ExecutionResult(xml_file)
visitor = ODLResultVisitor()
result.visit(visitor)
- self.result = result.suite.status
+ try:
+ self.result = 100 * (
+ result.suite.statistics.critical.passed /
+ result.suite.statistics.critical.total)
+ except ZeroDivisionError:
+ self.__logger.error("No test has been ran")
self.start_time = timestamp_to_secs(result.suite.starttime)
self.stop_time = timestamp_to_secs(result.suite.endtime)
self.details = {}