aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author“Manuel Buil” <mbuil@suse.com>2017-03-17 14:34:04 +0100
committerBrady Johnson <brady.allen.johnson@ericsson.com>2017-03-17 13:56:27 +0000
commit84f3ea23ccc9f6e19a86748519deb600b2ac95e3 (patch)
tree924b36bf81230e2d79c4af4b919a954c99fca4ff
parent1d72729b1513e419ab1d97f294410a5cfdd1c62f (diff)
Run all testcases even if one throws an exception
If the first testcase throws an exception, the rest were not being executed Change-Id: I5fdc521da840ffdbc7a0bde120d7bfe7907b881c Signed-off-by: “Manuel Buil” <mbuil@suse.com>
-rw-r--r--sfc/tests/functest/run_tests.py6
1 files changed, 5 insertions, 1 deletions
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"