From ae3586c3f63211bdb6f838a1eeb377a424093e5a Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Wed, 12 Aug 2026 16:00:02 +0300 Subject: [PATCH] python3-adafruit-pureio: Enable tests Inherit ptest-python-pytest. The tests require I2C and are supposed to be run against a ADS1x15 I2C analog-to-digital converter (ADC). Show a warning if ENABLE_I2C has not been set to "1" during the installation of the tests. Signed-off-by: Leon Anavi --- recipes-devtools/python/python3-adafruit-pureio_1.1.11.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes-devtools/python/python3-adafruit-pureio_1.1.11.bb b/recipes-devtools/python/python3-adafruit-pureio_1.1.11.bb index d60d50b..abdd7f1 100644 --- a/recipes-devtools/python/python3-adafruit-pureio_1.1.11.bb +++ b/recipes-devtools/python/python3-adafruit-pureio_1.1.11.bb @@ -7,7 +7,7 @@ SRC_URI[sha256sum] = "c4cfbb365731942d1f1092a116f47dfdae0aef18c5b27f1072b5824ad5 PYPI_PACKAGE = "Adafruit_PureIO" -inherit pypi python_setuptools_build_meta +inherit pypi python_setuptools_build_meta ptest-python-pytest DEPENDS += "\ python3-setuptools-scm-native \ @@ -19,3 +19,9 @@ RDEPENDS:${PN} += "\ python3-ctypes \ python3-fcntl \ " + +do_install_ptest:append() { + if [ "${ENABLE_I2C}" != "1" ]; then + bbwarn "The tests require I2C. Set ENABLE_I2C to \"1\" to enable it." + fi +}