Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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
Roque
erp5
Commits
8717c124
Commit
8717c124
authored
Jun 26, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util: testnode up
parent
4e70b15d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
11 deletions
+31
-11
erp5/util/benchmark/scalability_launcher.py
erp5/util/benchmark/scalability_launcher.py
+14
-7
erp5/util/taskdistribution/__init__.py
erp5/util/taskdistribution/__init__.py
+11
-2
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+6
-2
No files found.
erp5/util/benchmark/scalability_launcher.py
View file @
8717c124
...
...
@@ -55,10 +55,9 @@ class ScalabilityLauncher(object):
metavar
=
'ERP5_URL'
,
help
=
'Main url of ERP5 instance to test'
)
parser
.
add_argument
(
'--test-result-url'
,
metavar
=
'ERP5_TEST_RESULT_URL'
,
help
=
'ERP5 URL to find test results corresponding '
'to the current running test_suite'
)
parser
.
add_argument
(
'--test-result-path'
,
metavar
=
'ERP5_TEST_RESULT_PATH'
,
help
=
'ERP5 relative path of the test result'
)
parser
.
add_argument
(
'--revision'
,
metavar
=
'REVISION'
,
...
...
@@ -69,9 +68,9 @@ class ScalabilityLauncher(object):
help
=
'Title of the testnode which is running this'
'launcher'
)
parser
.
add_argument
(
'--
portal
-url'
,
metavar
=
'
PORTAL
_URL'
,
help
=
'Url to connect to
ERP5 Master portal
'
)
parser
.
add_argument
(
'--
test-suite-master
-url'
,
metavar
=
'
TEST_SUITE_MASTER
_URL'
,
help
=
'Url to connect to
the ERP5 Master testsuite taskditributor
'
)
parser
.
add_argument
(
'--log-path'
,
metavar
=
'LOG_PATH'
,
...
...
@@ -117,6 +116,14 @@ class ScalabilityLauncher(object):
start_time
=
time
.
time
()
error_message_set
,
exit_status
=
set
(),
0
test_result
=
taskdistribution
.
TestResultProxyProxy
(
self
.
__argumentNamespace
.
test_suite_master_url
,
1.0
,
self
.
log
,
self
.
__argumentNamespace
.
test_result_path
,
self
.
__argumentNamespace
.
node_title
,
self
.
__argumentNamespace
.
revision
)
#self.log("%s", self.test_result.isAlive())
while
time
.
time
()
-
start_time
<
max_time
:
...
...
erp5/util/taskdistribution/__init__.py
View file @
8717c124
...
...
@@ -382,18 +382,27 @@ class TestResultProxyProxy(TestResultProxy):
"""
A wrapper/proxy to TestResultProxy
"""
def
__init__
(
self
,
portal
_url
,
retry_time
,
logger
,
test_result_path
,
def
__init__
(
self
,
test_suite_master
_url
,
retry_time
,
logger
,
test_result_path
,
node_title
,
revision
):
try
:
proxy
=
ServerProxy
(
portal_url
,
allow_none
=
True
,
)
)
.
portal_task_distribution
except
:
raise
ValueError
(
"Cannot instanciate ServerProxy"
)
TestResultProxy
.
__init__
(
self
,
proxy
,
retry_time
,
logger
,
test_result_path
,
node_title
,
revision
)
def
getNextTestResultLinePath
(
self
):
"""
A proxy to getNextTestResultLinePath
Return the relative path of the test with the running state
"""
return
bool
(
self
.
_retryRPC
(
'getNextTestResultLinePath'
,
[
self
.
_test_result_path
]))
class
ServerProxy
(
xmlrpclib
.
ServerProxy
):
...
...
erp5/util/testnode/ScalabilityTestRunner.py
View file @
8717c124
...
...
@@ -109,6 +109,7 @@ class ScalabilityTestRunner():
config
.
update
({
'scalability-launcher-title'
:
'MyTestNodeTitle'
})
config
.
update
({
'test-result-path'
:
test_result
.
test_result_path
})
config
.
update
({
'test-suite-revision'
:
test_result
.
revision
})
config
.
update
({
'test-suite-master-url'
:
self
.
config
[
'test_suite_master_url'
]})
return
config
def
_createInstance
(
self
,
software_path
,
software_configuration
,
instance_title
,
...
...
@@ -293,13 +294,16 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
count
=
0
for
configuration
in
configuration_list
:
# Here: update instance XML
# Wait for ready status from slapos
# Start only the current test
exclude_list
=
[
x
for
x
in
test_list
if
x
!=
test_list
[
count
]]
count
+=
1
test_result_line_proxy
=
test_result_proxy
.
start
(
exclude_list
)
self
.
log
(
"Test for count : %d is in a running state."
%
count
)
while
test_result_line_proxy
.
isRunning
()
and
test_result_proxy
.
isAlive
():
time
.
sleep
(
1
0
)
time
.
sleep
(
1
5
)
pass
if
test_result_line_proxy
.
isCompleted
():
self
.
log
(
"Test completed."
)
...
...
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