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
Matevz Golob
erp5
Commits
c5fa46d0
Commit
c5fa46d0
authored
Sep 04, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_test_result: ERP5ScalabilityDistributor, cleanup and rename method
parent
1f41e6e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
109 deletions
+7
-109
bt5/erp5_test_result/DocumentTemplateItem/ERP5ScalabilityDistributor.py
...result/DocumentTemplateItem/ERP5ScalabilityDistributor.py
+6
-108
bt5/erp5_test_result/bt/revision
bt5/erp5_test_result/bt/revision
+1
-1
No files found.
bt5/erp5_test_result/DocumentTemplateItem/ERP5ScalabilityDistributor.py
View file @
c5fa46d0
...
@@ -72,6 +72,7 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
...
@@ -72,6 +72,7 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
for
node
in
slave_test_node_list
:
for
node
in
slave_test_node_list
:
node
.
setMaster
(
False
)
node
.
setMaster
(
False
)
# if there is validated testnodes
# if there is validated testnodes
if
len
(
test_node_list
)
>
0
:
if
len
(
test_node_list
)
>
0
:
# Only one testnode must be the master
# Only one testnode must be the master
...
@@ -130,8 +131,6 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
...
@@ -130,8 +131,6 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
return
test_node
return
test_node
return
None
return
None
security
.
declarePublic
(
"isMasterTestnode"
)
security
.
declarePublic
(
"isMasterTestnode"
)
def
isMasterTestnode
(
self
,
title
,
batch_mode
=
0
):
def
isMasterTestnode
(
self
,
title
,
batch_mode
=
0
):
"""
"""
...
@@ -146,6 +145,7 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
...
@@ -146,6 +145,7 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
else
:
else
:
return
False
return
False
security
.
declarePublic
(
"getTestType"
)
security
.
declarePublic
(
"getTestType"
)
def
getTestType
(
self
,
batch_mode
=
0
):
def
getTestType
(
self
,
batch_mode
=
0
):
"""
"""
...
@@ -153,6 +153,7 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
...
@@ -153,6 +153,7 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
"""
"""
return
'ScalabilityTest'
return
'ScalabilityTest'
security
.
declarePublic
(
"startTestSuite"
)
security
.
declarePublic
(
"startTestSuite"
)
def
startTestSuite
(
self
,
title
,
batch_mode
=
0
):
def
startTestSuite
(
self
,
title
,
batch_mode
=
0
):
"""
"""
...
@@ -227,112 +228,9 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
...
@@ -227,112 +228,9 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
return
generated_configuration
return
generated_configuration
return
json
.
dumps
(
generated_configuration
)
return
json
.
dumps
(
generated_configuration
)
def
getRunningTestCase
(
self
,
test_result_path
,
batch_mode
=
0
):
security
.
declarePublic
(
"getTestCaseSimulationState"
)
def
getTestCaseSimulationState
(
self
,
test_result_line_path
,
batch_mode
=
0
):
"""
getTestCaseSimulationState : return getTestCaseSimulationState of test result line
"""
portal
=
self
.
getPortalObject
()
test_result_line
=
portal
.
restrictedTraverse
(
test_result_line_path
)
return
test_result_line
.
getSimulationState
()
security
.
declarePublic
(
"isTestCaseRunning"
)
def
isTestCaseRunning
(
self
,
test_result_line_path
,
batch_mode
=
0
):
"""
isTestCaseRunning : return True if test case is running
"""
return
self
.
getTestCaseSimulationState
(
test_result_line_path
)
==
'started'
security
.
declarePublic
(
"isTestCaseFailed"
)
def
isTestCaseFailed
(
self
,
test_result_line_path
,
batch_mode
=
0
):
"""
isTestCaseFailed : return True if test case is Failed
"""
return
self
.
getTestCaseSimulationState
(
test_result_line_path
)
==
'failed'
security
.
declarePublic
(
"isTestCaseCompleted"
)
def
isTestCaseCompleted
(
self
,
test_result_line_path
,
batch_mode
=
0
):
"""
isTestCaseCompleted : return True if test case is completed
"""
return
self
.
getTestCaseSimulationState
(
test_result_line_path
)
==
'stopped'
security
.
declarePublic
(
"isTestCaseCancelled"
)
def
isTestCaseCancelled
(
self
,
test_result_line_path
,
batch_mode
=
0
):
"""
isTestCaseCancelled : return True if test case is cancelled
"""
return
self
.
getTestCaseSimulationState
(
test_result_line_path
)
==
'cancelled'
security
.
declarePublic
(
"setTestCaseSimulationState"
)
def
setTestCaseSimulationState
(
self
,
test_result_line_path
,
state
,
batch_mode
=
0
):
"""
setTestCasesimulationState : set the Simulation state of a test case/test result line
"""
portal
=
self
.
getPortalObject
()
test_result_line
=
portal
.
restrictedTraverse
(
test_result_line_path
)
return
test_result_line
.
setSimulationState
(
state
)
security
.
declarePublic
(
"startTestCase"
)
def
startTestCase
(
self
,
test_result_line_path
,
batch_mode
=
0
):
"""
startTestCase : change the simulation state of the test Case(result line) to started
"""
portal
=
self
.
getPortalObject
()
test_result_line
=
portal
.
restrictedTraverse
(
test_result_line_path
)
test_result_line
.
start
()
security
.
declarePublic
(
"stopTestCase"
)
def
stopTestCase
(
self
,
test_result_line_path
,
batch_mode
=
0
):
"""
stopTestCase : change the simulation state of the test Case(result line) to stopped
"""
portal
=
self
.
getPortalObject
()
test_result_line
=
portal
.
restrictedTraverse
(
test_result_line_path
)
test_result_line
.
stop
()
security
.
declarePublic
(
"cancelTestCase"
)
def
cancelTestCase
(
self
,
test_result_line_path
,
batch_mode
=
0
):
"""
cancelTestCase : change the simulation state of the test Case(result line) to cancelled
"""
portal
=
self
.
getPortalObject
()
test_result_line
=
portal
.
restrictedTraverse
(
test_result_line_path
)
test_result_line
.
cancel
()
security
.
declarePublic
(
"getTestResult"
)
def
getTestResult
(
self
,
test_result_path
,
batch_mode
=
0
):
"""
xxx :
"""
portal
=
self
.
getPortalObject
()
test_result
=
portal
.
restrictedTraverse
(
test_result_path
)
return
test_result
security
.
declarePublic
(
"stopTest"
)
def
stopTest
(
self
,
test_result_path
,
batch_mode
=
0
):
"""
xxx :
"""
portal
=
self
.
getPortalObject
()
test_result
=
portal
.
restrictedTraverse
(
test_result_path
)
return
test_result
.
stop
()
security
.
declarePublic
(
"failTest"
)
def
failTest
(
self
,
test_result_path
,
batch_mode
=
0
):
"""
xxx :
"""
portal
=
self
.
getPortalObject
()
test_result
=
portal
.
restrictedTraverse
(
test_result_path
)
return
test_result
.
fail
()
def
getNextTestCase
(
self
,
test_result_path
,
batch_mode
=
0
):
"""
"""
get
Next
TestCase : return informations about the running test case,
get
Running
TestCase : return informations about the running test case,
if no running test_case, return None
if no running test_case, return None
"""
"""
test_result
=
self
.
getTestResult
(
test_result_path
)
test_result
=
self
.
getTestResult
(
test_result_path
)
...
@@ -355,4 +253,4 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
...
@@ -355,4 +253,4 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
if
batch_mode
:
if
batch_mode
:
return
next_test
return
next_test
return
json
.
dumps
(
next_test
)
return
json
.
dumps
(
next_test
)
\ No newline at end of file
\ No newline at end of file
bt5/erp5_test_result/bt/revision
View file @
c5fa46d0
270
271
\ No newline at end of file
\ No newline at end of file
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