mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-71052: Add test exclusions to support running the test suite on Android (#115918)
This commit is contained in:
parent
83c5ecdeec
commit
41d5391c55
12 changed files with 58 additions and 27 deletions
|
@ -198,6 +198,23 @@ def skip_unless_symlink(test):
|
|||
return test if ok else unittest.skip(msg)(test)
|
||||
|
||||
|
||||
_can_hardlink = None
|
||||
|
||||
def can_hardlink():
|
||||
global _can_hardlink
|
||||
if _can_hardlink is None:
|
||||
# Android blocks hard links using SELinux
|
||||
# (https://stackoverflow.com/q/32365690).
|
||||
_can_hardlink = hasattr(os, "link") and not support.is_android
|
||||
return _can_hardlink
|
||||
|
||||
|
||||
def skip_unless_hardlink(test):
|
||||
ok = can_hardlink()
|
||||
msg = "requires hardlink support"
|
||||
return test if ok else unittest.skip(msg)(test)
|
||||
|
||||
|
||||
_can_xattr = None
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue