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
alecs_myu
erp5
Commits
4d50b6ca
Commit
4d50b6ca
authored
Jun 17, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change 'dict of list' to 'dict' in the software installation control of ScalabilityTestRunner
parent
4cf2bb01
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
+9
-15
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+9
-15
No files found.
erp5/util/testnode/ScalabilityTestRunner.py
View file @
4d50b6ca
...
...
@@ -60,7 +60,7 @@ class ScalabilityTestRunner():
self
.
testnode
.
config
)
self
.
remaining_software_installation_
grid
=
{}
self
.
remaining_software_installation_
dict
=
{}
# Protection to prevent installation of softwares after checking
self
.
authorize_supply
=
True
...
...
@@ -74,10 +74,7 @@ class ScalabilityTestRunner():
"""
self
.
testnode
.
log
(
"testnode, supply : %s %s"
,
software_path
,
computer_guid
)
if
self
.
authorize_supply
:
if
not
computer_guid
in
self
.
remaining_software_installation_grid
:
# Add computer_guid to the grid if it isn't
self
.
remaining_software_installation_grid
[
computer_guid
]
=
[]
self
.
remaining_software_installation_grid
[
computer_guid
].
append
(
software_path
)
self
.
remaining_software_installation_dict
[
computer_guid
]
=
software_path
self
.
slapos_controler
.
supply
(
software_path
,
computer_guid
)
# Here make a request via slapos controler ?
return
{
'status_code'
:
0
}
...
...
@@ -104,7 +101,7 @@ class ScalabilityTestRunner():
late a SlapOS (positive) answer."
%
(
str
(
os
.
getpid
()),)
signal
.
signal
(
signal
.
SIGTERM
,
self
.
_getSignal
)
def
_comeBackFromDummySlapOS
(
self
):
print
"Dummy slapOS answer disabled"
print
"Dummy slapOS answer disabled
, please don't send more signals.
"
# use SIG_USR (kill)
signal
.
signal
(
signal
.
SIGTERM
,
signal
.
SIG_DFL
)
def
simulateSlapOSAnswer
(
self
):
...
...
@@ -128,14 +125,11 @@ late a SlapOS (positive) answer." %(str(os.getpid()),)
Return True if it remains softwares to install, otherwise return False
"""
# Remove from grid installed software entries
for
computer_guid
,
v
in
self
.
remaining_software_installation_grid
.
items
():
for
software_url
in
v
:
if
self
.
isSoftwareReleaseReady
(
software_url
,
computer_guid
):
self
.
remaining_software_installation_grid
[
computer_guid
].
remove
(
software_url
)
if
len
(
self
.
remaining_software_installation_grid
[
computer_guid
])
==
0
:
del
self
.
remaining_software_installation_grid
[
computer_guid
]
for
computer_guid
,
software_path
in
self
.
remaining_software_installation_dict
.
items
():
if
self
.
isSoftwareReleaseReady
(
software_path
,
computer_guid
):
del
self
.
remaining_software_installation_dict
[
computer_guid
]
# Not empty grid means that all softwares are not installed
return
len
(
self
.
remaining_software_installation_
grid
)
>
0
return
len
(
self
.
remaining_software_installation_
dict
)
>
0
def
prepareSlapOSForTestSuite
(
self
,
node_test_suite
):
"""
...
...
@@ -227,7 +221,7 @@ late a SlapOS (positive) answer." %(str(os.getpid()),)
def
_cleanUpNodesInformation
(
self
):
self
.
involved_nodes_computer_guid
=
[]
self
.
launcher_nodes_computer_guid
=
[]
self
.
remaining_software_installation_
grid
=
{}
self
.
remaining_software_installation_
dict
=
{}
self
.
authorize_supply
=
True
def
runTestSuite
(
self
,
node_test_suite
,
portal_url
,
log
=
None
):
...
...
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