[buildbot] phase1: move target enumeration to function
LEDE Commits
lede-commits at lists.infradead.org
Mon May 15 08:39:11 PDT 2023
ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/7b729b5e2e8e42b60ea0cb2cce7c0126dc8c505d
commit 7b729b5e2e8e42b60ea0cb2cce7c0126dc8c505d
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Thu Oct 20 19:41:57 2022 +0200
phase1: move target enumeration to function
Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
phase1/master.cfg | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/phase1/master.cfg b/phase1/master.cfg
index 9c88daf..be53f60 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -234,22 +234,24 @@ c['prioritizeBuilders'] = prioritizeBuilders
# find targets
targets = [ ]
-if not os.path.isdir(work_dir+'/source.git'):
- subprocess.call(["git", "clone", "--depth=1", "--branch="+repo_branch, repo_url, work_dir+'/source.git'])
-else:
- subprocess.call(["git", "pull"], cwd = work_dir+'/source.git')
-
-os.makedirs(work_dir+'/source.git/tmp', exist_ok=True)
-findtargets = subprocess.Popen(['./scripts/dump-target-info.pl', 'targets'],
- stdout = subprocess.PIPE, cwd = work_dir+'/source.git')
-
-while True:
- line = findtargets.stdout.readline()
- if not line:
- break
- ta = line.decode().strip().split(' ')
- targets.append(ta[0])
+def populateTargets():
+ if not os.path.isdir(work_dir+'/source.git'):
+ subprocess.call(["git", "clone", "--depth=1", "--branch="+repo_branch, repo_url, work_dir+'/source.git'])
+ else:
+ subprocess.call(["git", "pull"], cwd = work_dir+'/source.git')
+
+ os.makedirs(work_dir+'/source.git/tmp', exist_ok=True)
+ findtargets = subprocess.Popen(['./scripts/dump-target-info.pl', 'targets'],
+ stdout = subprocess.PIPE, stderr = subprocess.DEVNULL, cwd = work_dir+'/source.git')
+
+ while True:
+ line = findtargets.stdout.readline()
+ if not line:
+ break
+ ta = line.decode().strip().split(' ')
+ targets.append(ta[0])
+populateTargets()
# the 'change_source' setting tells the buildmaster how it should find out
# about source code changes. Here we point to the buildbot clone of pyflakes.
More information about the lede-commits
mailing list