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
Alexander Emmerich
erp5
Commits
56ac53ac
Commit
56ac53ac
authored
Oct 27, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: fix a few typos
parent
ba57396c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+2
-2
erp5/util/testnode/SlapOSControler.py
erp5/util/testnode/SlapOSControler.py
+11
-11
erp5/util/testnode/testnode.py
erp5/util/testnode/testnode.py
+3
-3
No files found.
erp5/tests/testERP5TestNode.py
View file @
56ac53ac
...
@@ -439,7 +439,7 @@ shared = true
...
@@ -439,7 +439,7 @@ shared = true
def
test_05e_IgnoringIncorrectRepository
(
self
):
def
test_05e_IgnoringIncorrectRepository
(
self
):
"""
"""
If someone add a test suite with a bad url for git repository (or wrong
If someone add a test suite with a bad url for git repository (or wrong
cre
n
dentials), the testnode should not block forever and should work on
credentials), the testnode should not block forever and should work on
other test suites. This method should be able to run
other test suites. This method should be able to run
"""
"""
self
.
generateTestRepositoryList
()
self
.
generateTestRepositoryList
()
...
@@ -824,7 +824,7 @@ shared = true
...
@@ -824,7 +824,7 @@ shared = true
def
patch_startTestSuite
(
self
,
node_title
,
computer_guid
=
'unknown'
):
def
patch_startTestSuite
(
self
,
node_title
,
computer_guid
=
'unknown'
):
global
counter
global
counter
config_list
=
[]
config_list
=
[]
# Sc
l
alability slave testnode is not directly in charge of testsuites
# Scalability slave testnode is not directly in charge of testsuites
if
my_test_type
==
'ScalabilityTest'
and
grade
==
'slave'
:
if
my_test_type
==
'ScalabilityTest'
and
grade
==
'slave'
:
if
counter
==
5
:
if
counter
==
5
:
raise
StopIteration
raise
StopIteration
...
...
erp5/util/testnode/SlapOSControler.py
View file @
56ac53ac
...
@@ -112,7 +112,7 @@ class SlapOSControler(object):
...
@@ -112,7 +112,7 @@ class SlapOSControler(object):
def
request
(
self
,
reference
,
software_url
,
software_type
=
None
,
def
request
(
self
,
reference
,
software_url
,
software_type
=
None
,
software_configuration
=
None
,
computer_guid
=
None
,
state
=
'started'
):
software_configuration
=
None
,
computer_guid
=
None
,
state
=
'started'
):
"""
"""
configuration_file_path (slapos acount)
configuration_file_path (slapos ac
c
ount)
reference : instance title
reference : instance title
software_url : software path/url
software_url : software path/url
software_type : scalability
software_type : scalability
...
@@ -124,14 +124,14 @@ class SlapOSControler(object):
...
@@ -124,14 +124,14 @@ class SlapOSControler(object):
"""
"""
logger
.
debug
(
'SlapOSControler : request-->SlapOSMaster'
)
logger
.
debug
(
'SlapOSControler : request-->SlapOSMaster'
)
current_intance_config
=
{
'software_type'
:
software_type
,
self
.
instance_config
[
reference
]
=
{
'software_configuration'
:
software_configuration
,
'software_type'
:
software_type
,
'computer_guid'
:
computer_guid
,
'software_configuration'
:
software_configuration
,
'software_url'
:
software_url
,
'computer_guid'
:
computer_guid
,
'requested_state'
:
state
,
'software_url'
:
software_url
,
'partition'
:
None
'requested_state'
:
state
,
}
'partition'
:
None
self
.
instance_config
[
reference
]
=
current_intance_config
}
filter_kw
=
None
filter_kw
=
None
if
computer_guid
!=
None
:
if
computer_guid
!=
None
:
...
@@ -319,7 +319,7 @@ class SlapOSControler(object):
...
@@ -319,7 +319,7 @@ class SlapOSControler(object):
logger
.
debug
(
"SlapOSControler.runSoftwareRelease"
)
logger
.
debug
(
"SlapOSControler.runSoftwareRelease"
)
# Set some flags to maximize CPU utilization
# Set some flags to maximize CPU utilization
# We usually have several testnode instances running on the same server, so
# We usually have several testnode instances running on the same server, so
# each testnode process should try to use the maximum amout of resources,
# each testnode process should try to use the maximum amou
n
t of resources,
# yet leaving some resources for other instances on the machine.
# yet leaving some resources for other instances on the machine.
# A typical scenario is we have all testnode re-compiling softwares at the
# A typical scenario is we have all testnode re-compiling softwares at the
# same time because of change in repository that would cause all test nodes
# same time because of change in repository that would cause all test nodes
...
@@ -362,7 +362,7 @@ class SlapOSControler(object):
...
@@ -362,7 +362,7 @@ class SlapOSControler(object):
raise
ValueError
(
"Unable to registerOpenOrder"
)
raise
ValueError
(
"Unable to registerOpenOrder"
)
# try to run for all partitions as one partition may in theory request another one
# try to run for all partitions as one partition may in theory request another one
# this not always is required but curently no way to know how "tree" of partitions
# this not always is required but cur
r
ently no way to know how "tree" of partitions
# may "expand"
# may "expand"
for
_
in
range
(
max_quantity
):
for
_
in
range
(
max_quantity
):
status_dict
=
self
.
spawn
(
config
[
'slapos_binary'
],
'node'
,
'instance'
,
status_dict
=
self
.
spawn
(
config
[
'slapos_binary'
],
'node'
,
'instance'
,
...
...
erp5/util/testnode/testnode.py
View file @
56ac53ac
...
@@ -280,7 +280,7 @@ shared = true
...
@@ -280,7 +280,7 @@ shared = true
node_title
=
config
[
'test_node_title'
],
node_title
=
config
[
'test_node_title'
],
computer_guid
=
config
[
'computer_id'
])
computer_guid
=
config
[
'computer_id'
])
if
type
(
node_configuration
)
is
str
:
if
type
(
node_configuration
)
is
str
:
# Backward compatiblity
# Backward compatib
i
lity
node_configuration
=
json
.
loads
(
node_configuration
)
node_configuration
=
json
.
loads
(
node_configuration
)
if
node_configuration
is
not
None
and
\
if
node_configuration
is
not
None
and
\
'process_timeout'
in
node_configuration
\
'process_timeout'
in
node_configuration
\
...
@@ -293,7 +293,7 @@ shared = true
...
@@ -293,7 +293,7 @@ shared = true
node_title
=
config
[
'test_node_title'
],
node_title
=
config
[
'test_node_title'
],
computer_guid
=
config
[
'computer_id'
])
computer_guid
=
config
[
'computer_id'
])
if
type
(
test_suite_data
)
is
str
:
if
type
(
test_suite_data
)
is
str
:
# Backward compatiblity
# Backward compatib
i
lity
test_suite_data
=
json
.
loads
(
test_suite_data
)
test_suite_data
=
json
.
loads
(
test_suite_data
)
test_suite_data
=
deunicodeData
(
test_suite_data
)
test_suite_data
=
deunicodeData
(
test_suite_data
)
logger
.
info
(
"Got following test suite data from master : %r"
,
logger
.
info
(
"Got following test suite data from master : %r"
,
...
@@ -432,7 +432,7 @@ shared = true
...
@@ -432,7 +432,7 @@ shared = true
raise
raise
finally
:
finally
:
# Nice way to kill *everything* generated by run process -- process
# Nice way to kill *everything* generated by run process -- process
# groups working only in POSIX comp
il
ant systems
# groups working only in POSIX comp
li
ant systems
# Exceptions are swallowed during cleanup phase
# Exceptions are swallowed during cleanup phase
logger
.
info
(
"GENERAL EXCEPTION, QUITING"
)
logger
.
info
(
"GENERAL EXCEPTION, QUITING"
)
self
.
cleanUp
()
self
.
cleanUp
()
...
...
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