From fe366446a5a7a510d0a727f0eb1d3e4596856c73 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Wed, 7 Jan 2015 15:36:36 +0000 Subject: Catch errors when deploying/booting the test system --- mason/tests/build_test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mason/tests/build_test.py b/mason/tests/build_test.py index c2ae566..e352a10 100644 --- a/mason/tests/build_test.py +++ b/mason/tests/build_test.py @@ -45,8 +45,9 @@ class Runner(mason.runners.JobRunner): self.log.info('Step 3: Deploy and test the systems') try: self._deploy_and_test_systems() - except: + except Exception as e: self._remove_workspace() + raise e self.log.info('Step 4: Clean up') self._clean_up() @@ -211,7 +212,10 @@ class Runner(mason.runners.JobRunner): net_id, log_path) os.chdir(self.defs_checkout) - instance = deployment.deploy(infrastructure) + try: + instance = deployment.deploy(infrastructure) + except Exception as e: + raise e log_path = os.path.join(self.logdir, '%s-test.log' % system['name']) logfile = open(log_path, 'w+') -- cgit v1.2.1