[oe] [meta-oe][PATCH 2/2] ostree: Add support for gjs tests

Alex Kiernan alex.kiernan at gmail.com
Sun Dec 15 07:34:23 UTC 2019


Now gjs is packaged in meta-gnome, if that layer is available then
enable the gjs tests. Also weaken test for python3-pyyaml so that
building ptest without meta-python is possible (though more tests will
have to be skipped).

Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
---

 meta-oe/recipes-extended/ostree/ostree_2019.6.bb | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/meta-oe/recipes-extended/ostree/ostree_2019.6.bb b/meta-oe/recipes-extended/ostree/ostree_2019.6.bb
index 86a7aac31c27..374ceb397ba0 100644
--- a/meta-oe/recipes-extended/ostree/ostree_2019.6.bb
+++ b/meta-oe/recipes-extended/ostree/ostree_2019.6.bb
@@ -86,6 +86,10 @@ EXTRA_OECONF_class-native = " \
     --disable-otmpfile \
 "
 
+CACHED_CONFIGUREVARS += " \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'gnome-layer', 'ac_cv_path_GJS=${bindir}/gjs', '', d)} \
+"
+
 # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the
 # do_configure stage so we do depend on it
 SYSROOT_DIR = "${STAGING_DIR_TARGET}"
@@ -166,9 +170,10 @@ RDEPENDS_${PN}-ptest += " \
     grep \
     python3-core \
     python3-multiprocessing \
-    python3-pyyaml \
     tar \
     ${PN}-trivial-httpd \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'gnome-layer', 'gjs', '', d)} \
+    ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-python', 'python3-pyyaml', '', d)} \
 "
 RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us"
 
@@ -179,9 +184,3 @@ SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path"
 SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service"
 
 BBCLASSEXTEND = "native"
-
-python __anonymous() {
-    if bb.utils.contains('PTEST_ENABLED', '1', 'True', '', d):
-        if not bb.utils.contains_any('BBFILE_COLLECTIONS', 'meta-python', 'True', '', d):
-            raise bb.parse.SkipRecipe('ptest requires meta-python to be present.')
-}
-- 
2.17.1



More information about the Openembedded-devel mailing list