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
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
Frederic Thoma
erp5
Commits
76a58971
Commit
76a58971
authored
Jun 27, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util: testnode upp
parent
6d8c99a2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
11 deletions
+43
-11
erp5/util/benchmark/scalability_launcher.py
erp5/util/benchmark/scalability_launcher.py
+2
-0
erp5/util/taskdistribution/__init__.py
erp5/util/taskdistribution/__init__.py
+13
-0
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+28
-11
No files found.
erp5/util/benchmark/scalability_launcher.py
View file @
76a58971
...
...
@@ -128,6 +128,8 @@ class ScalabilityLauncher(object):
else
:
# Here call a runScalabilityTest ( placed on product/ERP5Type/tests ) ?
self
.
log
(
"Test Case %s is running..."
%
(
current_test
.
title
))
time
.
sleep
(
5
)
self
.
log
(
"Test Case %s is finish"
%
(
current_test
.
title
))
current_test
.
stop
()
self
.
log
(
"Test Case Stopped"
)
...
...
erp5/util/taskdistribution/__init__.py
View file @
76a58971
...
...
@@ -378,6 +378,18 @@ class TestResultProxy(RPCRetry):
if
self
.
_watcher_thread
is
not
None
:
self
.
_watcher_thread
.
join
()
def
stop
(
self
):
"""
"""
return
self
.
_retryRPC
(
'stopTest'
,
[
self
.
_test_result_path
])
def
fail
(
self
):
"""
"""
return
self
.
_retryRPC
(
'failTest'
,
[
self
.
_test_result_path
])
class
TestResultProxyProxy
(
TestResultProxy
):
"""
A wrapper/proxy to TestResultProxy
...
...
@@ -416,6 +428,7 @@ class TestResultProxyProxy(TestResultProxy):
class
ServerProxy
(
xmlrpclib
.
ServerProxy
):
def
__init__
(
self
,
*
args
,
**
kw
):
...
...
erp5/util/testnode/ScalabilityTestRunner.py
View file @
76a58971
...
...
@@ -301,41 +301,58 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
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
)
# Possible ? :
# No more test to run
if
test_result_line_proxy
==
None
:
# Hum normal ?
self
.
log
(
"Already tested."
)
# Clean up
return
{
'status_code'
:
0
}
error
=
ValueError
(
"Test already tested."
)
break
;
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
(
15
)
pass
# Check test case state
if
test_result_line_proxy
.
isCompleted
():
self
.
log
(
"Test completed."
)
pass
self
.
log
(
"Test c
ase c
ompleted."
)
error
=
None
elif
not
test_result_proxy
.
isAlive
():
self
.
log
(
"Test cancelled."
)
# Here do somethig with instances
raise
ValueError
(
"Test cancelled"
)
error
=
ValueError
(
"Test cancelled"
)
break
;
elif
test_result_line_proxy
.
isFailed
():
self
.
log
(
"Test failed."
)
# Here do somethig with instances
raise
ValueError
(
"Test failed"
)
error
=
ValueError
(
"Test failed"
)
break
;
elif
test_result_line_proxy
.
isCancelled
():
self
.
log
(
"Test cancelled."
)
# Here do somethig with instances
raise
ValueError
(
"Test has been cancelled"
)
error
=
ValueError
(
"Test has been cancelled"
)
break
;
elif
test_result_line_proxy
.
isRunning
():
self
.
log
(
"Test always running after max time elapsed."
)
# Here do somethig with instances
raise
ValueError
(
"Max time for this test case is elapsed."
)
error
=
ValueError
(
"Max time for this test case is elapsed."
)
break
;
else
:
self
.
log
(
"Test in a undeterminated state."
)
raise
ValueError
(
"Test case is in an undeterminated state"
)
error
=
ValueError
(
"Test case is in an undeterminated state"
)
break
;
# Here delete intances
if
error
!=
None
:
test_result_proxy
.
fail
()
raise
error
else
:
test_result_proxy
.
stop
()
# todo : something like test_result_line_proxy.stop()
return
{
'status_code'
:
0
}
def
_cleanUpNodesInformation
(
self
):
...
...
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