[buildbot] phase2: max_builds is always set to 1
LEDE Commits
lede-commits at lists.infradead.org
Fri Dec 22 05:48:52 PST 2023
ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/65502c7ec51968435036ab43be208fcb08728a5c
commit 65502c7ec51968435036ab43be208fcb08728a5c
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Fri Dec 22 14:32:02 2023 +0100
phase2: max_builds is always set to 1
Align with phase1 (ac0d815)
Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
phase2/master.cfg | 23 +++--------------------
1 file changed, 3 insertions(+), 20 deletions(-)
diff --git a/phase2/master.cfg b/phase2/master.cfg
index ae994cd..1267cf1 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -70,7 +70,6 @@ if ini.has_option("phase2", "persistent"):
persistent = ini.getboolean("phase2", "persistent")
c['workers'] = []
-max_builds = dict()
for section in ini.sections():
if section.startswith("worker "):
@@ -78,21 +77,12 @@ for section in ini.sections():
ini.has_option(section, "phase") and ini.getint(section, "phase") == 2:
name = ini.get(section, "name")
password = ini.get(section, "password")
- sl_props = { 'shared_wd': False }
- max_builds[name] = 1
-
- if ini.has_option(section, "builds"):
- max_builds[name] = ini.getint(section, "builds")
-
- if max_builds[name] == 1:
- sl_props['shared_wd'] = True
+ sl_props = { 'shared_wd': True }
if ini.has_option(section, "shared_wd"):
sl_props['shared_wd'] = ini.getboolean(section, "shared_wd")
- if sl_props['shared_wd'] and (max_builds != 1):
- raise ValueError('max_builds must be 1 with shared workdir!')
- c['workers'].append(Worker(name, password, max_builds = max_builds[name], properties = sl_props))
+ c['workers'].append(Worker(name, password, max_builds = 1, properties = sl_props))
# 'workerPortnum' defines the TCP port to listen on for connections from workers.
# This must match the value configured into the buildworkers (with their
@@ -277,13 +267,6 @@ def GetDirectorySuffix(props):
return "-%02d.%02d" %(int(m.group(1)), int(m.group(2)))
return ""
- at properties.renderer
-def GetNumJobs(props):
- if props.hasProperty("workername") and props.hasProperty("nproc"):
- return str(int(props["nproc"]) / max_builds[props["workername"]])
- else:
- return "1"
-
@properties.renderer
def GetCwd(props):
if props.hasProperty("builddir"):
@@ -574,7 +557,7 @@ for arch in arches:
description = "Building packages",
workdir = "build/sdk",
timeout = 3600,
- command = ["make", Interpolate("-j%(kw:jobs)s", jobs=GetNumJobs), "IGNORE_ERRORS=n m y", "BUILD_LOG=1", "CONFIG_AUTOREMOVE=y", "CONFIG_SIGNED_PACKAGES="],
+ command = ["make", Interpolate("-j%(prop:nproc:-1)s"), "IGNORE_ERRORS=n m y", "BUILD_LOG=1", "CONFIG_AUTOREMOVE=y", "CONFIG_SIGNED_PACKAGES="],
env = {'CCACHE_BASEDIR': Interpolate("%(kw:cwd)s", cwd=GetCwd)},
haltOnFailure = True))
More information about the lede-commits
mailing list