diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-07-11 14:58:36 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-07-11 15:21:07 +0200 |
commit | f83c5fc1f0ecd3b93a39b3cf90ed9cd478cb37a6 (patch) | |
tree | f080c2af53b54022a2fa8875c33f858671b767b6 | |
parent | 06ee8307aed7f30ba493c0494cfd82cead465b56 (diff) |
Force result = 0 if exception
self.result can be positive due to intermediary steps (scenarios).
Else it can return false positives [1].
[1] https://build.opnfv.org/ci/view/functest/job/functest-apex-virtual-suite-master/113/console
Change-Id: Iecadee7f7380fda5273a0668aff1b441647c45aa
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r-- | functest/opnfv_tests/openstack/rally/rally.py | 1 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index 872e75b8e..e193b83ef 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -502,6 +502,7 @@ class RallyBase(singlevm.VmReady1): res = testcase.TestCase.EX_OK except Exception as exc: # pylint: disable=broad-except LOGGER.error('Error with run: %s', exc) + self.result = 0 res = testcase.TestCase.EX_RUN_ERROR self.stop_time = time.time() return res diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 9e200bbd6..ea82d2307 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -297,6 +297,7 @@ class TempestCommon(singlevm.VmReady1): res = testcase.TestCase.EX_OK except Exception: # pylint: disable=broad-except LOGGER.exception('Error with run') + self.result = 0 res = testcase.TestCase.EX_RUN_ERROR self.stop_time = time.time() return res |