Commit 8850e5dc authored by Romain Courteaud's avatar Romain Courteaud

[HARDCODED] Report test results before trying to quit the browser

parent 25fe36f7
...@@ -156,7 +156,7 @@ mode = 755 ...@@ -156,7 +156,7 @@ mode = 755
[template-run-zelenium] [template-run-zelenium]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template/run-zelenium-test.py.in url = ${:_profile_base_location_}/template/run-zelenium-test.py.in
md5sum = ab554dc5e57b8002e51b0f86074311a3 md5sum = 09706bcdb2b7de1ba997b81a4778e6db
output = ${buildout:directory}/run-zelenium-test.py.in output = ${buildout:directory}/run-zelenium-test.py.in
mode = 755 mode = 755
......
...@@ -213,13 +213,6 @@ def main(): ...@@ -213,13 +213,6 @@ def main():
'stdout': agent, 'stdout': agent,
'stderr': traceback.format_exc() 'stderr': traceback.format_exc()
} }
finally:
if is_browser_running:
# if by any chance browser is still running due to
# traceback raised make sure we cleanup
browser.quit()
try: try:
test_result = tool.createTestResult(revision = revision, test_result = tool.createTestResult(revision = revision,
...@@ -239,6 +232,7 @@ def main(): ...@@ -239,6 +232,7 @@ def main():
print 'Submitting: "%s"' % test_result_line.name print 'Submitting: "%s"' % test_result_line.name
# report status back to Nexedi ERP5 # report status back to Nexedi ERP5
test_result_line.stop(**test_line_dict[test_result_line.name]) test_result_line.stop(**test_line_dict[test_result_line.name])
except: except:
# Catch any exception here, to warn user instead of being silent, # Catch any exception here, to warn user instead of being silent,
# by generating fake error result # by generating fake error result
...@@ -250,6 +244,12 @@ def main(): ...@@ -250,6 +244,12 @@ def main():
# XXX: inform test node master of error # XXX: inform test node master of error
raise EnvironmentError(result) raise EnvironmentError(result)
finally:
if is_browser_running:
# if by any chance browser is still running due to
# traceback raised make sure we cleanup
browser.quit()
if __name__ == "__main__": if __name__ == "__main__":
main() main()
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