Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos
Commits
25fe36f7
Commit
25fe36f7
authored
Dec 16, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[HARDCODED] Report Zelenium errors to the distribution tool
parent
b71beea0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+1
-1
stack/erp5/template/run-zelenium-test.py.in
stack/erp5/template/run-zelenium-test.py.in
+20
-9
No files found.
stack/erp5/buildout.cfg
View file @
25fe36f7
...
...
@@ -156,7 +156,7 @@ mode = 755
[template-run-zelenium]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template/run-zelenium-test.py.in
md5sum =
b78c7f5db0e9c9de9b96ac600da675a6
md5sum =
ab554dc5e57b8002e51b0f86074311a3
output = ${buildout:directory}/run-zelenium-test.py.in
mode = 755
...
...
stack/erp5/template/run-zelenium-test.py.in
View file @
25fe36f7
...
...
@@ -105,6 +105,7 @@ def main():
# Wait until all bt5 are installed...
time.sleep(120)
tool = taskdistribution.TaskDistributionTool(portal_url=args.master_url)
try:
browser = webdriver.Remote(appium_url, capabilities)
...
...
@@ -201,8 +202,26 @@ def main():
tr_count += 1
except:
test_line_dict['UnexpectedException'] = {
'test_count': 1,
'error_count': 0,
'failure_count': 1,
'skip_count': 0,
'duration': 1,
'command': url,
'stdout': agent,
'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()
tool = taskdistribution.TaskDistributionTool(portal_url=args.master_url)
try:
test_result = tool.createTestResult(revision = revision,
test_name_list = test_line_dict.keys(),
node_title = args.test_node_title,
...
...
@@ -220,8 +239,6 @@ def main():
print 'Submitting: "%s"' % test_result_line.name
# report status back to Nexedi ERP5
test_result_line.stop(**test_line_dict[test_result_line.name])
except:
# Catch any exception here, to warn user instead of being silent,
# by generating fake error result
...
...
@@ -232,12 +249,6 @@ def main():
stdout='')
# XXX: inform test node master of error
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__":
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment