diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-09-02 22:03:13 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-04 20:14:14 +0100 |
commit | 13be32f8835139dd22de4ba4f790cd41ad4bb4e7 (patch) | |
tree | 14ed9ea034a04310b6e5bc688a7fd5243ca3dbe9 | |
parent | 7ee50486d188f52c5b8df7bb24c97874fe059344 (diff) | |
download | poky-13be32f8835139dd22de4ba4f790cd41ad4bb4e7.tar.gz |
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>
-rw-r--r-- | meta/recipes-devtools/python/python3/run-ptest | 4 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3_3.11.5.bb | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/meta/recipes-devtools/python/python3/run-ptest b/meta/recipes-devtools/python/python3/run-ptest index efa84555a5..d1c26c11e2 100644 --- a/meta/recipes-devtools/python/python3/run-ptest +++ b/meta/recipes-devtools/python/python3/run-ptest | |||
@@ -1,3 +1,3 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | SKIPPED_TESTS= | |
3 | { 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' | 3 | { 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' |
diff --git a/meta/recipes-devtools/python/python3_3.11.5.bb b/meta/recipes-devtools/python/python3_3.11.5.bb index 10a4811f64..f5d97311d7 100644 --- a/meta/recipes-devtools/python/python3_3.11.5.bb +++ b/meta/recipes-devtools/python/python3_3.11.5.bb | |||
@@ -224,6 +224,10 @@ do_install:append:class-nativesdk () { | |||
224 | create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1' | 224 | create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1' |
225 | } | 225 | } |
226 | 226 | ||
227 | do_install_ptest:append:class-target:libc-musl () { | ||
228 | 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 | ||
229 | } | ||
230 | |||
227 | SYSROOT_PREPROCESS_FUNCS:append:class-target = " provide_target_config_script" | 231 | SYSROOT_PREPROCESS_FUNCS:append:class-target = " provide_target_config_script" |
228 | SYSROOT_PREPROCESS_FUNCS:append:class-nativesdk = " provide_target_config_script" | 232 | SYSROOT_PREPROCESS_FUNCS:append:class-nativesdk = " provide_target_config_script" |
229 | 233 | ||
@@ -431,8 +435,9 @@ FILES:${PN}-man = "${datadir}/man" | |||
431 | # See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395 | 435 | # See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395 |
432 | RDEPENDS:libpython3:append:libc-glibc = " libgcc" | 436 | RDEPENDS:libpython3:append:libc-glibc = " libgcc" |
433 | RDEPENDS:${PN}-ctypes:append:libc-glibc = " ${MLPREFIX}ldconfig" | 437 | RDEPENDS:${PN}-ctypes:append:libc-glibc = " ${MLPREFIX}ldconfig" |
434 | RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev ${PN}-cgitb ${PN}-zipapp unzip bzip2 libgcc tzdata coreutils sed gcc g++ binutils" | 438 | RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev ${PN}-cgitb ${PN}-zipapp unzip bzip2 libgcc tzdata coreutils sed gcc g++ binutils \ |
435 | RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-fr-fr locale-base-en-us locale-base-tr-tr locale-base-de-de" | 439 | locale-base-fr-fr locale-base-en-us locale-base-de-de" |
440 | RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-tr-tr" | ||
436 | RDEPENDS:${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${MLPREFIX}tk ${MLPREFIX}tk-lib', '', d)}" | 441 | RDEPENDS:${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${MLPREFIX}tk ${MLPREFIX}tk-lib', '', d)}" |
437 | RDEPENDS:${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${PN}-tkinter ${MLPREFIX}tcl', '', d)}" | 442 | RDEPENDS:${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${PN}-tkinter ${MLPREFIX}tcl', '', d)}" |
438 | DEV_PKG_DEPENDENCY = "" | 443 | DEV_PKG_DEPENDENCY = "" |