From 84f3ea23ccc9f6e19a86748519deb600b2ac95e3 Mon Sep 17 00:00:00 2001 From: “Manuel Buil” Date: Fri, 17 Mar 2017 14:34:04 +0100 Subject: Run all testcases even if one throws an exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the first testcase throws an exception, the rest were not being executed Change-Id: I5fdc521da840ffdbc7a0bde120d7bfe7907b881c Signed-off-by: “Manuel Buil” --- sfc/tests/functest/run_tests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sfc/tests/functest/run_tests.py b/sfc/tests/functest/run_tests.py index 36b76f4d..a066af51 100644 --- a/sfc/tests/functest/run_tests.py +++ b/sfc/tests/functest/run_tests.py @@ -101,7 +101,11 @@ def main(): logger.info("%s\n" % ("=" * len(title))) t = importlib.import_module(testcase, package=None) start_time = time.time() - result = t.main() + try: + result = t.main() + except Exception, e: + logger.error("Exception when executing: %s" % testcase) + logger.error(e) end_time = time.time() duration = end_time - start_time status = "FAIL" -- cgit 1.2.3-korg