Put files from installed tests into a ptest package to avoid having
them in an image and to avoid having more runtime dependencies
than necessary.

Signed-off-by: Konrad Weihmann <[email protected]>
---
 meta/classes/distutils-common-base.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/distutils-common-base.bbclass 
b/meta/classes/distutils-common-base.bbclass
index 94b5fd426d..e3b36574aa 100644
--- a/meta/classes/distutils-common-base.bbclass
+++ b/meta/classes/distutils-common-base.bbclass
@@ -13,8 +13,13 @@ export CCSHARED  = "-fPIC -DPIC"
 # the python executable
 export LINKFORSHARED = "{SECURITY_CFLAGS} -Xlinker -export-dynamic"
 
+PACKAGES =+ "${@oe.utils.ifelse(bb.data.inherits_class('image', d), '', 
'${PN}-ptest')}"
+
 FILES_${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*"
 
+FILES_${PN}-ptest += "${PYTHON_SITEPACKAGES_DIR}/**/test/*"
+ALLOW_EMPTY_${PN}-ptest = "1"
+
 FILES_${PN}-staticdev += "\
   ${PYTHON_SITEPACKAGES_DIR}/*.a \
 "
-- 
2.20.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#140431): 
https://lists.openembedded.org/g/openembedded-core/message/140431
Mute This Topic: https://lists.openembedded.org/mt/75383184/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to