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
Mikolaï Krol
erp5
Commits
f15b6980
Commit
f15b6980
authored
Jun 10, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update
parent
e99bc4ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
24 deletions
+25
-24
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+2
-6
erp5/util/testnode/testnode.py
erp5/util/testnode/testnode.py
+23
-18
No files found.
erp5/util/testnode/ScalabilityTestRunner.py
View file @
f15b6980
...
@@ -49,12 +49,8 @@ class ScalabilityTestRunner():
...
@@ -49,12 +49,8 @@ class ScalabilityTestRunner():
self
.
testnode
.
working_directory
,
self
.
testnode
.
working_directory
,
self
.
testnode
.
config
,
self
.
testnode
.
config
,
self
.
testnode
.
log
)
self
.
testnode
.
log
)
self
.
involved_nodes
=
[]
# doesn't change during all the test
# {'COMPX' : ['soft_path1.cfg', 'soft_path2.cfg'],
self
.
worker_nodes
=
[]
# may change between two test_suite
# 'COMPY' : ['soft_path1.cfg'], ... }
self
.
launcher_nodes
=
[]
# may change between two test_suite
self
.
master_nodes
=
[]
# doesn't change during all the test
self
.
slave_nodes
=
[]
# doesn't change during all the test
self
.
remaining_software_installation_grid
=
{}
self
.
remaining_software_installation_grid
=
{}
# Protection to prevent installation of softwares after checking
# Protection to prevent installation of softwares after checking
self
.
still_supply_to_request
=
True
self
.
still_supply_to_request
=
True
...
...
erp5/util/testnode/testnode.py
View file @
f15b6980
...
@@ -316,14 +316,13 @@ branch = %(branch)s
...
@@ -316,14 +316,13 @@ branch = %(branch)s
test_node_slapos
=
SlapOSInstance
()
test_node_slapos
=
SlapOSInstance
()
test_node_slapos
.
edit
(
working_directory
=
self
.
config
[
'slapos_directory'
])
test_node_slapos
.
edit
(
working_directory
=
self
.
config
[
'slapos_directory'
])
## /BLOCK OK
## /BLOCK OK
print
"computer_id:"
print
"computer_id:"
print
config
[
'computer_id'
]
print
config
[
'computer_id'
]
print
"server_url:"
print
"server_url:"
print
config
[
'server_url'
]
print
config
[
'server_url'
]
time
.
sleep
(
30
)
time
.
sleep
(
30
)
try
:
try
:
while
True
:
while
True
:
try
:
try
:
...
@@ -338,35 +337,41 @@ branch = %(branch)s
...
@@ -338,35 +337,41 @@ branch = %(branch)s
portal_url
=
config
[
'test_suite_master_url'
]
portal_url
=
config
[
'test_suite_master_url'
]
portal
=
taskdistribution
.
TaskDistributionTool
(
portal_url
,
logger
=
DummyLogger
(
log
))
portal
=
taskdistribution
.
TaskDistributionTool
(
portal_url
,
logger
=
DummyLogger
(
log
))
test_suite_portal
=
taskdistribution
.
TaskDistributor
(
portal_url
,
logger
=
DummyLogger
(
log
))
test_suite_portal
=
taskdistribution
.
TaskDistributor
(
portal_url
,
logger
=
DummyLogger
(
log
))
test_suite_json
=
test_suite_portal
.
startTestSuite
(
config
[
'test_node_title'
])
test_suite_json
=
test_suite_portal
.
startTestSuite
(
config
[
'test_node_title'
])
test_suite_data
=
deunicodeData
(
json
.
loads
(
test_suite_json
))
test_suite_data
=
deunicodeData
(
json
.
loads
(
test_suite_json
))
log
(
"Got following test suite data from master : %r"
%
\
log
(
"Got following test suite data from master : %r"
%
\
(
test_suite_data
,))
(
test_suite_data
,))
##/BLOCK OK
##/BLOCK OK
if
my_test_type
==
None
:
# Select the good runne
r
# TODO : implement this method for each distributo
r
if
my_type_test
==
None
:
# (just UnitTestDistributor should be sufficient)
# Default way to determine if it is a slability or unit test
try
:
# Here parse/get information to
my_test_type
=
portal
.
getTestType
()
# if XXX : runner = UnitTe...
except
:
# elif YYY : runner = Scal...
log
(
"testnode, error during requesting getTestType() method
\
# else : Raise ...
from the distributor."
)
raise
NotImplementedError
# But for the moment :
runner
=
UnitTestRunner
(
self
)
#
Used in testERP5TestNod
e
#
Select runner according to the test typ
e
if
my_type_test
==
'UnitTest'
:
if
my_type_test
==
'UnitTest'
:
runner
=
UnitTestRunner
(
self
)
runner
=
UnitTestRunner
(
self
)
elif
my_type_test
==
'ScalabilityTest'
:
elif
my_type_test
==
'ScalabilityTest'
:
runner
=
ScalabilityTestRunner
(
self
)
runner
=
ScalabilityTestRunner
(
self
)
else
:
else
:
log
(
"testnode, Runner type '%s' not implemented."
,
%
(
my_type_test
))
raise
NotImplementedError
raise
NotImplementedError
runner
.
prepareSlapOSForTestNode
(
test_node_slapos
)
# difference master/slave
#Clean-up test suites
# master get test_suites, slave get nothing
self
.
checkOldTestSuite
(
test_suite_data
)
if
len
(
test_suite_data
)
>
1
:
runner
.
prepareSlapOSForTestNode
(
test_node_slapos
)
#Clean-up test suites
self
.
checkOldTestSuite
(
test_suite_data
)
for
test_suite
in
test_suite_data
:
for
test_suite
in
test_suite_data
:
...
...
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