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:42 +0200 |
commit | 7ca03eaf570f3f8c89adcef395bff3bbabecb050 (patch) | |
tree | 9afc6ac66a402114fdac36566bc2f2e8f6bcf03f | |
parent | d3f4ac51cb1b3485e6d86b2d5d079456b0f056fd (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>
(cherry picked from commit f83c5fc1f0ecd3b93a39b3cf90ed9cd478cb37a6)
-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 df73d2632..391e39489 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -478,6 +478,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 eb3469112..1a84f2985 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -305,6 +305,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 |