Commit ed7f5603 authored by Guillaume Hervier's avatar Guillaume Hervier

resiliencytest: Fix exception reporting in runTestSuite function.

/reviewed-on !37
parent f873f59d
...@@ -109,7 +109,7 @@ def setupLogging(name=__name__, log_path=None): ...@@ -109,7 +109,7 @@ def setupLogging(name=__name__, log_path=None):
logger = logging.getLogger(name) logger = logging.getLogger(name)
return logger, fname return logger, fname
def runTestSuite(test_suite_title, test_suite_arguments, log): def runTestSuite(test_suite_title, test_suite_arguments, logger):
""" """
Run a specified test suite, by dynamically loading the module and calling Run a specified test suite, by dynamically loading the module and calling
its "runTestSuite" method. its "runTestSuite" method.
...@@ -121,8 +121,7 @@ def runTestSuite(test_suite_title, test_suite_arguments, log): ...@@ -121,8 +121,7 @@ def runTestSuite(test_suite_title, test_suite_arguments, log):
test_suite_module = importFrom(test_suite_title) test_suite_module = importFrom(test_suite_title)
success = test_suite_module.runTestSuite(**parsed_arguments) success = test_suite_module.runTestSuite(**parsed_arguments)
except: except:
log('Impossible to run resiliency test:') logger.exception('Impossible to run resiliency test:')
log(traceback.print_exc())
success = False success = False
return success return success
...@@ -259,7 +258,7 @@ def runUnitTest(): ...@@ -259,7 +258,7 @@ def runUnitTest():
success = runTestSuite( success = runTestSuite(
args.test_suite, args.test_suite,
args.additional_arguments, args.additional_arguments,
logger.info, logger,
) )
if success: if success:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment