mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
meta-filesystems: Add meta-filesystems-image-ptest
This will help in running ptests like core layer, right now there are just 3 but I hope to get more contributions now that infra is in place to run all ptests bitbake meta-filesystems-image-ptest-all to run a single recipe ptests bitbake meta-filesystems-image-ptest-fuse3 Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
daa0049d23
commit
2a86823036
|
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Lists of the ptest in meta-filesystems, sorted into two sets by the time they take
|
||||
# Please keep these sorted in alphabetical order
|
||||
#
|
||||
# A first pass at getting all meta-filesystems recipes which inherit ptest
|
||||
# meta_filesystems_ptest_recipes=$(bitbake-layers show-recipes --recipes-only --layer meta-filesystems --inherits ptest --bare | sed -e '1,/=== Matching recipes: ===/d')
|
||||
# ptests which take less than ~30s each
|
||||
|
||||
PTESTS_FAST_META_FILESYSTEMS = "\
|
||||
e2tools \
|
||||
fuse3 \
|
||||
"
|
||||
|
||||
PTESTS_SLOW_META_FILESYSTEMS = "\
|
||||
"
|
||||
PTESTS_PROBLEMS_META_FILESYSTEMS = "\
|
||||
sshfs-fuse \
|
||||
"
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
DESCRIPTION = "Recipe to trigger execution of all meta-filesystems ptest images."
|
||||
HOMEPAGE = "https://www.openembedded.org/"
|
||||
|
||||
LICENSE = "MIT"
|
||||
|
||||
inherit features_check nopackages
|
||||
REQUIRED_DISTRO_FEATURES = "ptest"
|
||||
|
||||
require conf/include/ptest-packagelists-meta-filesystems.inc
|
||||
|
||||
# Include the full set of ptests
|
||||
PTESTS_META_FILESYSTEMS = "${PTESTS_FAST_META_FILESYSTEMS} ${PTESTS_SLOW_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}"
|
||||
|
||||
do_testimage[noexec] = "1"
|
||||
do_testimage[depends] = "${@' '.join(['meta-filesystems-image-ptest-'+x+':do_testimage' for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}"
|
||||
|
||||
do_build[depends] = "${@' '.join(['meta-filesystems-image-ptest-'+x+':do_build' for x in d.getVar('PTESTS_META_FILESYSTEMS').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)
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
require meta-filesystems-image-ptest-all.bb
|
||||
|
||||
DESCRIPTION = "Recipe to trigger execution of all fast meta-filesystems ptest images."
|
||||
|
||||
PTESTS_META_OE = "${PTESTS_FAST_META_FILESYSTEMS}"
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
inherit features_check
|
||||
REQUIRED_DISTRO_FEATURES = "ptest"
|
||||
|
||||
require recipes-core/images/core-image-minimal.bb
|
||||
require conf/include/ptest-packagelists-meta-filesystems.inc
|
||||
|
||||
SUMMARY = "meta-filesystems ptest test image"
|
||||
|
||||
DESCRIPTION += "Also including the ${MCNAME} ptest package."
|
||||
HOMEPAGE = "https://www.openembedded.org/"
|
||||
|
||||
PTESTS_META_FILESYSTEMS = "${PTESTS_SLOW_META_FILESYSTEMS} ${PTESTS_FAST_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}"
|
||||
|
||||
IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh"
|
||||
|
||||
BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in d.getVar('PTESTS_META_FILESYSTEMS').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 memroy, it can be customized:
|
||||
#QB_MEM:virtclass-mcextend-<pn> = "-m 4096"
|
||||
|
||||
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")
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user