diff options
4 files changed, 88 insertions, 0 deletions
diff --git a/meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc b/meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc new file mode 100644 index 0000000000..f57bbab930 --- /dev/null +++ b/meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | # | ||
| 2 | # Lists of the ptest in meta-filesystems, sorted into two sets by the time they take | ||
| 3 | # Please keep these sorted in alphabetical order | ||
| 4 | # | ||
| 5 | # A first pass at getting all meta-filesystems recipes which inherit ptest | ||
| 6 | # meta_filesystems_ptest_recipes=$(bitbake-layers show-recipes --recipes-only --layer meta-filesystems --inherits ptest --bare | sed -e '1,/=== Matching recipes: ===/d') | ||
| 7 | # ptests which take less than ~30s each | ||
| 8 | |||
| 9 | PTESTS_FAST_META_FILESYSTEMS = "\ | ||
| 10 | e2tools \ | ||
| 11 | fuse3 \ | ||
| 12 | " | ||
| 13 | |||
| 14 | PTESTS_SLOW_META_FILESYSTEMS = "\ | ||
| 15 | " | ||
| 16 | PTESTS_PROBLEMS_META_FILESYSTEMS = "\ | ||
| 17 | sshfs-fuse \ | ||
| 18 | " | ||
diff --git a/meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-all.bb b/meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-all.bb new file mode 100644 index 0000000000..ffbfa1a3f6 --- /dev/null +++ b/meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-all.bb | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | DESCRIPTION = "Recipe to trigger execution of all meta-filesystems 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-filesystems.inc | ||
| 10 | |||
| 11 | # Include the full set of ptests | ||
| 12 | PTESTS_META_FILESYSTEMS = "${PTESTS_FAST_META_FILESYSTEMS} ${PTESTS_SLOW_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}" | ||
| 13 | |||
| 14 | do_testimage[noexec] = "1" | ||
| 15 | do_testimage[depends] = "${@' '.join(['meta-filesystems-image-ptest-'+x+':do_testimage' for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}" | ||
| 16 | |||
| 17 | do_build[depends] = "${@' '.join(['meta-filesystems-image-ptest-'+x+':do_build' for x in d.getVar('PTESTS_META_FILESYSTEMS').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-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-fast.bb b/meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-fast.bb new file mode 100644 index 0000000000..0eb5344d9e --- /dev/null +++ b/meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-fast.bb | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | require meta-filesystems-image-ptest-all.bb | ||
| 2 | |||
| 3 | DESCRIPTION = "Recipe to trigger execution of all fast meta-filesystems ptest images." | ||
| 4 | |||
| 5 | PTESTS_META_OE = "${PTESTS_FAST_META_FILESYSTEMS}" | ||
diff --git a/meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest.bb b/meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest.bb new file mode 100644 index 0000000000..90d6a92c1b --- /dev/null +++ b/meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest.bb | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | inherit features_check | ||
| 2 | REQUIRED_DISTRO_FEATURES = "ptest" | ||
| 3 | |||
| 4 | require recipes-core/images/core-image-minimal.bb | ||
| 5 | require conf/include/ptest-packagelists-meta-filesystems.inc | ||
| 6 | |||
| 7 | SUMMARY = "meta-filesystems ptest test image" | ||
| 8 | |||
| 9 | DESCRIPTION += "Also including the ${MCNAME} ptest package." | ||
| 10 | HOMEPAGE = "https://www.openembedded.org/" | ||
| 11 | |||
| 12 | PTESTS_META_FILESYSTEMS = "${PTESTS_SLOW_META_FILESYSTEMS} ${PTESTS_FAST_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}" | ||
| 13 | |||
| 14 | IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh" | ||
| 15 | |||
| 16 | BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}" | ||
| 17 | |||
| 18 | # The image can be sufficiently large (~1.8GB) that we need to be careful that it fits in a live | ||
| 19 | # image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the | ||
| 20 | # box) and explicitly add up to 1500MB. | ||
| 21 | IMAGE_OVERHEAD_FACTOR = "1.0" | ||
| 22 | IMAGE_ROOTFS_EXTRA_SPACE = "324288" | ||
| 23 | # If a particular ptest needs more space, it can be customized: | ||
| 24 | #IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-<pn> = "1024288" | ||
| 25 | |||
| 26 | # ptests need more memory than standard to avoid the OOM killer | ||
| 27 | QB_MEM = "-m 1024" | ||
| 28 | # If a particular ptest needs more memroy, it can be customized: | ||
| 29 | #QB_MEM:virtclass-mcextend-<pn> = "-m 4096" | ||
| 30 | |||
| 31 | TEST_SUITES = "ping ssh parselogs ptest" | ||
| 32 | |||
| 33 | # Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places | ||
| 34 | PTEST_EXPECT_FAILURE = "1" | ||
| 35 | |||
| 36 | python () { | ||
| 37 | if not d.getVar("MCNAME"): | ||
| 38 | raise bb.parse.SkipRecipe("No class extension set") | ||
| 39 | } | ||
| 40 | |||
