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
amrani
erp5
Commits
3e95c2cf
Commit
3e95c2cf
authored
Jun 13, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Up
parent
b7680353
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+24
-6
No files found.
erp5/util/testnode/ScalabilityTestRunner.py
View file @
3e95c2cf
...
@@ -42,7 +42,8 @@ from ProcessManager import SubprocessError, ProcessManager, CancellationError
...
@@ -42,7 +42,8 @@ from ProcessManager import SubprocessError, ProcessManager, CancellationError
from
subprocess
import
CalledProcessError
from
subprocess
import
CalledProcessError
from
Updater
import
Updater
from
Updater
import
Updater
from
erp5.util
import
taskdistribution
from
erp5.util
import
taskdistribution
# for dummy slapos answer
import
signal
class
ScalabilityTestRunner
():
class
ScalabilityTestRunner
():
...
@@ -62,7 +63,10 @@ class ScalabilityTestRunner():
...
@@ -62,7 +63,10 @@ class ScalabilityTestRunner():
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
.
authorize_supply
=
True
self
.
authorize_supply
=
True
# Used to simulate SlapOS answer
self
.
last_slapos_answer
=
[]
def
_prepareSlapOS
(
self
,
software_path
,
computer_guid
,
create_partition
=
0
):
def
_prepareSlapOS
(
self
,
software_path
,
computer_guid
,
create_partition
=
0
):
# create_partition is kept for compatibility
# create_partition is kept for compatibility
"""
"""
...
@@ -91,15 +95,27 @@ class ScalabilityTestRunner():
...
@@ -91,15 +95,27 @@ class ScalabilityTestRunner():
# software_path_list.append(self.testnode.config.get("software_list"))
# software_path_list.append(self.testnode.config.get("software_list"))
return
{
'status_code'
:
0
}
return
{
'status_code'
:
0
}
# For dummy slapos answer
# Press ctrl+c to simulate an (positive) answer from sapos master
def
_getSignal
(
self
,
signal
,
frame
):
self
.
last_slapos_answer
.
append
(
True
)
def
_prepareDummySlapOSAnswer
(
self
):
signal
.
signal
(
signal
.
SIGINT
,
self
.
_getSignal
)
def
simulateSlapOSAnswer
(
self
):
if
len
(
self
.
last_slapos_answer
)
==
0
:
return
False
else
:
return
self
.
last_slapos_answer
.
pop
()
# /For dummy slapos answer
def
isSoftwareReleaseReady
(
self
,
software_url
,
computer_guid
):
def
isSoftwareReleaseReady
(
self
,
software_url
,
computer_guid
):
"""
"""
Return true if the specified software on the specified node is installed.
Return true if the specified software on the specified node is installed.
This method should communicates with SlapOS Master.
This method should communicates with SlapOS Master.
"""
"""
# TODO : implement this method
# TODO : implement -> communication with SlapOS master
# -> communication with SlapOS master
# this simulate a SlapOS answer
# todo : simulate slapOS Master answer
return
self
.
simulateSlapOSAnswer
()
return
False
def
remainSoftwareToInstall
(
self
):
def
remainSoftwareToInstall
(
self
):
"""
"""
...
@@ -153,6 +169,8 @@ class ScalabilityTestRunner():
...
@@ -153,6 +169,8 @@ class ScalabilityTestRunner():
self
.
_prepareSlapOS
(
software_path
,
computer_guid
)
self
.
_prepareSlapOS
(
software_path
,
computer_guid
)
# From the line below we would not supply any more softwares
# From the line below we would not supply any more softwares
self
.
authorize_supply
=
False
self
.
authorize_supply
=
False
_prepareDummySlapOSAnswer
()
# Waiting until all softwares are installed
# Waiting until all softwares are installed
while
(
self
.
remainSoftwareToInstall
()
while
(
self
.
remainSoftwareToInstall
()
and
(
max_time
>
(
time
.
time
()
-
start_time
))):
and
(
max_time
>
(
time
.
time
()
-
start_time
))):
...
...
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