Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
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
Boxiang Sun
pyodide
Commits
641f3e7b
Commit
641f3e7b
authored
Oct 01, 2018
by
Roman Yurchak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip tests that segfault, run the rest
parent
b86101a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
23 deletions
+34
-23
test/python_tests.txt
test/python_tests.txt
+14
-11
test/test_python.py
test/test_python.py
+20
-12
No files found.
test/python_tests.txt
View file @
641f3e7b
# Test modules with a failure reason after their name are either skipped
# or marked as a known failure in pytest.
#
# Following reason codes are skipped:
# Following reason codes are skipped, whithout running them, as they lead to
# segfaults:
# - segfault-<syscall>: segfault in the corresponding system call.
#
# While the below reason codes are marked as a known failure, and are still
# executed:
# - platform-specific: This is testing something about a particular platform
# that isn't relevant here
# - async: relies on async
...
...
@@ -24,8 +29,6 @@
# - fs: Fails due to virtual filesystem issues.
# - nonsense: This functionality doesn't make sense in this context. Includes
# things like `pip`, `distutils`
#
# While the below reason codes are marked as a known failure:
# - crash: The Python interpreter just stopped without a traceback. Will require
# further investigation. This usually seems to be caused by calling into a
# system function that doesn't behave as one would expect.
...
...
@@ -53,7 +56,7 @@ test_asyncio.test_locks async
test_asyncio.test_pep492 async
test_asyncio.test_proactor_events async
test_asyncio.test_queues async
test_asyncio.test_selector_events async
test_asyncio.test_selector_events async
segfault-socketcall
test_asyncio.test_sslproto async
test_asyncio.test_streams async
test_asyncio.test_subprocess async
...
...
@@ -201,7 +204,7 @@ test_fractions
test_frame
test_frozen
test_fstring
test_ftplib s
yscall 21537
test_ftplib s
ocket
test_funcattrs
test_functools threading
test_future
...
...
@@ -232,7 +235,7 @@ test_html
test_htmlparser
test_http_cookiejar
test_http_cookies
test_httplib socket
test_httplib socket
segfault-socketcall
test_httpservers threading
test_idle
test_imaplib socket
...
...
@@ -360,8 +363,8 @@ test_platform subprocess
test_plistlib
test_poll subprocess
test_popen subprocess
test_poplib bad ioctl s
yscall 21537
test_posix
crash
test_poplib bad ioctl s
ocket
test_posix
segfault-fstatfs64
test_posixpath crash
test_pow
test_pprint
...
...
@@ -396,8 +399,8 @@ test_sched threading
test_scope
test_script_helper
test_secrets
test_select networking
test_selectors networking
test_select networking
segfault-newselect
test_selectors networking
segfault-newselect
test_set
test_setcomps
test_shelve
...
...
@@ -490,7 +493,7 @@ test_unittest os.kill
test_univnewlines
test_unpack
test_unpack_ex
test_urllib
crash
test_urllib
segfault-socketcall
test_urllib2 subprocess
test_urllib2_localnet socket
test_urllib2net
...
...
test/test_python.py
View file @
641f3e7b
...
...
@@ -336,15 +336,26 @@ def test_open_url_cgi(selenium):
"""
)
==
'HELLO
\
n
'
def
test_
run_core_python_test
(
python_test
,
selenium
,
request
):
def
test_
cpython_core
(
python_test
,
selenium
,
request
):
name
,
error_flags
=
python_test
if
(
'crash'
in
error_flags
or
'crash-'
+
selenium
.
browser
in
error_flags
):
pytest
.
xfail
(
reason
=
'known failure with code "{}"'
# keep only flags related to the current browser
flags_to_remove
=
[
'firefox'
,
'chrome'
]
flags_to_remove
.
remove
(
selenium
.
browser
)
for
flag
in
flags_to_remove
:
if
'crash-'
+
flag
in
error_flags
:
error_flags
.
remove
(
'crash-'
+
flag
)
if
any
(
flag
.
startswith
(
'segfault'
)
for
flag
in
error_flags
):
pytest
.
skip
(
'known segfault with code: "{}"'
.
format
(
','
.
join
(
error_flags
)))
if
error_flags
:
request
.
applymarker
(
pytest
.
mark
.
xfail
(
run
=
False
,
reason
=
'known failure with code "{}"'
.
format
(
','
.
join
(
error_flags
))))
selenium
.
load_package
(
'test'
)
try
:
selenium
.
run
(
...
...
@@ -373,9 +384,6 @@ def pytest_generate_tests(metafunc):
continue
error_flags
=
line
.
split
()
name
=
error_flags
.
pop
(
0
)
if
(
not
error_flags
or
set
(
error_flags
).
intersection
(
{
'crash'
,
'crash-chrome'
,
'crash-firefox'
})):
test_modules
.
append
((
name
,
error_flags
))
# explicitly define test ids to keep
# a human readable test name in pytest
...
...
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