mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
python3: Fix ptests on musl
Adjust locale dependencies to help run tests sadly, tr-tr is not available yet in musl-locale so keep that specific to glibc Add an exclusion list for tests and populate it for musl for the failing tests (From OE-Core rev: db76ac9968ceddc01e48069dbacc212eb4f88574) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
{ SETUPTOOLS_USE_DISTUTILS=nonlocal python3 -m test -v -j 4 || echo "FAIL: python3" ; } | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -r -e '/\.\.\. (ERROR|FAIL)/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
|
||||
SKIPPED_TESTS=
|
||||
{ SETUPTOOLS_USE_DISTUTILS=nonlocal python3 -m test $SKIPPED_TESTS -v -j 4 || echo "FAIL: python3" ; } | sed -u -e '/\.\.\. ok/ s/^/PASS: /g' -r -e '/\.\.\. (ERROR|FAIL)/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
|
||||
|
||||
@@ -224,6 +224,10 @@ do_install:append:class-nativesdk () {
|
||||
create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
|
||||
}
|
||||
|
||||
do_install_ptest:append:class-target:libc-musl () {
|
||||
sed -i -e 's|SKIPPED_TESTS=|SKIPPED_TESTS="-x test__locale -x test_c_locale_coercion -x test_locale -x test_os test_re -x test__xxsubinterpreters -x test_threading"|' ${D}${PTEST_PATH}/run-ptest
|
||||
}
|
||||
|
||||
SYSROOT_PREPROCESS_FUNCS:append:class-target = " provide_target_config_script"
|
||||
SYSROOT_PREPROCESS_FUNCS:append:class-nativesdk = " provide_target_config_script"
|
||||
|
||||
@@ -431,8 +435,9 @@ FILES:${PN}-man = "${datadir}/man"
|
||||
# See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
|
||||
RDEPENDS:libpython3:append:libc-glibc = " libgcc"
|
||||
RDEPENDS:${PN}-ctypes:append:libc-glibc = " ${MLPREFIX}ldconfig"
|
||||
RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev ${PN}-cgitb ${PN}-zipapp unzip bzip2 libgcc tzdata coreutils sed gcc g++ binutils"
|
||||
RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-fr-fr locale-base-en-us locale-base-tr-tr locale-base-de-de"
|
||||
RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev ${PN}-cgitb ${PN}-zipapp unzip bzip2 libgcc tzdata coreutils sed gcc g++ binutils \
|
||||
locale-base-fr-fr locale-base-en-us locale-base-de-de"
|
||||
RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-tr-tr"
|
||||
RDEPENDS:${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${MLPREFIX}tk ${MLPREFIX}tk-lib', '', d)}"
|
||||
RDEPENDS:${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${PN}-tkinter ${MLPREFIX}tcl', '', d)}"
|
||||
DEV_PKG_DEPENDENCY = ""
|
||||
|
||||
Reference in New Issue
Block a user