Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Lu Xu
slapos.toolbox
Commits
47ef1360
Commit
47ef1360
authored
Nov 19, 2014
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resiliencytest: add support for classical erp5testnode.
parent
2a5c819c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
setup.py
setup.py
+2
-1
slapos/resiliencytest/__init__.py
slapos/resiliencytest/__init__.py
+33
-1
No files found.
setup.py
View file @
47ef1360
...
...
@@ -67,7 +67,8 @@ setup(name=name,
'htpasswd = slapos.htpasswd:main'
,
'is-local-tcp-port-opened = slapos.promise.is_local_tcp_port_opened:main'
,
'killpidfromfile = slapos.systool:killpidfromfile'
,
# BBB
'runResiliencyTest = slapos.resiliencytest:runResiliencyTest'
,
'runResiliencyUnitTestTestNode = slapos.resiliencytest:runUnitTest'
,
'runResiliencyScalabilityTestNode = slapos.resiliencytest:runResiliencyTest'
,
'runStandaloneResiliencyTest = slapos.resiliencytest:runStandaloneResiliencyTest'
,
'lampconfigure = slapos.lamp:run [lampconfigure]'
,
'onetimedownload = slapos.onetimedownload:main'
,
...
...
slapos/resiliencytest/__init__.py
View file @
47ef1360
...
...
@@ -31,7 +31,6 @@ import json
import
importlib
import
logging
import
os
import
sys
import
time
import
traceback
from
erp5.util
import
taskdistribution
...
...
@@ -226,6 +225,39 @@ def runResiliencyTest():
sys
.
exit
(
exit_status
)
def
runUnitTest
():
"""
Function meant to be run by "classical" (a.k.a UnitTest) erp5testnode.
"""
logger
=
setupLogging
(
'runScalabilityTestSuite'
,
None
)
args
=
parseArguments
()
master
=
taskdistribution
.
TaskDistributionTool
(
args
.
test_suite_master_url
)
test_suite_title
=
args
.
test_suite_title
or
args
.
test_suite
revision
=
args
.
revision
test_result
=
master
.
createTestResult
(
revision
,
[
test_suite_title
],
args
.
node_title
,
True
,
test_suite_title
,
'foo'
)
#args.project_title)
test_line
=
test_result
.
start
()
start_time
=
time
.
time
()
success
=
runTestSuite
(
args
.
test_suite
,
args
.
additional_arguments
,
logger
.
info
,
)
if
success
:
error_count
=
0
else
:
error_count
=
1
test_duration
=
time
.
time
()
-
start_time
test_line
.
stop
(
stdout
=
'Success'
,
test_count
=
1
,
error_count
=
error_count
,
duration
=
test_duration
)
def
runStandaloneResiliencyTest
():
"""
Used to bypass the Test Node infrastructure and manually run a test.
...
...
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