From e0abbc52802d36cbd6e5c15c38d6649a822e6450 Mon Sep 17 00:00:00 2001 From: Trevor Gamblin Date: Fri, 13 Oct 2023 13:08:00 -0400 Subject: python3-py-cpuinfo: disable broken ptests There are a handful of CLI-related ptests that consistently fail with an apparent permissions issue, but making the .../site-packages/cpuinfo/cpuinfo.py script executable does not seem to fix the problem. Skip these tests for now, and make sure that the right /usr/bin/env line is present in py-cpuinfo's scripts on the image. Signed-off-by: Trevor Gamblin Signed-off-by: Khem Raj --- meta-python/recipes-devtools/python/python3-py-cpuinfo_9.0.0.bb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'meta-python/recipes-devtools/python/python3-py-cpuinfo_9.0.0.bb') diff --git a/meta-python/recipes-devtools/python/python3-py-cpuinfo_9.0.0.bb b/meta-python/recipes-devtools/python/python3-py-cpuinfo_9.0.0.bb index 5fbac03ac0..84172c058e 100644 --- a/meta-python/recipes-devtools/python/python3-py-cpuinfo_9.0.0.bb +++ b/meta-python/recipes-devtools/python/python3-py-cpuinfo_9.0.0.bb @@ -11,8 +11,16 @@ SRC_URI[sha256sum] = "3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3 inherit ptest pypi setuptools3 SRC_URI += "file://run-ptest \ + file://0001-test_cli.py-disable.patch \ " +do_install:append() { + # Make sure we use /usr/bin/env python3 + for PYTHSCRIPT in `grep -rIl '^#!.*python' ${D}`; do + sed -i -e '1s|^#!.*|#!/usr/bin/env ${PYTHON_PN}|' $PYTHSCRIPT + done +} + do_install_ptest() { install -d ${D}${PTEST_PATH}/tests cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -- cgit v1.2.3-54-g00ecf