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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aurélien Vermylen
erp5
Commits
77763bcf
Commit
77763bcf
authored
Aug 22, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_test_result: update ERP5Scalabilitydistributor and add tests
parent
3026d87e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
283 additions
and
68 deletions
+283
-68
bt5/erp5_test_result/DocumentTemplateItem/ERP5ScalabilityDistributor.py
...result/DocumentTemplateItem/ERP5ScalabilityDistributor.py
+5
-62
bt5/erp5_test_result/TestTemplateItem/testTaskDistribution.py
...erp5_test_result/TestTemplateItem/testTaskDistribution.py
+277
-5
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 @
77763bcf
...
...
@@ -57,13 +57,8 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
# Get lists of test node wich belong to the current distributor
all_test_node_list
=
test_node_module
.
searchFolder
(
portal_type
=
"Test Node"
,
specialise_uid
=
self
.
getUid
())
test_node_list
=
[
x
.
getObject
()
for
x
in
all_test_node_list
if
x
.
validationState
()
==
'validated'
]
invalid_test_node_list
=
[
x
.
getObject
()
for
x
in
all_test_node_list
if
x
.
validationState
()
!=
'validated'
]
log
(
"test_node_list:"
)
log
([(
x
.
getTitle
(),
x
.
getMaster
())
for
x
in
test_node_list
])
log
(
"invalid_test_node_list:"
)
log
([(
x
.
getTitle
(),
x
.
getMaster
())
for
x
in
invalid_test_node_list
])
test_node_list
=
[
x
.
getObject
()
for
x
in
all_test_node_list
if
x
.
getValidationState
()
==
'validated'
]
invalid_test_node_list
=
[
x
.
getObject
()
for
x
in
all_test_node_list
if
x
.
getValidationState
()
!=
'validated'
]
# Set master property to False for all invalid testnode
for
node
in
invalid_test_node_list
:
...
...
@@ -73,17 +68,9 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
slave_test_node_list
=
[
x
.
getObject
()
for
x
in
test_node_list
if
x
.
getMaster
()
!=
True
]
master_test_node_list
=
[
x
.
getObject
()
for
x
in
test_node_list
if
x
.
getMaster
()
==
True
]
log
(
"---2--"
)
log
(
"test_node_list:"
)
log
([(
x
.
getTitle
(),
x
.
getMaster
())
for
x
in
test_node_list
])
log
(
"invalid_test_node_list:"
)
log
([(
x
.
getTitle
(),
x
.
getMaster
())
for
x
in
invalid_test_node_list
])
log
(
"slave_test_node_list:"
)
log
([(
x
.
getTitle
(),
x
.
getMaster
())
for
x
in
slave_test_node_list
])
log
(
"master_test_node_list:"
)
log
([(
x
.
getTitle
(),
x
.
getMaster
())
for
x
in
master_test_node_list
])
# Set to 'False' slaves
for
node
in
slave_test_node_list
:
node
.
setMaster
(
False
)
# if there is validated testnodes
if
len
(
test_node_list
)
>
0
:
...
...
@@ -102,16 +89,6 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
slave_test_node_list
=
[
x
.
getObject
()
for
x
in
test_node_list
if
x
.
getMaster
()
!=
True
]
master_test_node_list
=
[
x
.
getObject
()
for
x
in
test_node_list
if
x
.
getMaster
()
==
True
]
log
(
"---3--"
)
log
(
"test_node_list:"
)
log
([(
x
.
getTitle
(),
x
.
getMaster
())
for
x
in
test_node_list
])
log
(
"invalid_test_node_list:"
)
log
([(
x
.
getTitle
(),
x
.
getMaster
())
for
x
in
invalid_test_node_list
])
log
(
"slave_test_node_list:"
)
log
([(
x
.
getTitle
(),
x
.
getMaster
())
for
x
in
slave_test_node_list
])
log
(
"master_test_node_list:"
)
log
([(
x
.
getTitle
(),
x
.
getMaster
())
for
x
in
master_test_node_list
])
# Get test suites and aggregate them to all valid testnode
test_suite_list
=
[
x
.
getTitle
()
for
x
in
test_suite_module
.
searchFolder
(
portal_type
=
"Scalability Test Suite"
,
...
...
@@ -119,8 +96,6 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
for
test_node
in
test_node_list
:
test_node
.
setAggregateList
(
test_suite_list
)
security
.
declarePublic
(
"getInvolvedNodeList"
)
def
getInvolvedNodeList
(
self
):
"""
...
...
@@ -132,36 +107,6 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
involved_nodes
=
involved_nodes
+
[
x
.
getObject
()
for
x
in
test_node_module
.
searchFolder
(
validation_state
=
'validated'
)
if
(
x
.
getSpecialiseTitle
()
==
distributor_title
)
]
return
involved_nodes
security
.
declarePublic
(
"subscribeNode"
)
def
subscribeNode
(
self
,
title
,
computer_guid
,
batch_mode
=
0
):
"""
subscribeNode doc
"""
test_node_module
=
self
.
_getTestNodeModule
()
portal
=
self
.
getPortalObject
()
tag
=
"%s_%s"
%
(
self
.
getRelativeUrl
(),
title
)
if
portal
.
portal_activities
.
countMessageWithTag
(
tag
)
==
0
:
test_node_list
=
test_node_module
.
searchFolder
(
portal_type
=
"Test Node"
,
title
=
title
)
assert
len
(
test_node_list
)
in
(
0
,
1
),
"Unable to find testnode : %s"
%
title
test_node
=
None
if
len
(
test_node_list
)
==
1
:
test_node
=
test_node_list
[
0
].
getObject
()
if
test_node
.
getValidationState
()
!=
'validated'
:
try
:
test_node
.
validate
()
except
e
:
LOG
(
'Test Node Validate'
,
ERROR
,
'%s'
%
e
)
if
test_node
is
None
:
test_node
=
test_node_module
.
newContent
(
portal_type
=
"Test Node"
,
title
=
title
,
computer_guid
=
computer_guid
,
specialise
=
self
.
getRelativeUrl
(),
activate_kw
=
{
'tag'
:
tag
})
self
.
activate
(
after_tag
=
tag
).
optimizeConfiguration
()
test_node
.
setPingDate
()
return
test_node
return
None
security
.
declarePublic
(
"getTestNode"
)
def
getTestNode
(
self
,
title
,
batch_mode
=
0
):
"""
...
...
@@ -201,7 +146,6 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
else
:
return
False
security
.
declarePublic
(
"getTestType"
)
def
getTestType
(
self
,
batch_mode
=
0
):
"""
...
...
@@ -209,7 +153,6 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor):
"""
return
'ScalabilityTest'
security
.
declarePublic
(
"startTestSuite"
)
def
startTestSuite
(
self
,
title
,
batch_mode
=
0
):
"""
...
...
bt5/erp5_test_result/TestTemplateItem/testTaskDistribution.py
View file @
77763bcf
This diff is collapsed.
Click to expand it.
bt5/erp5_test_result/bt/revision
View file @
77763bcf
263
\ No newline at end of file
264
\ 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