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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos
Commits
7333ff11
Commit
7333ff11
authored
May 22, 2019
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Plain Diff
stack/erp5: fix saucelab test issue
/reviewed-on
nexedi/slapos!561
parents
1434fd65
57ad50fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
11 deletions
+20
-11
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+2
-2
stack/erp5/instance-zope.cfg.in
stack/erp5/instance-zope.cfg.in
+4
-5
stack/erp5/run-zelenium-test.py.in
stack/erp5/run-zelenium-test.py.in
+14
-4
No files found.
stack/erp5/buildout.hash.cfg
View file @
7333ff11
...
@@ -66,7 +66,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
...
@@ -66,7 +66,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[template-run-zelenium]
[template-run-zelenium]
filename = run-zelenium-test.py.in
filename = run-zelenium-test.py.in
md5sum =
37f94ecf60876bbe30877773dfe9828b
md5sum =
c64f35f825200fe35328641b2b8e0fdd
[template]
[template]
filename = instance.cfg.in
filename = instance.cfg.in
...
@@ -86,7 +86,7 @@ md5sum = d400c3d449ce437a0ded77ee3d5c5df2
...
@@ -86,7 +86,7 @@ md5sum = d400c3d449ce437a0ded77ee3d5c5df2
[template-zope]
[template-zope]
filename = instance-zope.cfg.in
filename = instance-zope.cfg.in
md5sum =
3a6c7dec898abc7d1506957154ef566e
md5sum =
5cbfcc02ffe6c2ae8cdf412134addd8f
[template-balancer]
[template-balancer]
filename = instance-balancer.cfg.in
filename = instance-balancer.cfg.in
...
...
stack/erp5/instance-zope.cfg.in
View file @
7333ff11
...
@@ -391,6 +391,10 @@ wrapper-path = ${buildout:bin-directory}/${:_buildout_section_name_}
...
@@ -391,6 +391,10 @@ wrapper-path = ${buildout:bin-directory}/${:_buildout_section_name_}
[{{ section("wait_activities") }}]
[{{ section("wait_activities") }}]
<= watch_activities
<= watch_activities
{% if test_runner_enabled and test_runner_node_count -%}
{% for _ in range(test_runner_node_count) %}
{% do test_runner_address_list.append((ipv4, next_port())) %}
{% endfor %}
{% if saucelabs_dict -%}
{% if saucelabs_dict -%}
[test-zelenium-runner-parameter]
[test-zelenium-runner-parameter]
...
@@ -411,11 +415,6 @@ context =
...
@@ -411,11 +415,6 @@ context =
key password test-zelenium-runner-parameter:password
key password test-zelenium-runner-parameter:password
key bin_path test-zelenium-runner-parameter:bin-path
key bin_path test-zelenium-runner-parameter:bin-path
{% else -%}
{% else -%}
{% if test_runner_enabled and test_runner_node_count -%}
{% for _ in range(test_runner_node_count) %}
{% do test_runner_address_list.append((ipv4, next_port())) %}
{% endfor %}
[{{ section('run-unit-test-userhosts-wrapper') }}]
[{{ section('run-unit-test-userhosts-wrapper') }}]
<= userhosts-wrapper-base
<= userhosts-wrapper-base
wrapped-command-line = ${runUnitTest:wrapper-path}
wrapped-command-line = ${runUnitTest:wrapper-path}
...
...
stack/erp5/run-zelenium-test.py.in
View file @
7333ff11
...
@@ -12,6 +12,7 @@ from selenium.webdriver.support.ui import WebDriverWait
...
@@ -12,6 +12,7 @@ from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support import expected_conditions as EC
import time
import time
from urllib import urlopen
from urllib import urlopen
import json
def main():
def main():
parser = argparse.ArgumentParser(description='Run a test suite.')
parser = argparse.ArgumentParser(description='Run a test suite.')
...
@@ -110,20 +111,29 @@ def main():
...
@@ -110,20 +111,29 @@ def main():
"&__ac_password=%s" % (args.remote_access_url, {{ repr(user) }}, {{ repr(password) }})
"&__ac_password=%s" % (args.remote_access_url, {{ repr(user) }}, {{ repr(password) }})
# Wait until all activities are finished...
# Wait until all activities are finished...
wait_url = args.remote_access_url + '/erp5/Zuite_waitForActivities'
wait_url = "%s/erp5/ActivityTool_getSqlStatisticList" \
"?__ac_name=%s" \
"&__ac_password=%s" % (args.remote_access_url, {{ repr(user) }}, {{ repr(password) }})
while 1:
while 1:
try:
try:
response = urlopen(wait_url)
response = urlopen(wait_url)
try:
try:
if response.code == 500:
if response.code == 500:
sys.exit(-1)
sys.exit(-1)
if response.code == 200 and response.read() == 'Done.':
if response.code == 200:
break
static_dict = json.loads(response.read())
activity_list = []
for _, value in static_dict.iteritems():
activity_list += value['line_list']
if len(activity_list) == 0:
break
elif all(x['node'] == -2 for x in activity_list):
sys.exit(-1)
finally:
finally:
response.close()
response.close()
except Exception:
except Exception:
traceback.print_exc()
traceback.print_exc()
time.sleep(
1
0)
time.sleep(
60
0)
tool = taskdistribution.TaskDistributor(portal_url=args.master_url)
tool = taskdistribution.TaskDistributor(portal_url=args.master_url)
browser = webdriver.Remote(appium_url, capabilities)
browser = webdriver.Remote(appium_url, capabilities)
...
...
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