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
Klaus Wölfel
erp5
Commits
9d356026
Commit
9d356026
authored
Nov 27, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ERP5] Mark most Task Distribution logs as DEBUG
parent
6272a90c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
+5
-5
product/ERP5/Tool/TaskDistributionTool.py
product/ERP5/Tool/TaskDistributionTool.py
+8
-8
No files found.
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
View file @
9d356026
...
@@ -34,7 +34,7 @@ import itertools
...
@@ -34,7 +34,7 @@ import itertools
from
copy
import
deepcopy
from
copy
import
deepcopy
import
random
import
random
import
string
import
string
from
zLOG
import
LOG
,
INFO
,
ERROR
from
zLOG
import
LOG
,
DEBUG
,
ERROR
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
...
@@ -391,7 +391,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
...
@@ -391,7 +391,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
to_delete_key_list
=
[
x
for
x
,
y
in
config
.
items
()
if
y
==
None
]
to_delete_key_list
=
[
x
for
x
,
y
in
config
.
items
()
if
y
==
None
]
[
config
.
pop
(
x
)
for
x
in
to_delete_key_list
]
[
config
.
pop
(
x
)
for
x
in
to_delete_key_list
]
config_list
.
append
(
config
)
config_list
.
append
(
config
)
LOG
(
'ERP5ProjectUnitTestDistributor.startTestSuite, config_list'
,
INFO
,
config_list
)
LOG
(
'ERP5ProjectUnitTestDistributor.startTestSuite, config_list'
,
DEBUG
,
config_list
)
if
batch_mode
:
if
batch_mode
:
return
config_list
return
config_list
return
json
.
dumps
(
config_list
)
return
json
.
dumps
(
config_list
)
...
@@ -402,7 +402,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
...
@@ -402,7 +402,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
"""
"""
Here this is only a proxy to the task distribution tool
Here this is only a proxy to the task distribution tool
"""
"""
LOG
(
'ERP5ProjectUnitTestDistributor.createTestResult'
,
0
,
(
node_title
,
test_title
))
LOG
(
'ERP5ProjectUnitTestDistributor.createTestResult'
,
DEBUG
,
(
node_title
,
test_title
))
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
if
node_title
:
if
node_title
:
test_node
=
self
.
_getTestNodeFromTitle
(
node_title
)
test_node
=
self
.
_getTestNodeFromTitle
(
node_title
)
...
@@ -452,7 +452,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
...
@@ -452,7 +452,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
"""
"""
Here this is only a proxy to the task distribution tool
Here this is only a proxy to the task distribution tool
"""
"""
LOG
(
'ERP5ProjectUnitTestDistributor.startUnitTest'
,
0
,
test_result_path
)
LOG
(
'ERP5ProjectUnitTestDistributor.startUnitTest'
,
DEBUG
,
test_result_path
)
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
return
portal
.
portal_task_distribution
.
startUnitTest
(
test_result_path
,
exclude_list
,
return
portal
.
portal_task_distribution
.
startUnitTest
(
test_result_path
,
exclude_list
,
node_title
=
node_title
)
node_title
=
node_title
)
...
@@ -462,7 +462,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
...
@@ -462,7 +462,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
"""
"""
Here this is only a proxy to the task distribution tool
Here this is only a proxy to the task distribution tool
"""
"""
LOG
(
'ERP5ProjectUnitTestDistributor.stop_unit_test'
,
0
,
test_path
)
LOG
(
'ERP5ProjectUnitTestDistributor.stop_unit_test'
,
DEBUG
,
test_path
)
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
return
portal
.
portal_task_distribution
.
stopUnitTest
(
test_path
,
status_dict
,
return
portal
.
portal_task_distribution
.
stopUnitTest
(
test_path
,
status_dict
,
node_title
=
node_title
)
node_title
=
node_title
)
...
...
product/ERP5/Tool/TaskDistributionTool.py
View file @
9d356026
...
@@ -32,7 +32,7 @@ from AccessControl import ClassSecurityInfo
...
@@ -32,7 +32,7 @@ from AccessControl import ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
Constraint
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
Constraint
,
interfaces
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
,
NegatedQuery
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
,
NegatedQuery
from
zLOG
import
LOG
from
zLOG
import
LOG
,
DEBUG
from
xmlrpclib
import
Binary
from
xmlrpclib
import
Binary
class
TaskDistributionTool
(
BaseTool
):
class
TaskDistributionTool
(
BaseTool
):
...
@@ -88,7 +88,7 @@ class TaskDistributionTool(BaseTool):
...
@@ -88,7 +88,7 @@ class TaskDistributionTool(BaseTool):
-> (test_result_path, revision) or None if already completed
-> (test_result_path, revision) or None if already completed
"""
"""
LOG
(
'createTestResult'
,
0
,
(
name
,
revision
,
test_title
,
project_title
))
LOG
(
'createTestResult'
,
DEBUG
,
(
name
,
revision
,
test_title
,
project_title
))
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
if
test_title
is
None
:
if
test_title
is
None
:
test_title
=
name
test_title
=
name
...
@@ -250,7 +250,7 @@ class TaskDistributionTool(BaseTool):
...
@@ -250,7 +250,7 @@ class TaskDistributionTool(BaseTool):
- status_dict (dict)
- status_dict (dict)
"""
"""
status_dict
=
self
.
_extractXMLRPCDict
(
status_dict
)
status_dict
=
self
.
_extractXMLRPCDict
(
status_dict
)
LOG
(
"TaskDistributionTool.stopUnitTest"
,
0
,
repr
((
test_path
,
status_dict
)))
LOG
(
"TaskDistributionTool.stopUnitTest"
,
DEBUG
,
repr
((
test_path
,
status_dict
)))
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
line
=
portal
.
restrictedTraverse
(
test_path
)
line
=
portal
.
restrictedTraverse
(
test_path
)
test_result
=
line
.
getParentValue
()
test_result
=
line
.
getParentValue
()
...
@@ -273,8 +273,8 @@ class TaskDistributionTool(BaseTool):
...
@@ -273,8 +273,8 @@ class TaskDistributionTool(BaseTool):
"""report failure when a node can not handle task
"""report failure when a node can not handle task
"""
"""
status_dict
=
self
.
_extractXMLRPCDict
(
status_dict
)
status_dict
=
self
.
_extractXMLRPCDict
(
status_dict
)
LOG
(
"TaskDistributionTool.reportTaskFailure"
,
0
,
repr
((
test_result_path
,
LOG
(
"TaskDistributionTool.reportTaskFailure"
,
DEBUG
,
repr
((
test_result_path
,
status_dict
)))
status_dict
)))
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
test_result
=
portal
.
restrictedTraverse
(
test_result_path
)
test_result
=
portal
.
restrictedTraverse
(
test_result_path
)
test_result_node
=
self
.
_getTestResultNode
(
test_result
,
node_title
)
test_result_node
=
self
.
_getTestResultNode
(
test_result
,
node_title
)
...
@@ -316,8 +316,8 @@ class TaskDistributionTool(BaseTool):
...
@@ -316,8 +316,8 @@ class TaskDistributionTool(BaseTool):
"""report status of node
"""report status of node
"""
"""
status_dict
=
self
.
_extractXMLRPCDict
(
status_dict
)
status_dict
=
self
.
_extractXMLRPCDict
(
status_dict
)
LOG
(
"TaskDistributionTool.reportTaskStatus"
,
0
,
repr
((
test_result_path
,
LOG
(
"TaskDistributionTool.reportTaskStatus"
,
DEBUG
,
repr
((
test_result_path
,
status_dict
)))
status_dict
)))
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
test_result
=
portal
.
restrictedTraverse
(
test_result_path
)
test_result
=
portal
.
restrictedTraverse
(
test_result_path
)
node
=
self
.
_getTestResultNode
(
test_result
,
node_title
)
node
=
self
.
_getTestResultNode
(
test_result
,
node_title
)
...
@@ -329,7 +329,7 @@ class TaskDistributionTool(BaseTool):
...
@@ -329,7 +329,7 @@ class TaskDistributionTool(BaseTool):
def
isTaskAlive
(
self
,
test_result_path
):
def
isTaskAlive
(
self
,
test_result_path
):
"""check status of a test suite
"""check status of a test suite
"""
"""
LOG
(
"TaskDistributionTool.checkTaskStatus"
,
0
,
repr
(
test_result_path
))
LOG
(
"TaskDistributionTool.checkTaskStatus"
,
DEBUG
,
repr
(
test_result_path
))
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
test_result
=
portal
.
restrictedTraverse
(
test_result_path
)
test_result
=
portal
.
restrictedTraverse
(
test_result_path
)
return
test_result
.
getSimulationState
()
==
"started"
and
1
or
0
return
test_result
.
getSimulationState
()
==
"started"
and
1
or
0
...
...
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