summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/conf/include/ptest-packagelists-meta-networking.inc36
-rw-r--r--meta-networking/recipes-core/images/meta-networking-image-ptest-all.bb25
-rw-r--r--meta-networking/recipes-core/images/meta-networking-image-ptest-fast.bb5
-rw-r--r--meta-networking/recipes-core/images/meta-networking-image-ptest.bb40
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
9PTESTS_FAST_META_NETWORKING = "\
10 geoip \
11 libcoap \
12 libldb \
13 libnftnl \
14 libtalloc \
15 libtdb \
16 lldpd \
17 mbedtls \
18 tcpdump \
19"
20
21PTESTS_SLOW_META_NETWORKING = "\
22 firewalld \
23 net-snmp \
24"
25
26PTESTS_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 @@
1DESCRIPTION = "Recipe to trigger execution of all meta-networking ptest images."
2HOMEPAGE = "https://www.openembedded.org/"
3
4LICENSE = "MIT"
5
6inherit features_check nopackages
7REQUIRED_DISTRO_FEATURES = "ptest"
8
9require conf/include/ptest-packagelists-meta-networking.inc
10
11# Include the full set of ptests
12PTESTS_META_NETWORKING = "${PTESTS_FAST_META_NETWORKING} ${PTESTS_SLOW_META_NETWORKING} ${PTESTS_PROBLEMS_META_NETWORKING}"
13
14do_testimage[noexec] = "1"
15do_testimage[depends] = "${@' '.join(['meta-networking-image-ptest-'+x+':do_testimage' for x in d.getVar('PTESTS_META_NETWORKING').split()])}"
16
17do_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
20EXCLUDE_FROM_WORLD = "1"
21
22python () {
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 @@
1require meta-networking-image-ptest-all.bb
2
3DESCRIPTION = "Recipe to trigger execution of all fast meta-networking ptest images."
4
5PTESTS_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 @@
1inherit features_check
2REQUIRED_DISTRO_FEATURES = "ptest"
3
4require recipes-core/images/core-image-minimal.bb
5require conf/include/ptest-packagelists-meta-networking.inc
6
7SUMMARY = "meta-networking ptest test image"
8
9DESCRIPTION += "Also including the ${MCNAME} ptest package."
10HOMEPAGE = "https://www.openembedded.org/"
11
12PTESTS_META_NETWORKING = "${PTESTS_SLOW_META_NETWORKING} ${PTESTS_FAST_META_NETWORKING} ${PTESTS_PROBLEMS_META_NETWORKING}"
13
14IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh"
15
16BBCLASSEXTEND = "${@' '.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.
21IMAGE_OVERHEAD_FACTOR = "1.0"
22IMAGE_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
27QB_MEM = "-m 1024"
28# If a particular ptest needs more memroy, it can be customized:
29#QB_MEM:virtclass-mcextend-<pn> = "-m 4096"
30
31TEST_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
34PTEST_EXPECT_FAILURE = "1"
35
36python () {
37 if not d.getVar("MCNAME"):
38 raise bb.parse.SkipRecipe("No class extension set")
39}
40