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,14 +109,18 @@ def run(): ...@@ -109,14 +109,18 @@ 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)
run_test(test_name) try:
stopFakeEnvironment() run_test(test_name)
finally:
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)
run_test(test_name) try:
stopFakeEnvironment(stop_openoffice=False) run_test(test_name)
finally:
stopFakeEnvironment(stop_openoffice=False)
else: else:
chdir(ENVIRONMENT_PATH) chdir(ENVIRONMENT_PATH)
loadConfig(server_cloudooo_conf) loadConfig(server_cloudooo_conf)
......
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