aboutsummaryrefslogtreecommitdiffstats
path: root/functest_kubernetes
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2022-10-17 17:01:41 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2022-10-17 17:22:21 +0200
commitab1bc0ea7edf3df75ade66aba5f49458a4e824e8 (patch)
treed5610e04c3adbceae76d0d7a521c2f77313ca0c1 /functest_kubernetes
parent1637b032fc812fecf51c41d0805383e199bcb87f (diff)
cnf conformance now returns non zero values
Change-Id: I61cb69ef48b113571f791c7ee2ef7387c7421f32 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit f0ebad3e5b23350483929a2a881f89d0f2822f5e)
Diffstat (limited to 'functest_kubernetes')
-rw-r--r--functest_kubernetes/cnf_conformance/conformance.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/functest_kubernetes/cnf_conformance/conformance.py b/functest_kubernetes/cnf_conformance/conformance.py
index bfb0c1bb..9e3bea00 100644
--- a/functest_kubernetes/cnf_conformance/conformance.py
+++ b/functest_kubernetes/cnf_conformance/conformance.py
@@ -71,7 +71,9 @@ class CNFConformance(testcase.TestCase):
def run_conformance(self, **kwargs):
"""Run CNF Conformance"""
cmd = ['cnf-testsuite', kwargs.get("tag", self.default_tag)]
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ output = subprocess.run(
+ cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE,
+ check=False).stdout
self.__logger.info("%s\n%s", " ".join(cmd), output.decode("utf-8"))
lfiles = glob.glob(os.path.join(
self.src_dir, 'results', 'cnf-testsuite-results-*.yml'))
@@ -107,15 +109,8 @@ class CNFConformance(testcase.TestCase):
def run(self, **kwargs):
""""Running the test with example CNF"""
self.start_time = time.time()
- try:
- self.setup()
- self.run_conformance(**kwargs)
- except subprocess.CalledProcessError as exc:
- self.__logger.warning(
- "Can not run CNT Conformance: \n%s\n%s\n",
- " ".join(exc.cmd), exc.output.decode("utf-8"))
- except Exception: # pylint: disable=broad-except
- self.__logger.warning("CNF Conformance exited with errors")
+ self.setup()
+ self.run_conformance(**kwargs)
self.stop_time = time.time()
def clean(self):