Commit 246edb82 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Do not hide exceptions in test wrapper

they help with debugging
parent 68f43fd3
...@@ -154,19 +154,12 @@ def main(): ...@@ -154,19 +154,12 @@ def main():
elif filename.endswith(".qmt"): elif filename.endswith(".qmt"):
# Check which class should be used to instantiate QMTests # Check which class should be used to instantiate QMTests
# by default it is QMTTest but this can be overwritten via the environment # by default it is QMTTest but this can be overwritten via the environment
try: test_module = os.environ.get('GAUDI_QMTEST_MODULE',
test_module = os.environ.get( 'GaudiTesting.QMTTest')
'GAUDI_QMTEST_MODULE', 'GaudiTesting.QMTTest') test_class = os.environ.get('GAUDI_QMTEST_CLASS', 'QMTTest')
test_class = os.environ.get('GAUDI_QMTEST_CLASS', 'QMTTest') exec 'from {} import {} as test_class'.format(test_module, test_class)
exec 'from {} import {} as test_class'.format( fileToTest = test_class(filename)
test_module, test_class) results = fileToTest.run()
fileToTest = test_class(filename)
results = fileToTest.run()
except Exception, e:
logging.error(
'Exception caught when trying to instantiate qmt test python object')
logging.error(e)
return 1
report = globals()[opts.report + '_report'] report = globals()[opts.report + '_report']
report(results) report(results)
......
Supports Markdown
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