mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 00:30:06 +02:00
python3.10: fix builds on nightlies that include kqueue. (#10101)
Fixes #10001. Also: - Use same way of excluding tests as in 3.11/3.12. - Disable some more tests that hang reliably.
This commit is contained in:
@@ -2,14 +2,16 @@ SUMMARY="An interpreted, interactive, object-oriented programming language"
|
||||
DESCRIPTION="Python is a programming language that lets you work more quickly \
|
||||
and integrate your systems more effectively. You can learn to use Python and \
|
||||
see almost immediate gains in productivity and lower maintenance costs.
|
||||
|
||||
Python runs on Windows, Linux/Unix, Mac OS X, and has been ported to the Java \
|
||||
and .NET virtual machines.
|
||||
|
||||
Python is free to use, even for commercial products, because of its \
|
||||
OSI-approved open source license."
|
||||
HOMEPAGE="https://www.python.org"
|
||||
LICENSE="Python"
|
||||
COPYRIGHT="1990-2023 Python Software Foundation"
|
||||
REVISION="2"
|
||||
REVISION="3"
|
||||
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="5c88848668640d3e152b35b4536ef1c23b2ca4bd2c957ef1ecbb053f571dd3f6"
|
||||
SOURCE_DIR="Python-$portVersion"
|
||||
@@ -76,13 +78,13 @@ REPLACES="
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libedit$secondaryArchSuffix
|
||||
devel:libexpat$secondaryArchSuffix
|
||||
devel:libffi$secondaryArchSuffix
|
||||
devel:liblzma$secondaryArchSuffix
|
||||
devel:libncurses$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libedit$secondaryArchSuffix
|
||||
devel:libsqlite3$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libtclstub8.6$secondaryArchSuffix
|
||||
devel:libtk8.6$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
@@ -95,8 +97,8 @@ BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
@@ -171,10 +173,9 @@ INSTALL()
|
||||
# the following lines in the file "~/config/settings/system/debug_server/settings":
|
||||
##---
|
||||
# executable_actions {
|
||||
# /sources/Python-$portVersion/python kill
|
||||
# /sources/Python-3*/python kill
|
||||
# }
|
||||
##---
|
||||
# Replace $portVersion as necessary.
|
||||
|
||||
# For some tests that purposefully crash, it would make sense to add support for
|
||||
# crash-report suppression (as done for other platforms) on "tests/support/__init__,py"'s
|
||||
@@ -182,81 +183,93 @@ INSTALL()
|
||||
# But that needs support from Haiku's debug_server, as we can't change settings from
|
||||
# the recipe's building environment at the moment (https://dev.haiku-os.org/ticket/10301)
|
||||
|
||||
# For reference, tests results on hrev57578 (x64): 351 tests OK. 30 tests failed. 19 tests skipped.
|
||||
TEST()
|
||||
{
|
||||
# Remove tests data left-overs, if any
|
||||
rm -f -r /boot/system/cache/tmp/
|
||||
rm -f -d -r build/test_python*
|
||||
|
||||
cd Lib/test
|
||||
local test_options=(
|
||||
# Use this to get same test order on different runs (actual value not important).
|
||||
--randseed 8668208
|
||||
|
||||
# distutils is deprecated, and will be removed on 3.12.
|
||||
rm -f test_distutils.py
|
||||
# Possibly useful?
|
||||
# --tempdir=/another_drive/tmp
|
||||
|
||||
# The following tests invoke the crash dialog, and unless your configure
|
||||
# debug_server default action to "kill" or "report", they will hang waiting for
|
||||
# user input. See comment above TEST().
|
||||
rm -f test_asyncio/test_futures.py # Crashes: Exception (Segment violation)
|
||||
rm -f test_faulthandler.py
|
||||
rm -f test_subprocess.py # tends to hang.
|
||||
rm -f test_threading.py # tends to hang.
|
||||
# Enable/disable certain tests by "resource" type:
|
||||
# -uall,-audio,-cpu,-curses,-decimal,-gui,-largefile,-network,-subprocess,-tzdata,-urlfetch
|
||||
|
||||
# Many of the tests hang/stall. We have two options:
|
||||
#
|
||||
# 1- Manually remove the problematic test-cases.
|
||||
# 2- Set a TIMEOUT.
|
||||
#
|
||||
# Option 1: Works, but requires manual identification/mainteinance.
|
||||
#
|
||||
# Option 2: Doesn't requires maintaining a list of stalling tests, but:
|
||||
# - Causes errors at the end of the run:
|
||||
# "unmounting failed: Device/File/Resource Busy"
|
||||
# - Leaves dangling threads running when the tests timeout:
|
||||
# "Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 2)"
|
||||
# - The time it takes to run the full suite goes from 14 to 30+ minutes,
|
||||
#
|
||||
# For Option 2, use: export EXTRATESTOPTS="--timeout=300"
|
||||
# before calling "make $jobArgs test".
|
||||
#
|
||||
# Let's use Option 1, for now at least:
|
||||
# distutils is deprecated, and will be removed on 3.12.
|
||||
-x test_distutils
|
||||
|
||||
# These hang reliably.
|
||||
# You might want then to manually restore them on re-runs, use:
|
||||
# > git checkout -- Lib/test/
|
||||
rm -f test__xxsubinterpreters.py
|
||||
rm -f test_asynchat.py
|
||||
rm -f test_concurrent_futures.py
|
||||
rm -f test_importlib/test_threaded_import.py
|
||||
rm -f test_interpreters.py
|
||||
rm -f test_multiprocessing_fork.py
|
||||
rm -f test_multiprocessing_forkserver.py
|
||||
rm -f test_multiprocessing_main_handling.py
|
||||
rm -f test_multiprocessing_spawn.py
|
||||
rm -f test_multiprocessing.py
|
||||
rm -f test_socketserver.py
|
||||
# The following tests invoke the crash dialog, and unless your configure
|
||||
# debug_server default action to "kill" or "report", they will hang waiting for
|
||||
# user input. See comment above TEST().
|
||||
-x test_faulthandler
|
||||
-x test_futures # from test_asyncio. Crashes: Exception (Segment violation)
|
||||
-x test_subprocess # tends to hang.
|
||||
-x test_threading # tends to hang.
|
||||
|
||||
# "test_asyncio" doesn't seems to runs reliably, even after individually skipping
|
||||
# all the problematic test-cases that could be identify by running them one by one.
|
||||
rm -f -r test_asyncio
|
||||
# rm -f test_asyncio/test_base_events.py
|
||||
# rm -f test_asyncio/test_buffered_proto.py # Exception on Exception handler.
|
||||
# rm -f test_asyncio/test_events.py
|
||||
# rm -f test_asyncio/test_sendfile.py
|
||||
# rm -f test_asyncio/test_server.py # Exception on Exception handler.
|
||||
# rm -f test_asyncio/test_sslproto.py # Exception on Exception handler.
|
||||
# rm -f test_asyncio/test_streams.py
|
||||
# Many of the tests hang/stall. We have two options:
|
||||
#
|
||||
# 1- Manually remove the problematic test-cases.
|
||||
# 2- Set a TIMEOUT.
|
||||
#
|
||||
# Option 1: Works, but requires manual identification/mainteinance.
|
||||
#
|
||||
# Option 2: Doesn't requires maintaining a list of stalling tests, but:
|
||||
# - Causes errors at the end of the run:
|
||||
# "unmounting failed: Device/File/Resource Busy"
|
||||
# - Leaves dangling threads running when the tests timeout:
|
||||
# "Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 2)"
|
||||
# - The time it takes to run the full suite goes from 14 to 30+ minutes,
|
||||
#
|
||||
# For Option 2, use: export EXTRATESTOPTS="--timeout=300"
|
||||
# before calling "make $jobArgs test".
|
||||
#
|
||||
# Let's use Option 1, for now at least:
|
||||
|
||||
# These not always hang/stall, but they do it enough to warrant skipping for now.
|
||||
rm -f test_imaplib.py
|
||||
rm -f test_signal.py
|
||||
rm -f test_socket.py
|
||||
rm -f test_ssl.py
|
||||
rm -f test_urllib2_localnet.py
|
||||
# These hang reliably.
|
||||
-x test__xxsubinterpreters
|
||||
-x test_asynchat
|
||||
-x test_concurrent_futures
|
||||
-x test_interpreters
|
||||
-x test_multiprocessing
|
||||
-x test_multiprocessing_fork
|
||||
-x test_multiprocessing_forkserver
|
||||
-x test_multiprocessing_main_handling
|
||||
-x test_multiprocessing_spawn
|
||||
-x test_socketserver
|
||||
-x test_threaded_import # test_importlib/test_threaded_import
|
||||
|
||||
cd ../..
|
||||
# "test_asyncio" doesn't seems to runs reliably, even after individually skipping
|
||||
# all the problematic test-cases that could be identify by running them one by one.
|
||||
-x test_asyncio
|
||||
# -x test_asyncio/test_base_events
|
||||
# -x test_asyncio/test_buffered_proto # Exception on Exception handler.
|
||||
# -x test_asyncio/test_events
|
||||
# -x test_asyncio/test_sendfile
|
||||
# -x test_asyncio/test_server # Exception on Exception handler.
|
||||
# -x test_asyncio/test_sslproto # Exception on Exception handler.
|
||||
# -x test_asyncio/test_streams
|
||||
|
||||
# These allows to change what resources tests can use:
|
||||
# export EXTRATESTOPTS="-uall,-largefile,-audio,-gui,-network,-cpu,-urlfetch,-tzdata"
|
||||
# These not always hang/stall, but they do it enough to warrant skipping for now.
|
||||
-x test_imaplib
|
||||
-x test_signal
|
||||
-x test_socket
|
||||
-x test_ssl
|
||||
-x test_urllib2_localnet
|
||||
|
||||
# Hang on nightlies
|
||||
-x test_httplib
|
||||
-x test_httpservers
|
||||
-x test_logging
|
||||
-x test_xmlrpc
|
||||
)
|
||||
|
||||
local -x LOGNAME=buildbot # this skips tests_tools/test_freeze, copied from Gentoo's ebuild
|
||||
make $jobArgs test EXTRATESTOPTS="${test_options[*]}"
|
||||
|
||||
# Occasionally, some test fails seemingly due to the racy nature of tempfile.mktemp().
|
||||
# Even the help for that function says to NOT use it, but some tests still do.
|
||||
@@ -264,5 +277,4 @@ TEST()
|
||||
# If you find some strange "æ" suffix on temp dirnames, ej:
|
||||
# "cwd: /sources/Python-3.10.12/build/test_python_10324æ"
|
||||
# That's due to usages of os_helper.FS_NONASCII.
|
||||
make $jobArgs test
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user