diff options
3 files changed, 66 insertions, 3 deletions
diff --git a/meta-perl/recipes-core/images/meta-perl-ptest-all-image.bb b/meta-perl/recipes-core/images/meta-perl-ptest-all-image.bb new file mode 100644 index 0000000000..236043c22a --- /dev/null +++ b/meta-perl/recipes-core/images/meta-perl-ptest-all-image.bb | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | DESCRIPTION = "Recipe to trigger execution of all meta-perl ptest images." | ||
| 2 | HOMEPAGE = "https://www.openembedded.org/" | ||
| 3 | |||
| 4 | LICENSE = "MIT" | ||
| 5 | |||
| 6 | inherit features_check nopackages | ||
| 7 | REQUIRED_DISTRO_FEATURES = "ptest" | ||
| 8 | |||
| 9 | require conf/include/ptest-packagelists-meta-perl.inc | ||
| 10 | |||
| 11 | # Include the full set of ptests | ||
| 12 | PTESTS_META_PERL = "${PTESTS_FAST_META_PERL} ${PTESTS_SLOW_META_PERL}" | ||
| 13 | |||
| 14 | do_testimage[noexec] = "1" | ||
| 15 | do_testimage[depends] = "${@' '.join(['meta-perl-ptest-image-'+x+':do_testimage' for x in d.getVar('PTESTS_META_PERL').split()])}" | ||
| 16 | |||
| 17 | do_build[depends] = "${@' '.join(['meta-perl-ptest-image-'+x+':do_build' for x in d.getVar('PTESTS_META_PERL').split()])}" | ||
| 18 | |||
| 19 | # normally image.bbclass would do this | ||
| 20 | EXCLUDE_FROM_WORLD = "1" | ||
| 21 | |||
| 22 | python () { | ||
| 23 | if bb.utils.contains('IMAGE_CLASSES', 'testimage', True, False, d): | ||
| 24 | bb.build.addtask("do_testimage", "", "", d) | ||
| 25 | } | ||
diff --git a/meta-perl/recipes-core/images/meta-perl-ptest-fast-image.bb b/meta-perl/recipes-core/images/meta-perl-ptest-fast-image.bb new file mode 100644 index 0000000000..5d8afa08e7 --- /dev/null +++ b/meta-perl/recipes-core/images/meta-perl-ptest-fast-image.bb | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | require meta-perl-ptest-all-image.bb | ||
| 2 | |||
| 3 | DESCRIPTION = "Recipe to trigger execution of all fast meta-perl ptest images." | ||
| 4 | |||
| 5 | PTESTS_META_PERL = "${PTESTS_FAST_META_PERL}" | ||
| 6 | |||
diff --git a/meta-perl/recipes-core/images/meta-perl-ptest-image.bb b/meta-perl/recipes-core/images/meta-perl-ptest-image.bb index a9b4cc3c7d..7cca6402b2 100644 --- a/meta-perl/recipes-core/images/meta-perl-ptest-image.bb +++ b/meta-perl/recipes-core/images/meta-perl-ptest-image.bb | |||
| @@ -1,9 +1,41 @@ | |||
| 1 | inherit features_check | ||
| 2 | REQUIRED_DISTRO_FEATURES += "ptest" | ||
| 3 | |||
| 1 | require meta-perl-base.bb | 4 | require meta-perl-base.bb |
| 2 | 5 | ||
| 3 | SUMMARY = "meta-perl build ptest image" | 6 | SUMMARY = "meta-perl build ptest image" |
| 4 | 7 | ||
| 5 | inherit features_check | 8 | require conf/include/ptest-packagelists-meta-perl.inc |
| 6 | 9 | ||
| 7 | REQUIRED_DISTRO_FEATURES += "ptest" | 10 | DESCRIPTION += "Also including the ${MCNAME} ptest package." |
| 11 | HOMEPAGE = "https://www.openembedded.org/" | ||
| 12 | |||
| 13 | PTESTS_META_PERL = "${PTESTS_SLOW_META_PERL} ${PTESTS_FAST_META_PERL}" | ||
| 14 | |||
| 15 | IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh" | ||
| 16 | |||
| 17 | BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in d.getVar('PTESTS_META_PERL').split()])}" | ||
| 18 | |||
| 19 | # The image can be sufficiently large (~1.8GB) that we need to be careful that it fits in a live | ||
| 20 | # image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the | ||
| 21 | # box) and explicitly add up to 1500MB. | ||
| 22 | IMAGE_OVERHEAD_FACTOR = "1.0" | ||
| 23 | IMAGE_ROOTFS_EXTRA_SPACE = "324288" | ||
| 24 | # If a particular ptest needs more space, it can be customized: | ||
| 25 | #IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-<pn> = "1024288" | ||
| 26 | |||
| 27 | # ptests need more memory than standard to avoid the OOM killer | ||
| 28 | QB_MEM = "-m 1024" | ||
| 29 | # If a particular ptest needs more memory, it can be customized: | ||
| 30 | #QB_MEM:virtclass-mcextend-<pn> = "-m 4096" | ||
| 31 | |||
| 32 | TEST_SUITES = "ping ssh parselogs ptest" | ||
| 33 | |||
| 34 | # Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places | ||
| 35 | PTEST_EXPECT_FAILURE = "1" | ||
| 36 | |||
| 37 | python () { | ||
| 38 | if not d.getVar("MCNAME"): | ||
| 39 | raise bb.parse.SkipRecipe("No class extension set") | ||
| 40 | } | ||
| 8 | 41 | ||
| 9 | IMAGE_INSTALL += "packagegroup-meta-perl-ptest" | ||
