From: Cédric Ollivier Date: Mon, 30 Jul 2018 14:08:41 +0000 (+0200) Subject: Stop skipping testcases if one raises exceptions X-Git-Tag: 0.56~3 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F67%2F60367%2F1;p=functest-xtesting.git Stop skipping testcases if one raises exceptions https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/188/console Change-Id: Ic412c5b55169f599bd9cdb623f349dd2220940db Signed-off-by: Cédric Ollivier --- diff --git a/xtesting/ci/run_tests.py b/xtesting/ci/run_tests.py index 0471732f..c8983b46 100644 --- a/xtesting/ci/run_tests.py +++ b/xtesting/ci/run_tests.py @@ -177,6 +177,12 @@ class Runner(object): LOGGER.exception("Cannot import module %s", run_dict['module']) except AttributeError: LOGGER.exception("Cannot get class %s", run_dict['class']) + except Exception: # pylint: disable=broad-except + LOGGER.exception( + "\n\nPlease fix the testcase %s.\n" + "All exceptions should be caught by the testcase instead!" + "\n\n", + test.get_name()) else: raise Exception("Cannot import the class for the test case.") return result