diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-01-07 15:36:36 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-01-07 15:36:36 +0000 |
commit | fe366446a5a7a510d0a727f0eb1d3e4596856c73 (patch) | |
tree | f4ef30e0a87c3ff2943a2e07785f07269ade31bf | |
parent | 4b210c187db2a0310ee97f0bc0a205d36606720b (diff) | |
download | system-tests-fe366446a5a7a510d0a727f0eb1d3e4596856c73.tar.gz |
Catch errors when deploying/booting the test system
-rw-r--r-- | mason/tests/build_test.py | 8 |
1 files 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+') |