@@ -24,6 +24,8 @@
"BUILDPERF_STATEDIR" : "${BASE_HOMEDIR}/buildperf",
"BUILDPERF_RESULTSDIR" : "${BASE_HOMEDIR}/buildperf-results",
+ "WORKER_DIR" : "${BASE_HOMEDIR}/yocto-worker",
+
"defaults" : {
"NEEDREPOS" : ["poky"],
"DISTRO" : "poky",
@@ -35,8 +35,12 @@ with open(args.repojson) as f:
repos = json.load(f)
stashdir = utils.getconfig("REPO_STASH_DIR", ourconfig)
+basetmpdir = os.path.join(utils.getconfig("BASE_HOMEDIR", ourconfig), "tmp")
+sharedsrcdir = os.path.abspath(args.sharedsrcdir)
+utils.mkdir(basetmpdir)
+utils.mkdir(sharedsrcdir)
-with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuild/tmp") as tempdir:
+with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir=basetmpdir) as tempdir:
for repo in sorted(repos.keys()):
utils.printheader("Intially fetching repo %s" % repo)
# shallow clones disabled as it doesn't work correctly with revision numbers in the result repo leading to release build failures.
@@ -48,4 +52,4 @@ with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuil
utils.publishrepo(tempdir, repo, args.publish_dir)
utils.printheader("Creating shared src tarball")
- subprocess.check_call("tar -I zstd -cf " + args.sharedsrcdir.rstrip("/") + ".tar.zst ./*", shell=True, cwd=tempdir)
+ subprocess.check_call("tar -I zstd -cf " + sharedsrcdir + ".tar.zst ./*", shell=True, cwd=tempdir)
@@ -5,8 +5,13 @@
import os, sys, glob
+import utils
+
+ourconfig = utils.loadconfig()
+
# constants
-HOME = "/home/pokybuild/yocto-worker/"
+
+workerdir = utils.getconfig("WORKER_DIR", ourconfig)
top_header = 7
max_cols = 11
cpu_hoggers = 5
@@ -18,7 +23,7 @@ special_cmds = ["rm", "tar", "qemu"]
# string substitution to make things easier to read
subs = {
- "/home/pokybuild/yocto-worker/" : "~/",
+ workerdir : "~/",
"/build/build/tmp/work/" : "/...WORK_DIR.../"
}
@@ -64,8 +69,8 @@ def summarize_top(top_outs, target):
short_summary = top_out[:top_header + cpu_hoggers]
for line in top_out[top_header:]:
cmd = line.split(maxsplit=max_cols)[-1]
- if cmd.startswith(HOME):
- b = cmd.split(HOME)[1].split("/")[0]
+ if cmd.startswith(workerdir):
+ b = cmd.split(workerdir)[1].split("/")[0]
if b not in other_builds:
other_builds.append(b)
if cmd[0] == "[" and cmd[-1] == "]": # kernel processes