diff options
| author | Khem Raj <raj.khem@gmail.com> | 2024-02-22 18:59:42 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2024-02-22 19:24:00 -0800 |
| commit | b757ba3028af9dda48e3d516bcbb30525d1369d5 (patch) | |
| tree | 4426233d05bffb40957267a62e94ea69d317f33f /meta-networking | |
| parent | e886090d9a1c12870f7dd99eca166305db1004cb (diff) | |
| download | meta-openembedded-b757ba3028af9dda48e3d516bcbb30525d1369d5.tar.gz | |
meta-networking-image-ptest: Add images to enable BBCLASSEXTEND parallel execution
In line with other layers like meta-oe, meta-python add capability to
run recipe ptests
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
4 files changed, 106 insertions, 0 deletions
diff --git a/meta-networking/conf/include/ptest-packagelists-meta-networking.inc b/meta-networking/conf/include/ptest-packagelists-meta-networking.inc new file mode 100644 index 0000000000..6b41bfcf1a --- /dev/null +++ b/meta-networking/conf/include/ptest-packagelists-meta-networking.inc | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | # | ||
| 2 | # Lists of the ptest in meta-networking, 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-networking recipes which inherit ptest | ||
| 6 | # meta_networking_ptest_recipes=$(bitbake-layers show-recipes --recipes-only --layer meta-networking --inherits ptest --bare | sed -e '1,/=== Matching recipes: ===/d') | ||
| 7 | # ptests which take less than ~30s each | ||
| 8 | |||
| 9 | PTESTS_FAST_META_NETWORKING = "\ | ||
| 10 | geoip \ | ||
| 11 | libcoap \ | ||
| 12 | libldb \ | ||
| 13 | libnftnl \ | ||
| 14 | libtalloc \ | ||
| 15 | libtdb \ | ||
| 16 | lldpd \ | ||
| 17 | mbedtls \ | ||
| 18 | tcpdump \ | ||
| 19 | " | ||
| 20 | |||
| 21 | PTESTS_SLOW_META_NETWORKING = "\ | ||
| 22 | firewalld \ | ||
| 23 | net-snmp \ | ||
| 24 | " | ||
| 25 | |||
| 26 | PTESTS_PROBLEMS_META_NETWORKING = "\ | ||
| 27 | freediameter \ | ||
| 28 | geoip-perl \ | ||
| 29 | libtevent \ | ||
| 30 | lksctp-tools \ | ||
| 31 | nftables \ | ||
| 32 | openhpi \ | ||
| 33 | openl2tp \ | ||
| 34 | python3-scapy \ | ||
| 35 | squid \ | ||
| 36 | " | ||
diff --git a/meta-networking/recipes-core/images/meta-networking-image-ptest-all.bb b/meta-networking/recipes-core/images/meta-networking-image-ptest-all.bb new file mode 100644 index 0000000000..6d96d4a876 --- /dev/null +++ b/meta-networking/recipes-core/images/meta-networking-image-ptest-all.bb | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | DESCRIPTION = "Recipe to trigger execution of all meta-networking 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-networking.inc | ||
| 10 | |||
| 11 | # Include the full set of ptests | ||
| 12 | PTESTS_META_NETWORKING = "${PTESTS_FAST_META_NETWORKING} ${PTESTS_SLOW_META_NETWORKING} ${PTESTS_PROBLEMS_META_NETWORKING}" | ||
| 13 | |||
| 14 | do_testimage[noexec] = "1" | ||
| 15 | do_testimage[depends] = "${@' '.join(['meta-networking-image-ptest-'+x+':do_testimage' for x in d.getVar('PTESTS_META_NETWORKING').split()])}" | ||
| 16 | |||
| 17 | do_build[depends] = "${@' '.join(['meta-networking-image-ptest-'+x+':do_build' for x in d.getVar('PTESTS_META_NETWORKING').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-networking/recipes-core/images/meta-networking-image-ptest-fast.bb b/meta-networking/recipes-core/images/meta-networking-image-ptest-fast.bb new file mode 100644 index 0000000000..9f46ac8c1d --- /dev/null +++ b/meta-networking/recipes-core/images/meta-networking-image-ptest-fast.bb | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | require meta-networking-image-ptest-all.bb | ||
| 2 | |||
| 3 | DESCRIPTION = "Recipe to trigger execution of all fast meta-networking ptest images." | ||
| 4 | |||
| 5 | PTESTS_META_NETWORKING = "${PTESTS_FAST_META_NETWORKING}" | ||
diff --git a/meta-networking/recipes-core/images/meta-networking-image-ptest.bb b/meta-networking/recipes-core/images/meta-networking-image-ptest.bb new file mode 100644 index 0000000000..f458b761f2 --- /dev/null +++ b/meta-networking/recipes-core/images/meta-networking-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-networking.inc | ||
| 6 | |||
| 7 | SUMMARY = "meta-networking ptest test image" | ||
| 8 | |||
| 9 | DESCRIPTION += "Also including the ${MCNAME} ptest package." | ||
| 10 | HOMEPAGE = "https://www.openembedded.org/" | ||
| 11 | |||
| 12 | PTESTS_META_NETWORKING = "${PTESTS_SLOW_META_NETWORKING} ${PTESTS_FAST_META_NETWORKING} ${PTESTS_PROBLEMS_META_NETWORKING}" | ||
| 13 | |||
| 14 | IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh" | ||
| 15 | |||
| 16 | BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in d.getVar('PTESTS_META_NETWORKING').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 | |||
