diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-09 22:00:08 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-14 07:17:47 +0000 |
commit | 5850561b05bd5bd16b2d02d0c4c4efc705543139 (patch) | |
tree | fde840b2f88100480440b26217ef3cc3eb04e7de /meta/recipes-core/images/core-image-ptest-all.bb | |
parent | f84c07deeb22ef1608e55196e7a8727ac0970d33 (diff) | |
download | poky-5850561b05bd5bd16b2d02d0c4c4efc705543139.tar.gz |
core-image-ptest: Switch to BBCLASSEXTEND parallel execution
Replace the two images where tests are run serially with an image
per ptest in the form core-image-ptest-XXX using class extensions.
The original two images are then replaced with dependencies on these
images. This allows parallel execution of the tests.
The downside to this approach is the parsing time of an image generating
this number of class extensions is slow but making it easier to execute
and collect test data should outweigh that.
A useful advantage is that the dependencies of each ptest package are
checked/tested indvidually.
(From OE-Core rev: f3f63ff01971df7d67213a7e7b1294489a5d3c0f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/images/core-image-ptest-all.bb')
-rw-r--r-- | meta/recipes-core/images/core-image-ptest-all.bb | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/meta/recipes-core/images/core-image-ptest-all.bb b/meta/recipes-core/images/core-image-ptest-all.bb index 1472451675..81c9b2d68a 100644 --- a/meta/recipes-core/images/core-image-ptest-all.bb +++ b/meta/recipes-core/images/core-image-ptest-all.bb | |||
@@ -1,25 +1,25 @@ | |||
1 | inherit features_check | 1 | DESCRIPTION = "Recipe to trigger execution of all ptest images." |
2 | HOMEPAGE = "https://www.yoctoproject.org/" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | inherit features_check nopackages | ||
2 | REQUIRED_DISTRO_FEATURES = "ptest" | 7 | REQUIRED_DISTRO_FEATURES = "ptest" |
3 | 8 | ||
4 | require core-image-minimal.bb | ||
5 | require conf/distro/include/ptest-packagelists.inc | 9 | require conf/distro/include/ptest-packagelists.inc |
6 | 10 | ||
7 | DESCRIPTION += "Also includes ptest packages." | ||
8 | HOMEPAGE = "https://www.yoctoproject.org/" | ||
9 | |||
10 | # Include the full set of ptests | 11 | # Include the full set of ptests |
11 | IMAGE_INSTALL += "${PTESTS_FAST} ${PTESTS_SLOW}" | 12 | PTESTS = "${PTESTS_FAST} ${PTESTS_SLOW}" |
13 | |||
14 | do_testimage[noexec] = "1" | ||
15 | do_testimage[depends] = "${@' '.join(['core-image-ptest-'+x.replace('-ptest', '')+':do_testimage' for x in d.getVar('PTESTS').split()])}" | ||
12 | 16 | ||
13 | # This image is sufficiently large (~1.8GB) that we need to be careful that it fits in a live | 17 | do_build[depends] = "${@' '.join(['core-image-ptest-'+x.replace('-ptest', '')+':do_build' for x in d.getVar('PTESTS').split()])}" |
14 | # image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the | ||
15 | # box) and explicitly add just 1100MB. | ||
16 | # strace-ptest in particular needs more than 500MB | ||
17 | IMAGE_OVERHEAD_FACTOR = "1.0" | ||
18 | IMAGE_ROOTFS_EXTRA_SPACE = "1124288" | ||
19 | 18 | ||
20 | # ptests need more memory than standard to avoid the OOM killer | 19 | # normally image.bbclass would do this |
21 | # also lttng-tools needs /tmp that has at least 2G | 20 | EXCLUDE_FROM_WORLD = "1" |
22 | QB_MEM = "-m 4096" | ||
23 | 21 | ||
24 | # Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places | 22 | python () { |
25 | PTEST_EXPECT_FAILURE = "1" | 23 | if bb.utils.contains('IMAGE_CLASSES', 'testimage', True, False, d): |
24 | bb.build.addtask("do_testimage", "", "", d) | ||
25 | } | ||