diff options
-rw-r--r-- | meta/recipes-core/images/core-image-ptest-all.bb | 34 | ||||
-rw-r--r-- | meta/recipes-core/images/core-image-ptest-fast.bb | 24 | ||||
-rw-r--r-- | meta/recipes-core/images/core-image-ptest.bb | 39 |
3 files changed, 59 insertions, 38 deletions
diff --git a/meta/recipes-core/images/core-image-ptest-all.bb b/meta/recipes-core/images/core-image-ptest-all.bb index 1472451675..81c9b2d68a 100644 --- a/meta/recipes-core/images/core-image-ptest-all.bb +++ b/meta/recipes-core/images/core-image-ptest-all.bb | |||
@@ -1,25 +1,25 @@ | |||
1 | inherit features_check | 1 | DESCRIPTION = "Recipe to trigger execution of all ptest images." |
2 | HOMEPAGE = "https://www.yoctoproject.org/" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | inherit features_check nopackages | ||
2 | REQUIRED_DISTRO_FEATURES = "ptest" | 7 | REQUIRED_DISTRO_FEATURES = "ptest" |
3 | 8 | ||
4 | require core-image-minimal.bb | ||
5 | require conf/distro/include/ptest-packagelists.inc | 9 | require conf/distro/include/ptest-packagelists.inc |
6 | 10 | ||
7 | DESCRIPTION += "Also includes ptest packages." | ||
8 | HOMEPAGE = "https://www.yoctoproject.org/" | ||
9 | |||
10 | # Include the full set of ptests | 11 | # Include the full set of ptests |
11 | IMAGE_INSTALL += "${PTESTS_FAST} ${PTESTS_SLOW}" | 12 | PTESTS = "${PTESTS_FAST} ${PTESTS_SLOW}" |
13 | |||
14 | do_testimage[noexec] = "1" | ||
15 | do_testimage[depends] = "${@' '.join(['core-image-ptest-'+x.replace('-ptest', '')+':do_testimage' for x in d.getVar('PTESTS').split()])}" | ||
12 | 16 | ||
13 | # This image is sufficiently large (~1.8GB) that we need to be careful that it fits in a live | 17 | do_build[depends] = "${@' '.join(['core-image-ptest-'+x.replace('-ptest', '')+':do_build' for x in d.getVar('PTESTS').split()])}" |
14 | # image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the | ||
15 | # box) and explicitly add just 1100MB. | ||
16 | # strace-ptest in particular needs more than 500MB | ||
17 | IMAGE_OVERHEAD_FACTOR = "1.0" | ||
18 | IMAGE_ROOTFS_EXTRA_SPACE = "1124288" | ||
19 | 18 | ||
20 | # ptests need more memory than standard to avoid the OOM killer | 19 | # normally image.bbclass would do this |
21 | # also lttng-tools needs /tmp that has at least 2G | 20 | EXCLUDE_FROM_WORLD = "1" |
22 | QB_MEM = "-m 4096" | ||
23 | 21 | ||
24 | # Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places | 22 | python () { |
25 | PTEST_EXPECT_FAILURE = "1" | 23 | if bb.utils.contains('IMAGE_CLASSES', 'testimage', True, False, d): |
24 | bb.build.addtask("do_testimage", "", "", d) | ||
25 | } | ||
diff --git a/meta/recipes-core/images/core-image-ptest-fast.bb b/meta/recipes-core/images/core-image-ptest-fast.bb index 40df274c4c..e768afb302 100644 --- a/meta/recipes-core/images/core-image-ptest-fast.bb +++ b/meta/recipes-core/images/core-image-ptest-fast.bb | |||
@@ -1,24 +1,6 @@ | |||
1 | inherit features_check | 1 | require core-image-ptest-all.bb |
2 | REQUIRED_DISTRO_FEATURES = "ptest" | ||
3 | 2 | ||
4 | require core-image-minimal.bb | 3 | DESCRIPTION = "Recipe to trigger execution of all fast ptest images." |
5 | require conf/distro/include/ptest-packagelists.inc | ||
6 | 4 | ||
7 | # Include only fast (< 30 sec) ptests | 5 | PTESTS = "${PTESTS_FAST}" |
8 | IMAGE_INSTALL += "${PTESTS_FAST}" | ||
9 | 6 | ||
10 | DESCRIPTION += "Also includes ptest packages with fast execution times to allow for more automated QA." | ||
11 | HOMEPAGE = "https://www.yoctoproject.org/" | ||
12 | |||
13 | # This image is sufficiently large (~1.8GB) that it can't actually fit in a live | ||
14 | # image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the | ||
15 | # box) and explicitly add just 1500MB. | ||
16 | # strace-ptest in particular needs more than 500MB | ||
17 | IMAGE_OVERHEAD_FACTOR = "1.0" | ||
18 | IMAGE_ROOTFS_EXTRA_SPACE = "1524288" | ||
19 | |||
20 | # ptests need more memory than standard to avoid the OOM killer | ||
21 | QB_MEM = "-m 1024" | ||
22 | |||
23 | # Sadly at the moment the fast set of ptests is not robust enough and sporadically fails in a couple of places | ||
24 | PTEST_EXPECT_FAILURE = "1" | ||
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 @@ | |||
1 | inherit features_check | ||
2 | REQUIRED_DISTRO_FEATURES = "ptest" | ||
3 | |||
4 | require core-image-minimal.bb | ||
5 | require conf/distro/include/ptest-packagelists.inc | ||
6 | |||
7 | DESCRIPTION += "Also including the ${MCNAME} ptest package." | ||
8 | HOMEPAGE = "https://www.yoctoproject.org/" | ||
9 | |||
10 | PTESTS = "${PTESTS_SLOW} ${PTESTS_FAST}" | ||
11 | |||
12 | IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh" | ||
13 | |||
14 | BBCLASSEXTEND = "${@' '.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 | ||
20 | IMAGE_OVERHEAD_FACTOR = "1.0" | ||
21 | IMAGE_ROOTFS_EXTRA_SPACE = "324288" | ||
22 | IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-strace = "1024288" | ||
23 | IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-lttng-tools = "1524288" | ||
24 | |||
25 | # ptests need more memory than standard to avoid the OOM killer | ||
26 | QB_MEM = "-m 1024" | ||
27 | QB_MEM:virtclass-mcextend-lttng-tools = "-m 4096" | ||
28 | QB_MEM:virtclass-mcextend-python3-cryptography = "-m 4096" | ||
29 | |||
30 | TEST_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 | ||
33 | PTEST_EXPECT_FAILURE = "1" | ||
34 | |||
35 | python () { | ||
36 | if not d.getVar("MCNAME"): | ||
37 | raise bb.parse.SkipRecipe("No class extension set") | ||
38 | } | ||
39 | |||