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
Nikola Balog
erp5
Commits
edcda582
Commit
edcda582
authored
Mar 23, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_result: py3
parent
6c02ddf4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.ERP5ProjectUnitTestDistributor.py
...omponents/document.erp5.ERP5ProjectUnitTestDistributor.py
+2
-2
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_afterComplete.py
...portal_skins/erp5_test_result/TestResult_afterComplete.py
+2
-2
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_getSummary.py
...em/portal_skins/erp5_test_result/TestResult_getSummary.py
+2
-2
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_viewTestResultLineStdoutSet.py
...rp5_test_result/TestResult_viewTestResultLineStdoutSet.py
+1
-1
bt5/erp5_test_result/TestTemplateItem/portal_components/test.erp5.testTaskDistribution.py
...eItem/portal_components/test.erp5.testTaskDistribution.py
+3
-3
No files found.
bt5/erp5_test_result/DocumentTemplateItem/portal_components/document.erp5.ERP5ProjectUnitTestDistributor.py
View file @
edcda582
...
@@ -214,8 +214,8 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
...
@@ -214,8 +214,8 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
# suites required
# suites required
int_index
=
test_suite
.
getIntIndex
()
int_index
=
test_suite
.
getIntIndex
()
# we divide per 3 because we have 3 cores per node
# we divide per 3 because we have 3 cores per node
node_quantity_min
=
PRIORITY_MAPPING
[
int_index
][
0
]
/
3
node_quantity_min
=
PRIORITY_MAPPING
[
int_index
][
0
]
/
/
3
node_quantity_max
=
PRIORITY_MAPPING
[
int_index
][
1
]
/
3
node_quantity_max
=
PRIORITY_MAPPING
[
int_index
][
1
]
/
/
3
for
x
in
range
(
0
,
node_quantity_min
):
for
x
in
range
(
0
,
node_quantity_min
):
score
=
float
(
x
)
/
(
x
+
1
)
score
=
float
(
x
)
/
(
x
+
1
)
all_test_suite_list
.
append
((
score
,
test_suite_url
,
title
))
all_test_suite_list
.
append
((
score
,
test_suite_url
,
title
))
...
...
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_afterComplete.py
View file @
edcda582
...
@@ -15,6 +15,6 @@ if recipient_list:
...
@@ -15,6 +15,6 @@ if recipient_list:
mail_from
=
'nobody@svn.erp5.org'
,
mail_from
=
'nobody@svn.erp5.org'
,
include_link
=
include_link
,
include_link
=
include_link
,
include_diff
=
True
)
include_diff
=
True
)
print
'Successfully sent to: '
,
recipient_list
print
(
'Successfully sent to: %s'
%
recipient_list
)
print
'OK'
print
(
'OK'
)
return
printed
return
printed
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_getSummary.py
View file @
edcda582
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
seconds
=
0.0
seconds
=
0.0
for
obj
in
context
.
contentValues
():
for
obj
in
context
.
contentValues
():
seconds
+=
obj
.
getProperty
(
'duration'
)
seconds
+=
obj
.
getProperty
(
'duration'
)
print
'%s,%s,%s,%s,%s,%s'
%
(
context
.
getProperty
(
'status'
),
context
.
getProperty
(
'all_tests'
),
print
(
'%s,%s,%s,%s,%s,%s'
%
(
context
.
getProperty
(
'status'
),
context
.
getProperty
(
'all_tests'
),
context
.
getProperty
(
'failures'
),
context
.
getProperty
(
'errors'
),
context
.
getProperty
(
'failures'
),
context
.
getProperty
(
'errors'
),
context
.
getProperty
(
'skips'
),
seconds
)
context
.
getProperty
(
'skips'
),
seconds
)
)
return
printed
return
printed
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TestResult_viewTestResultLineStdoutSet.py
View file @
edcda582
...
@@ -5,5 +5,5 @@ Multiline stdout values behaviour is undefined.
...
@@ -5,5 +5,5 @@ Multiline stdout values behaviour is undefined.
"""
"""
for
test_result_node
in
context
.
objectValues
(
portal_type
=
'Test Result Node'
):
for
test_result_node
in
context
.
objectValues
(
portal_type
=
'Test Result Node'
):
if
test_result_node
.
getCmdline
()
==
'LOG url'
:
if
test_result_node
.
getCmdline
()
==
'LOG url'
:
print
test_result_node
.
getStdout
(
)
print
(
test_result_node
.
getStdout
().
decode
(
'ascii'
,
'replace'
)
)
return
printed
return
printed
bt5/erp5_test_result/TestTemplateItem/portal_components/test.erp5.testTaskDistribution.py
View file @
edcda582
...
@@ -1676,7 +1676,7 @@ class TestGitlabRESTConnectorInterface(ERP5TypeTestCase):
...
@@ -1676,7 +1676,7 @@ class TestGitlabRESTConnectorInterface(ERP5TypeTestCase):
self
.
assertEqual
(
self
.
assertEqual
(
self
.
id
(),
self
.
id
(),
body
[
'name'
])
body
[
'name'
])
return
(
six
.
moves
.
http_client
.
CREATED
,
{
'content-type'
:
'application/json'
},
'{}'
)
return
(
six
.
moves
.
http_client
.
CREATED
,
{
'content-type'
:
'application/json'
},
b
'{}'
)
return
_callback
return
_callback
def
test_start_test
(
self
):
def
test_start_test
(
self
):
...
@@ -1693,7 +1693,7 @@ class TestGitlabRESTConnectorInterface(ERP5TypeTestCase):
...
@@ -1693,7 +1693,7 @@ class TestGitlabRESTConnectorInterface(ERP5TypeTestCase):
rsps
.
add
(
rsps
.
add
(
responses
.
POST
,
responses
.
POST
,
self
.
post_commit_status_url
,
self
.
post_commit_status_url
,
{}
)
b'{}'
)
self
.
test_result
.
start
()
self
.
test_result
.
start
()
self
.
tic
()
self
.
tic
()
...
@@ -1831,7 +1831,7 @@ class TestGitlabRESTConnectorInterface(ERP5TypeTestCase):
...
@@ -1831,7 +1831,7 @@ class TestGitlabRESTConnectorInterface(ERP5TypeTestCase):
self
.
assertEqual
(
self
.
assertEqual
(
'https://erp5js.example.com/#%s'
%
self
.
test_result
.
getRelativeUrl
(),
'https://erp5js.example.com/#%s'
%
self
.
test_result
.
getRelativeUrl
(),
body
[
'target_url'
])
body
[
'target_url'
])
return
(
six
.
moves
.
http_client
.
CREATED
,
{
'content-type'
:
'application/json'
},
'{}'
)
return
(
six
.
moves
.
http_client
.
CREATED
,
{
'content-type'
:
'application/json'
},
b
'{}'
)
with
responses
.
RequestsMock
()
as
rsps
:
with
responses
.
RequestsMock
()
as
rsps
:
rsps
.
add_callback
(
rsps
.
add_callback
(
...
...
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