Commit 3e9c1138 authored by Nicolas Delaby's avatar Nicolas Delaby

Wrap test execution into try finally block to ensure that environment will be stopped


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@42063 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 73908662
...@@ -109,13 +109,17 @@ def run(): ...@@ -109,13 +109,17 @@ def run():
elif OPENOFFICE: elif OPENOFFICE:
chdir(ENVIRONMENT_PATH) chdir(ENVIRONMENT_PATH)
openoffice, xvfb = startFakeEnvironment(conf_path=server_cloudooo_conf) openoffice, xvfb = startFakeEnvironment(conf_path=server_cloudooo_conf)
try:
run_test(test_name) run_test(test_name)
finally:
stopFakeEnvironment() stopFakeEnvironment()
elif XVFB: elif XVFB:
chdir(ENVIRONMENT_PATH) chdir(ENVIRONMENT_PATH)
xvfb = startFakeEnvironment(start_openoffice=False, xvfb = startFakeEnvironment(start_openoffice=False,
conf_path=server_cloudooo_conf) conf_path=server_cloudooo_conf)
try:
run_test(test_name) run_test(test_name)
finally:
stopFakeEnvironment(stop_openoffice=False) stopFakeEnvironment(stop_openoffice=False)
else: else:
chdir(ENVIRONMENT_PATH) chdir(ENVIRONMENT_PATH)
......
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