summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/images/core-image-ptest.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/images/core-image-ptest.bb')
-rw-r--r--meta/recipes-core/images/core-image-ptest.bb39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-core/images/core-image-ptest.bb b/meta/recipes-core/images/core-image-ptest.bb
new file mode 100644
index 0000000000..0c67943b05
--- /dev/null
+++ b/meta/recipes-core/images/core-image-ptest.bb
@@ -0,0 +1,39 @@
1inherit features_check
2REQUIRED_DISTRO_FEATURES = "ptest"
3
4require core-image-minimal.bb
5require conf/distro/include/ptest-packagelists.inc
6
7DESCRIPTION += "Also including the ${MCNAME} ptest package."
8HOMEPAGE = "https://www.yoctoproject.org/"
9
10PTESTS = "${PTESTS_SLOW} ${PTESTS_FAST}"
11
12IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh"
13
14BBCLASSEXTEND = "${@' '.join(['mcextend:'+x.replace('-ptest', '') for x in d.getVar('PTESTS').split()])}"
15
16# The image can sufficiently large (~1.8GB) that we need to be careful that it fits in a live
17# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
18# box) and explicitly add up to 1500MB.
19# strace-ptest in particular needs more than 500MB
20IMAGE_OVERHEAD_FACTOR = "1.0"
21IMAGE_ROOTFS_EXTRA_SPACE = "324288"
22IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-strace = "1024288"
23IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-lttng-tools = "1524288"
24
25# ptests need more memory than standard to avoid the OOM killer
26QB_MEM = "-m 1024"
27QB_MEM:virtclass-mcextend-lttng-tools = "-m 4096"
28QB_MEM:virtclass-mcextend-python3-cryptography = "-m 4096"
29
30TEST_SUITES = "ping ssh parselogs ptest"
31
32# Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places
33PTEST_EXPECT_FAILURE = "1"
34
35python () {
36 if not d.getVar("MCNAME"):
37 raise bb.parse.SkipRecipe("No class extension set")
38}
39