summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniko.mauno@vaisala.com <niko.mauno@vaisala.com>2022-06-22 22:16:13 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-25 00:06:08 +0100
commitd45aef25c1960ae55e615625248a41f6a3c56fca (patch)
tree42a189ee46e9b1e7f6b14a7557be82aa75a915d2
parent24e6bbb90f5b8a4ba1e867b2652cd4a39ffd259d (diff)
downloadpoky-d45aef25c1960ae55e615625248a41f6a3c56fca.tar.gz
ptest.bbclass: Honor PARALLEL_MAKE, PARALLEL_MAKEINST
Since oe_runmake wrapper doesn't by default involve PARALLEL_MAKE outside do_compile() nor PARALLEL_MAKEINST outside do_install(), enable parallellized make by default when oe_runmake is invoked from do_compile_ptest() or do_install_ptest() by declaring wrapper task specific EXTRA_OEMAKE overrides in fashion similar to do_compile and do_install overrides in meta/conf/bitbake.conf. Parallel make can still be disabled by resetting bbclass specific PTEST_PARALLEL_MAKE and PTEST_PARALLEL_MAKEINST variables in recipe e.g. if a race issue needs to be avoided without modifying source code. Tested by issuing following command sequence on a 32-core build host: $ bitbake -c clean util-linux && bitbake --skip-setscene -c compile util-linux && time bitbake --skip-setscene -c compile_ptest_base util-linux and found that before this change the result was real 0m34.684s user 0m0.753s sys 0m0.131s and after this change real 0m9.868s user 0m0.749s sys 0m0.150s (From OE-Core rev: 5c09d2a017add8bd34142c6c1543e2d0f9ead286) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/ptest.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 1ec23c0923..c162f5d934 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -5,6 +5,10 @@ This package contains a test directory ${PTEST_PATH} for package test purposes."
5PTEST_PATH ?= "${libdir}/${BPN}/ptest" 5PTEST_PATH ?= "${libdir}/${BPN}/ptest"
6PTEST_BUILD_HOST_FILES ?= "Makefile" 6PTEST_BUILD_HOST_FILES ?= "Makefile"
7PTEST_BUILD_HOST_PATTERN ?= "" 7PTEST_BUILD_HOST_PATTERN ?= ""
8PTEST_PARALLEL_MAKE ?= "${PARALLEL_MAKE}"
9PTEST_PARALLEL_MAKEINST ?= "${PARALLEL_MAKEINST}"
10EXTRA_OEMAKE:prepend:task-compile-ptest-base = "${PTEST_PARALLEL_MAKE} "
11EXTRA_OEMAKE:prepend:task-install-ptest-base = "${PTEST_PARALLEL_MAKEINST} "
8 12
9FILES:${PN}-ptest += "${PTEST_PATH}" 13FILES:${PN}-ptest += "${PTEST_PATH}"
10SECTION:${PN}-ptest = "devel" 14SECTION:${PN}-ptest = "devel"