Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Jérome Perrin
wendelin
Commits
6c88de45
Commit
6c88de45
authored
Jan 28, 2022
by
Jérome Perrin
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
55c57aeb
Pipeline
#19492
running with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
61 deletions
+0
-61
tests/__init__.py
tests/__init__.py
+0
-61
No files found.
tests/__init__.py
deleted
100644 → 0
View file @
55c57aeb
# -*- coding: utf-8 -*-
from
test_suite
import
ERP5TypeTestSuite
import
glob
import
os.path
import
re
HERE
=
os
.
path
.
dirname
(
__file__
)
BT5
=
os
.
path
.
join
(
os
.
path
.
split
(
HERE
)[
0
],
'bt5'
)
class
WendelinERP5
(
ERP5TypeTestSuite
):
def
getTestList
(
self
):
component_re
=
re
.
compile
(
".*/([^/]+)/TestTemplateItem/portal_components"
"/test
\
.[^.]+
\
.([^.]+).py$"
)
return
[
'%s:%s'
%
(
x
.
group
(
1
),
x
.
group
(
2
))
\
for
x
in
[
component_re
.
match
(
y
)
for
y
in
glob
.
glob
(
os
.
path
.
join
(
BT5
,
'*'
,
'*'
,
'*'
,
'test.erp5.test*.py'
))]]
def
run
(
self
,
full_test
):
test
=
':'
in
full_test
and
full_test
.
split
(
':'
)[
1
]
or
full_test
# from https://lab.nexedi.com/nexedi/erp5/commit/530e8b4e:
# ---- 8< ----
# Combining Zope and WCFS working together requires data to be on a real
# storage, not on in-RAM MappingStorage inside Zope's Python process.
# Force this via --load --save for now.
#
# Also manually indicate via --with_wendelin_core, that this test needs
# WCFS server - corresponding to ZODB test storage - to be launched.
#
# In the future we might want to rework custom_zodb.py to always use
# FileStorage on tmpfs instead of δ=MappingStorage in DemoStorage(..., δ),
# and to always spawn WCFS for all tests, so that this hack becomes
# unnecessary.
# ---- 8< ----
status_dict
=
self
.
runUnitTest
(
'--load'
,
'--save'
,
'--with_wendelin_core'
,
full_test
)
if
test
.
startswith
(
'testFunctional'
):
status_dict
=
self
.
_updateFunctionalTestResponse
(
status_dict
)
return
status_dict
### this is dublicate code from erp5, needed to display functional tests ontestnodes nicely
def
_updateFunctionalTestResponse
(
self
,
status_dict
):
""" Convert the Unit Test output into more accurate information
related to funcional test run.
"""
# Parse relevant information to update response information
try
:
summary
,
html_test_result
=
status_dict
[
'stderr'
].
split
(
"-"
*
79
)[
1
:
3
]
except
ValueError
:
# In case of error when parse the file, preserve the original
# informations. This prevents we have unfinished tests.
return
status_dict
status_dict
[
'html_test_result'
]
=
html_test_result
search
=
self
.
FTEST_PASS_FAIL_RE
.
search
(
summary
)
if
search
:
group_dict
=
search
.
groupdict
()
status_dict
[
'failure_count'
]
=
int
(
group_dict
[
'failures'
])
status_dict
[
'test_count'
]
=
int
(
group_dict
[
'total'
])
status_dict
[
'skip_count'
]
=
int
(
group_dict
[
'expected_failure'
])
return
status_dict
Jérome Perrin
@jerome
mentioned in merge request
nexedi/slapos!1117 (merged)
·
Jan 28, 2022
mentioned in merge request
nexedi/slapos!1117 (merged)
mentioned in merge request nexedi/slapos!1117
Toggle commit list
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