scripts/run-config: Allow a specific step to disable buildtools

We need buildtools (and the poky repo) for resulttool in some indexing steps. We don't
want buildtools in the dashboard step as we need semver from the host.

Rework the config to allow this and fix failures on the infrastructure.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2025-03-10 11:00:35 +00:00
parent daac0b0326
commit e90fc2078c
2 changed files with 13 additions and 5 deletions

View File

@ -1374,7 +1374,6 @@
}
},
"indexing" : {
"NEEDEDREPOS" : [],
"step1" : {
"shortname" : "Generate non-release index",
"EXTRACMDS" : ["${SCRIPTSDIR}/generate-testresult-index.py ${BASE_SHAREDDIR}/pub/non-release/"]
@ -1385,6 +1384,7 @@
},
"step3" : {
"shortname" : "Populate/update dashboard site",
"NOBUILDTOOLS" : true,
"EXTRACMDS" : ["${SCRIPTSDIR}/run-dashboard-index ${BUILDDIR}/../"]
}
},

View File

@ -129,14 +129,22 @@ def addstepentry(name, taskdesc, shortname, description, detail, phase, usepty=F
bbdesc = bbdesc + ": " + detail
jsonconfig.append({"name" : name, "bbname" : bbname[:46], "phase" : phase, "description" : bbdesc, "usepty" : usepty})
if args.target == "indexing":
pass
elif jcfg:
if jcfg:
buildtools = utils.setup_buildtools_tarball(ourconfig, args.workername, None, checkonly=True)
if buildtools:
addentry("buildtools", "Setup buildtools tarball", "init")
else:
utils.setup_buildtools_tarball(ourconfig, args.workername, args.builddir + "/../buildtools")
# If we're executing a specific step, check whether we buildtools is disabled for it
buildtools = True
if args.stepname in ("build-targets", "cmds", "test-targets", "plain-cmds"):
try:
buildtools = not utils.getconfigvar("NOBUILDTOOLS", ourconfig, args.target, int(args.phase))
except ValueError:
# Not an integer step phase
pass
if buildtools:
utils.setup_buildtools_tarball(ourconfig, args.workername, args.builddir + "/../buildtools")
if args.phase == "init" and args.stepname == "buildtools":
sys.exit(0)