aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-core/images
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-core/images')
-rw-r--r--meta-python/recipes-core/images/meta-python-image-all.bb (renamed from meta-python/recipes-core/images/meta-python-image.bb)2
-rw-r--r--meta-python/recipes-core/images/meta-python-image-base.bb7
-rw-r--r--meta-python/recipes-core/images/meta-python-image-ptest-all.bb25
-rw-r--r--meta-python/recipes-core/images/meta-python-image-ptest-fast.bb6
-rw-r--r--meta-python/recipes-core/images/meta-python-image-ptest.bb44
-rw-r--r--meta-python/recipes-core/images/meta-python-ptest-image.bb5
6 files changed, 76 insertions, 13 deletions
diff --git a/meta-python/recipes-core/images/meta-python-image.bb b/meta-python/recipes-core/images/meta-python-image-all.bb
index 6353d389b5..fbe3efc600 100644
--- a/meta-python/recipes-core/images/meta-python-image.bb
+++ b/meta-python/recipes-core/images/meta-python-image-all.bb
@@ -1,4 +1,4 @@
-require meta-python-image-base.bb
+require recipes-core/images/core-image-base.bb
SUMMARY = "meta-python build test image"
diff --git a/meta-python/recipes-core/images/meta-python-image-base.bb b/meta-python/recipes-core/images/meta-python-image-base.bb
deleted file mode 100644
index 81081e61b2..0000000000
--- a/meta-python/recipes-core/images/meta-python-image-base.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-SUMMARY = "meta-python build test image"
-
-IMAGE_INSTALL = "packagegroup-core-boot"
-
-LICENSE = "MIT"
-
-inherit core-image
diff --git a/meta-python/recipes-core/images/meta-python-image-ptest-all.bb b/meta-python/recipes-core/images/meta-python-image-ptest-all.bb
new file mode 100644
index 0000000000..d6708c5fd0
--- /dev/null
+++ b/meta-python/recipes-core/images/meta-python-image-ptest-all.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Recipe to trigger execution of all meta-python ptest images."
+HOMEPAGE = "https://www.openembedded.org/"
+
+LICENSE = "MIT"
+
+inherit features_check nopackages
+REQUIRED_DISTRO_FEATURES = "ptest"
+
+require conf/include/ptest-packagelists-meta-python.inc
+
+# Include the full set of ptests
+PTESTS_META_PYTHON = "${PTESTS_FAST_META_PYTHON} ${PTESTS_SLOW_META_PYTHON} ${PTESTS_PROBLEMS_META_PYTHON}"
+
+do_testimage[noexec] = "1"
+do_testimage[depends] = "${@' '.join(['meta-python-image-ptest-'+x+':do_testimage' for x in d.getVar('PTESTS_META_PYTHON').split()])}"
+
+do_build[depends] = "${@' '.join(['meta-python-image-ptest-'+x+':do_build' for x in d.getVar('PTESTS_META_PYTHON').split()])}"
+
+# normally image.bbclass would do this
+EXCLUDE_FROM_WORLD = "1"
+
+python () {
+ if bb.utils.contains('IMAGE_CLASSES', 'testimage', True, False, d):
+ bb.build.addtask("do_testimage", "", "", d)
+}
diff --git a/meta-python/recipes-core/images/meta-python-image-ptest-fast.bb b/meta-python/recipes-core/images/meta-python-image-ptest-fast.bb
new file mode 100644
index 0000000000..bb6e8213fe
--- /dev/null
+++ b/meta-python/recipes-core/images/meta-python-image-ptest-fast.bb
@@ -0,0 +1,6 @@
+require meta-python-image-ptest-all.bb
+
+DESCRIPTION = "Recipe to trigger execution of all fast meta-python ptest images."
+
+PTESTS_META_PYTHON = "${PTESTS_FAST_META_PYTHON}"
+
diff --git a/meta-python/recipes-core/images/meta-python-image-ptest.bb b/meta-python/recipes-core/images/meta-python-image-ptest.bb
new file mode 100644
index 0000000000..002bd7a39e
--- /dev/null
+++ b/meta-python/recipes-core/images/meta-python-image-ptest.bb
@@ -0,0 +1,44 @@
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "ptest"
+
+require recipes-core/images/core-image-minimal.bb
+require conf/include/ptest-packagelists-meta-python.inc
+
+SUMMARY = "meta-python ptest test image"
+
+DESCRIPTION += "Also including the ${MCNAME} ptest package."
+HOMEPAGE = "https://www.openembedded.org/"
+
+PTESTS_META_PYTHON = "${PTESTS_SLOW_META_PYTHON} ${PTESTS_FAST_META_PYTHON} ${PTESTS_PROBLEMS_META_PYTHON}"
+
+IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh"
+
+BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in d.getVar('PTESTS_META_PYTHON').split()])}"
+
+# The image can be sufficiently large (~1.8GB) that we need to be careful that it fits in a live
+# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
+# box) and explicitly add up to 1500MB.
+IMAGE_OVERHEAD_FACTOR = "1.0"
+IMAGE_ROOTFS_EXTRA_SPACE = "324288"
+# If a particular ptest needs more space, it can be customized:
+#IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-<pn> = "1024288"
+
+# ptests need more memory than standard to avoid the OOM killer
+QB_MEM = "-m 1024"
+# If a particular ptest needs more memory, it can be customized:
+#QB_MEM:virtclass-mcextend-<pn> = "-m 4096"
+# python3-scrypt ptests run into OOMs on RISCV64 qemu
+QB_MEM:virtclass-mcextend-python3-scrypt = "-m 2048"
+QB_MEM:virtclass-mcextend-python3-fastjsonschema = "-m 2048"
+QB_MEM:virtclass-mcextend-python3-pillow = "-m 2048"
+
+TEST_SUITES = "ping ssh parselogs ptest"
+
+# Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places
+PTEST_EXPECT_FAILURE = "1"
+
+python () {
+ if not d.getVar("MCNAME"):
+ raise bb.parse.SkipRecipe("No class extension set")
+}
+
diff --git a/meta-python/recipes-core/images/meta-python-ptest-image.bb b/meta-python/recipes-core/images/meta-python-ptest-image.bb
deleted file mode 100644
index d497016d41..0000000000
--- a/meta-python/recipes-core/images/meta-python-ptest-image.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require meta-python-image-base.bb
-
-SUMMARY = "meta-python ptest test image"
-
-IMAGE_INSTALL += "packagegroup-meta-python3-ptest"