From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: buildroot@buildroot.org
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH 2/3] support/tests: allow top-level parallel builds
Date: Sat, 24 Dec 2022 10:18:12 +0100 [thread overview]
Message-ID: <a04f80a248fb1452841a424e850a694419e3a6dd.1671873478.git.yann.morin.1998@free.fr> (raw)
In-Reply-To: <cover.1671873478.git.yann.morin.1998@free.fr>
Running tests with top-level parallel builds can speed up running some
tests, expecially those that have a lot of packages like the systemd
init tests.
Trigger TLPB when the configuration enables per-package directories.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
support/testing/infra/basetest.py | 2 +-
support/testing/infra/builder.py | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index 45bcd4c2e2..670c7213d6 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -52,7 +52,7 @@ class BRConfigTest(unittest.TestCase):
def setUp(self):
self.show_msg("Starting")
- self.b = Builder(self.config, self.builddir, self.logtofile)
+ self.b = Builder(self.config, self.builddir, self.logtofile, self.jlevel)
if not self.keepbuilds:
self.b.delete()
diff --git a/support/testing/infra/builder.py b/support/testing/infra/builder.py
index 922a707220..a2abb9ed89 100644
--- a/support/testing/infra/builder.py
+++ b/support/testing/infra/builder.py
@@ -6,11 +6,12 @@ import infra
class Builder(object):
- def __init__(self, config, builddir, logtofile):
+ def __init__(self, config, builddir, logtofile, jlevel=None):
self.config = '\n'.join([line.lstrip() for line in
config.splitlines()]) + '\n'
self.builddir = builddir
self.logfile = infra.open_log_file(builddir, "build", logtofile)
+ self.jlevel = jlevel
def is_defconfig_valid(self, configfile, defconfig):
"""Check if the .config is contains all lines present in the defconfig."""
@@ -87,6 +88,8 @@ class Builder(object):
env.update(make_extra_env)
cmd = ["make", "-C", self.builddir]
+ if "BR2_PER_PACKAGE_DIRECTORIES=y" in self.config.splitlines() and self.jlevel:
+ cmd.append(f"-j{self.jlevel}")
cmd += make_extra_opts
ret = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile,
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-12-24 9:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-24 9:18 [Buildroot] [PATCH 0/3] support/testing: misc improvements (branch yem/runtime-test-ppd) Yann E. MORIN
2022-12-24 9:18 ` [Buildroot] [PATCH 1/3] support/tests: print failed command and output on assertRunOK error Yann E. MORIN
2022-12-27 20:42 ` Thomas Petazzoni via buildroot
2022-12-24 9:18 ` Yann E. MORIN [this message]
2022-12-27 20:45 ` [Buildroot] [PATCH 2/3] support/tests: allow top-level parallel builds Thomas Petazzoni via buildroot
2022-12-27 20:53 ` Yann E. MORIN
2022-12-27 20:55 ` Yann E. MORIN
2023-02-07 8:39 ` Thomas Petazzoni via buildroot
2022-12-24 9:18 ` [Buildroot] [PATCH 3/3] support/tests: enable PPD, and thus TLPB, for systemd tests Yann E. MORIN
2023-02-07 8:39 ` Thomas Petazzoni via buildroot
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=a04f80a248fb1452841a424e850a694419e3a6dd.1671873478.git.yann.morin.1998@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
/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.