From: Niko Mauno <niko.mauno@vaisala.com>
To: openembedded-core@lists.openembedded.org
Cc: Niko Mauno <niko.mauno@vaisala.com>
Subject: [PATCH 1/3] ptest.bbclass: Honor PARALLEL_MAKE, PARALLEL_MAKEINST
Date: Wed, 22 Jun 2022 22:16:13 +0300 [thread overview]
Message-ID: <20220622191615.10168-1-niko.mauno@vaisala.com> (raw)
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
Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
---
meta/classes/ptest.bbclass | 4 ++++
1 file changed, 4 insertions(+)
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."
PTEST_PATH ?= "${libdir}/${BPN}/ptest"
PTEST_BUILD_HOST_FILES ?= "Makefile"
PTEST_BUILD_HOST_PATTERN ?= ""
+PTEST_PARALLEL_MAKE ?= "${PARALLEL_MAKE}"
+PTEST_PARALLEL_MAKEINST ?= "${PARALLEL_MAKEINST}"
+EXTRA_OEMAKE:prepend:task-compile-ptest-base = "${PTEST_PARALLEL_MAKE} "
+EXTRA_OEMAKE:prepend:task-install-ptest-base = "${PTEST_PARALLEL_MAKEINST} "
FILES:${PN}-ptest += "${PTEST_PATH}"
SECTION:${PN}-ptest = "devel"
--
2.35.1
next reply other threads:[~2022-06-22 19:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 19:16 Niko Mauno [this message]
2022-06-22 19:16 ` [PATCH 2/3] strace: Drop redundant oe_runmake parameter Niko Mauno
2022-06-23 9:30 ` [OE-core] " Luca Ceresoli
2022-06-23 16:53 ` Niko Mauno
2022-06-24 10:30 ` Luca Ceresoli
2022-06-22 19:16 ` [PATCH 3/3] valgrind: " Niko Mauno
2022-06-25 16:55 ` [OE-core] [PATCH 1/3] ptest.bbclass: Honor PARALLEL_MAKE, PARALLEL_MAKEINST Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220622191615.10168-1-niko.mauno@vaisala.com \
--to=niko.mauno@vaisala.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.