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
Labels
Merge Requests
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
b277c730
Commit
b277c730
authored
Sep 15, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_result: fix pylint messages and enable coding style test
parent
19408915
Pipeline
#11536
failed with stage
Changes
21
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
203 additions
and
75 deletions
+203
-75
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.ERP5ScalabilityDistributor.py
...al_components/document.erp5.ERP5ScalabilityDistributor.py
+2
-3
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.ERP5ScalabilityDistributor.xml
...l_components/document.erp5.ERP5ScalabilityDistributor.xml
+42
-3
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.TestNode.py
...tTemplateItem/portal_components/document.erp5.TestNode.py
+0
-1
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.TestNode.xml
...TemplateItem/portal_components/document.erp5.TestNode.xml
+42
-3
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.TestSuite.py
...TemplateItem/portal_components/document.erp5.TestSuite.py
+0
-1
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.TestSuite.xml
...emplateItem/portal_components/document.erp5.TestSuite.xml
+42
-3
bt5/erp5_test_result/ExtensionTemplateItem/portal_components/extension.erp5.ScalabilityTestSuiteUtils.py
...al_components/extension.erp5.ScalabilityTestSuiteUtils.py
+9
-11
bt5/erp5_test_result/ExtensionTemplateItem/portal_components/extension.erp5.ScalabilityTestSuiteUtils.xml
...l_components/extension.erp5.ScalabilityTestSuiteUtils.xml
+42
-3
bt5/erp5_test_result/ExtensionTemplateItem/portal_components/extension.erp5.TestResults.py
...plateItem/portal_components/extension.erp5.TestResults.py
+3
-12
bt5/erp5_test_result/ExtensionTemplateItem/portal_components/extension.erp5.TestResults.xml
...lateItem/portal_components/extension.erp5.TestResults.xml
+1
-6
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/BenchmarkResult_completed.xml
...rtal_skins/erp5_test_result/BenchmarkResult_completed.xml
+1
-1
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TaskDistributorAlarm_optimize.py
...l_skins/erp5_test_result/TaskDistributorAlarm_optimize.py
+1
-2
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_getDiff.py
...eItem/portal_skins/erp5_test_result/TestResult_getDiff.py
+0
-2
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_getJsonScalabilityStats.py
...ns/erp5_test_result/TestResult_getJsonScalabilityStats.py
+0
-1
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_getSummaryForRSS.py
...tal_skins/erp5_test_result/TestResult_getSummaryForRSS.py
+1
-1
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestSuiteModule_addTestSuite.py
...al_skins/erp5_test_result/TestSuiteModule_addTestSuite.py
+1
-1
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestSuite_checkParameterConsistency.py
...s/erp5_test_result/TestSuite_checkParameterConsistency.py
+13
-15
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_node_workflow/scripts/checkConsistency.py
...l_workflow/test_node_workflow/scripts/checkConsistency.py
+1
-2
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_suite_workflow/scripts/TestSuite_afterValidate.py
...ow/test_suite_workflow/scripts/TestSuite_afterValidate.py
+1
-1
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_suite_workflow/scripts/checkConsistency.py
..._workflow/test_suite_workflow/scripts/checkConsistency.py
+1
-2
bt5/erp5_test_result/bt/skip_coding_style_test
bt5/erp5_test_result/bt/skip_coding_style_test
+0
-1
No files found.
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.ERP5ScalabilityDistributor.py
View file @
b277c730
...
...
@@ -33,7 +33,6 @@ from AccessControl import ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
import
json
import
jinja2
from
erp5.component.tool.TaskDistributionTool
import
TaskDistributionTool
class
ERP5ScalabilityDistributor
(
ERP5ProjectUnitTestDistributor
,
object
):
security
=
ClassSecurityInfo
()
...
...
@@ -270,10 +269,10 @@ class ERP5ScalabilityDistributor(ERP5ProjectUnitTestDistributor, object):
if
current_container
==
my_value
:
return
True
elif
isinstance
(
current_container
,
dict
):
for
k
,
v
in
current_container
.
items
():
for
k
,
v
in
current_container
.
items
():
if
str
(
my_value
)
in
str
(
k
):
return
True
if
_isInMyDictOrList
(
current_container
[
k
]
)
:
if
_isInMyDictOrList
(
v
)
:
return
True
elif
isinstance
(
current_container
,
list
):
for
sub_container
in
current_container
:
...
...
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.ERP5ScalabilityDistributor.xml
View file @
b277c730
...
...
@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
ERP5ScalabilityDistributor
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.ERP5ScalabilityDistributor
</string>
</value>
...
...
@@ -24,6 +36,18 @@
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
...
...
@@ -31,13 +55,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -50,7 +89,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -59,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.TestNode.py
View file @
b277c730
from
Products.ERP5Type.XMLObject
import
XMLObject
from
DateTime
import
DateTime
from
zLOG
import
LOG
,
INFO
,
ERROR
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
...
...
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.TestNode.xml
View file @
b277c730
...
...
@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
TestNode
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.TestNode
</string>
</value>
...
...
@@ -24,6 +36,18 @@
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
...
...
@@ -31,13 +55,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -50,7 +89,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -59,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.TestSuite.py
View file @
b277c730
from
Products.ERP5Type.XMLObject
import
XMLObject
from
DateTime
import
DateTime
from
zLOG
import
LOG
,
INFO
,
ERROR
from
AccessControl
import
ClassSecurityInfo
from
Acquisition
import
aq_base
from
Products.ERP5Type
import
Permissions
...
...
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.TestSuite.xml
View file @
b277c730
...
...
@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
TestSuite
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.TestSuite
</string>
</value>
...
...
@@ -24,6 +36,18 @@
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
...
...
@@ -31,13 +55,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -50,7 +89,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -59,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_test_result/ExtensionTemplateItem/portal_components/extension.erp5.ScalabilityTestSuiteUtils.py
View file @
b277c730
...
...
@@ -31,12 +31,12 @@ import json
def
getGeneratedConfigurationList
(
self
,
*
args
,
**
kw
):
document_list
=
[]
template
=
jinja2
.
Template
(
self
.
getClusterConfiguration
())
max
=
len
(
self
.
getGraphCoordinate
())
max
_
=
len
(
self
.
getGraphCoordinate
())
max_comp
=
100
#max = self.getNumberConfiguration()
comp_list_view
=
[
"COMP-%i"
%
(
x
)
for
x
in
range
(
0
,
max_comp
)
]
for
count
in
xrange
(
1
,
max
+
1
):
for
count
in
xrange
(
1
,
max
_
+
1
):
template_vars
=
{
"count"
:
count
,
"comp"
:
comp_list_view
}
output_text
=
template
.
render
(
template_vars
)
description
=
json
.
dumps
(
json
.
loads
(
output_text
),
sort_keys
=
True
,
indent
=
4
,
separators
=
(
','
,
': '
))
...
...
@@ -73,12 +73,12 @@ def generateConfigurationList(self, test_suite_title):
def
_isInMyDictOrListRec
(
my_container
,
my_value
):
def
_isInMyDictOrList
(
current_container
):
if
current_container
==
my_value
:
return
True
elif
type
(
current_container
)
==
type
({}
):
for
k
,
v
in
current_container
.
item
s
():
if
_isInMyDictOrList
(
current_container
[
k
]
)
:
return
True
elif
isinstance
(
current_container
,
dict
):
for
v
in
current_container
.
value
s
():
if
_isInMyDictOrList
(
v
)
:
return
True
elif
type
(
current_container
)
==
type
([]
):
elif
isinstance
(
current_container
,
list
):
for
sub_container
in
current_container
:
if
_isInMyDictOrList
(
sub_container
)
:
return
True
...
...
@@ -97,8 +97,6 @@ def generateConfigurationList(self, test_suite_title):
lll
=
portal_task_distribution
.
searchFolder
(
title
=
test_suite
.
getSpecialiseTitle
())
distributor_uid
=
lll
[
0
].
getUid
()
cluster_configuration
=
test_suite
.
getClusterConfiguration
()
cluster_constraint
=
test_suite
.
getClusterConstraint
()
#number_configuration = test_suite.getNumberConfiguration()
number_configuration
=
len
(
test_suite
.
getGraphCoordinate
())
randomized_path
=
test_suite
.
getRandomizedPath
()
# Get testnodes available for this distributor
...
...
@@ -134,8 +132,8 @@ def generateConfigurationList(self, test_suite_title):
return_dict
[
'launchable'
]
=
True
return_dict
[
'configuration_list'
]
=
configuration_list_json
return_dict
[
'launcher_nodes_computer_guid'
]
=
launcher_nodes_computer_guid
except
:
return_dict
[
'error_message'
]
=
'Bad json cluster_configuration
?'
except
Exception
as
e
:
return_dict
[
'error_message'
]
=
'Bad json cluster_configuration
. %s'
%
str
(
e
)
_unvalidateConfig
(
return_dict
)
# If the number of available nodes is lower than
...
...
bt5/erp5_test_result/ExtensionTemplateItem/portal_components/extension.erp5.ScalabilityTestSuiteUtils.xml
View file @
b277c730
...
...
@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
ScalabilityTestSuiteUtils
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
extension.erp5.ScalabilityTestSuiteUtils
</string>
</value>
...
...
@@ -24,6 +36,18 @@
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
...
...
@@ -31,13 +55,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -50,7 +89,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -59,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
bt5/erp5_test_result/ExtensionTemplateItem/portal_components/extension.erp5.TestResults.py
View file @
b277c730
...
...
@@ -2,8 +2,6 @@ import difflib
import
zipfile
import
os
import
re
import
sys
from
cStringIO
import
StringIO
from
zExceptions
import
Unauthorized
separator1
=
'='
*
70
...
...
@@ -107,7 +105,7 @@ def parseTestSuiteResults(file_handler):
if is_zelenium_test_suite:
# if this was a zelenium functional test, the output is completly
# different
junk
, title, summary, detail = stdout.split('-' * 79)
_
, title, summary, detail = stdout.split('-' * 79)
test_result_detail['stdout'] = summary
html_test_result = detail
search = FTEST_PASS_FAIL_RE.search(title)
...
...
@@ -187,7 +185,6 @@ def TestResult_sendEmailNotification(self, mail_to=None, mail_from=None,
failed_test_case_list = []
with_skips_test_case_list = []
unknown_status_test_case_list = []
only_func_test = 1
for tcr in test_result.contentValues(portal_type='Test Result Line',
sort_on='title'):
if (tcr.getProperty('errors', 0) + tcr.getProperty('failures', 0)):
...
...
@@ -197,12 +194,6 @@ def TestResult_sendEmailNotification(self, mail_to=None, mail_from=None,
unknown_status_test_case_list.append(tcr)
if tcr.getProperty('skips'):
with_skips_test_case_list.append(tcr)
if not tcr.getProperty('html_test_result'):
only_func_test = 0
# Don't send mail if we only run functional tests
#if only_func_test:
# return
p('Test Suite: %s' % test_result.getTitle())
p('Revision: %s' % test_result.getReference() or test_result.getIntIndex())
...
...
@@ -262,8 +253,8 @@ def TestResult_sendEmailNotification(self, mail_to=None, mail_from=None,
for tcr in with_skips_test_case_list:
p('
\
n
%-50s (%s skips)' % (tcr.getTitle(), tcr.getProperty('skips')))
for line in tcr.getProperty('stderr', '').splitlines():
if 'skipped ' in line:
p(' %s' % line)
if 'skipped ' in line:
p(' %s' % line)
p('')
return ('
\
n
'.join(mail_body),
...
...
bt5/erp5_test_result/ExtensionTemplateItem/portal_components/extension.erp5.TestResults.xml
View file @
b277c730
...
...
@@ -45,12 +45,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W:265, 0: Bad indentation. Found 12 spaces, expected 10 (bad-indentation)
</string>
<string>
W:266, 0: Bad indentation. Found 16 spaces, expected 12 (bad-indentation)
</string>
<string>
W:110, 6: Unused variable \'junk\' (unused-variable)
</string>
<string>
W:190, 4: Unused variable \'only_func_test\' (unused-variable)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/BenchmarkResult_completed.xml
View file @
b277c730
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
result, error_message_list=
[]
</string>
</value>
<value>
<string>
result, error_message_list=
()
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TaskDistributorAlarm_optimize.py
View file @
b277c730
from
Products.ZSQLCatalog.SQLCatalog
import
Query
from
DateTime
import
DateTime
now
=
DateTime
()
#Clean-up invalidated Test Nodes and
...
...
@@ -24,7 +23,7 @@ for test_node in list_node:
if
ping_date
<=
old_date
:
test_node
.
invalidate
()
elif
validation_state
==
'invalidated'
:
__traceback_info__
=
test_node
__traceback_info__
=
test_node
# pylint:disable=unused-variable
if
test_node
.
getSpecialise
():
test_node
.
getSpecialiseValue
().
cleanupInvalidatedTestNode
(
test_node
)
...
...
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_getDiff.py
View file @
b277c730
...
...
@@ -18,8 +18,6 @@ if a.getIntIndex() > b.getIntIndex():
b_title_dict
=
dict
((
line
.
getObject
().
getTitle
(),
line
.
id
)
for
line
\
in
b
.
searchFolder
(
portal_type
=
'Test Result Line'
))
not_in_b
=
{}
object_list
=
[]
compared_prop_list
=
(
'all_tests'
,
'errors'
,
'failures'
,
'skips'
)
...
...
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_getJsonScalabilityStats.py
View file @
b277c730
from
Products.PythonScripts.standard
import
Object
import
json
# Get result lines
...
...
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_getSummaryForRSS.py
View file @
b277c730
...
...
@@ -14,7 +14,7 @@ p('Revision: %s' % test_result.getReference() or test_result.getIntIndex())
p
(
'Launch Date: %s'
%
test_result
.
getStartDate
())
comment
=
test_result
.
getProperty
(
'comment'
)
if
comment
:
p
(
comment
)
p
(
comment
)
p
(
''
)
p
(
'All tests: %s, Failures: %s, Errors: %s, Skips: %s'
%
\
(
test_result
.
getProperty
(
'all_tests'
),
...
...
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestSuiteModule_addTestSuite.py
View file @
b277c730
...
...
@@ -15,4 +15,4 @@ test_suite = context.newContent(
)
if
batch_mode
:
return
test_suite
return
test_suite
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestSuite_checkParameterConsistency.py
View file @
b277c730
import
json
context
.
REQUEST
.
response
.
setHeader
(
'Access-Control-Allow-Origin'
,
'*'
)
error
=
[]
#We should verify if the project actually exists
if
context
.
getTitle
()
is
None
:
error
.
append
(
'ERROR: No project associated!'
)
error
.
append
(
'ERROR: No project associated!'
)
if
context
.
getTestSuite
()
is
None
:
error
.
append
(
'ERROR: No test-suite associated!'
)
error
.
append
(
'ERROR: No test-suite associated!'
)
if
context
.
getTestSuiteTitle
()
is
None
:
error
.
append
(
'ERROR: No test-suite-title associated!'
)
error
.
append
(
'ERROR: No test-suite-title associated!'
)
vcs_repository_list
=
context
.
objectValues
(
portal_type
=
"Test Suite Repository"
)
if
len
(
vcs_repository_list
)
==
0
:
error
.
append
(
"No vcs_repository_list! (minimum 1)"
)
error
.
append
(
"No vcs_repository_list! (minimum 1)"
)
else
:
profile_count
=
0
for
vcs_list
in
vcs_repository_list
:
for
property_name
in
[
'git_url'
,
'buildout_section_id'
,
'branch'
]:
property_value
=
vcs_list
.
getProperty
(
property_name
)
if
property_value
is
None
:
error
.
append
(
'ERROR: No '
+
property_name
+
'!'
)
if
not
(
vcs_list
.
getProperty
(
'profile_path'
)
is
None
):
profile_count
+=
1
if
profile_count
==
0
:
profile_count
=
0
for
vcs_list
in
vcs_repository_list
:
for
property_name
in
[
'git_url'
,
'buildout_section_id'
,
'branch'
]:
property_value
=
vcs_list
.
getProperty
(
property_name
)
if
property_value
is
None
:
error
.
append
(
'ERROR: No '
+
property_name
+
'!'
)
if
not
(
vcs_list
.
getProperty
(
'profile_path'
)
is
None
):
profile_count
+=
1
if
profile_count
==
0
:
error
.
append
(
'ERROR: No profile_path in any vcs_repository! (minimum 1)'
)
return
len
(
error
)
>
0
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_node_workflow/scripts/checkConsistency.py
View file @
b277c730
object
=
state_change
[
'object'
]
object
.
Base_checkConsistency
()
state_change
[
'object'
].
Base_checkConsistency
()
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_suite_workflow/scripts/TestSuite_afterValidate.py
View file @
b277c730
...
...
@@ -20,7 +20,7 @@ if test_suite.getReference() is None:
def
generateRandomString
(
size
):
tab
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
my_string
=
''
for
i
in
range
(
size
):
for
_
in
range
(
size
):
my_string
=
my_string
+
choice
(
tab
)
return
my_string
...
...
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_suite_workflow/scripts/checkConsistency.py
View file @
b277c730
object
=
state_change
[
'object'
]
object
.
Base_checkConsistency
()
state_change
[
'object'
].
Base_checkConsistency
()
bt5/erp5_test_result/bt/skip_coding_style_test
deleted
100644 → 0
View file @
19408915
1
\ 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