branchNames = [branches[b]["name"] for b in branches]
# find targets
-targets = [ ]
+targets = set()
def populateTargets():
+ log.msg("Populating targets, this will take time")
sourcegit = work_dir + '/source.git'
- if os.path.isdir(sourcegit):
- subprocess.call(["rm", "-rf", sourcegit])
+ for branch in branchNames:
+ if os.path.isdir(sourcegit):
+ subprocess.call(["rm", "-rf", sourcegit])
- subprocess.call(["git", "clone", "--depth=1", "--branch="+repo_branch, repo_url, sourcegit])
+ subprocess.call(["git", "clone", "--depth=1", "--branch="+branch, repo_url, sourcegit])
- os.makedirs(sourcegit + '/tmp', exist_ok=True)
- findtargets = subprocess.Popen(['./scripts/dump-target-info.pl', 'targets'],
- stdout = subprocess.PIPE, stderr = subprocess.DEVNULL, cwd = sourcegit)
+ os.makedirs(sourcegit + '/tmp', exist_ok=True)
+ findtargets = subprocess.Popen(['./scripts/dump-target-info.pl', 'targets'],
+ stdout = subprocess.PIPE, stderr = subprocess.DEVNULL, cwd = sourcegit)
- while True:
- line = findtargets.stdout.readline()
- if not line:
- break
- ta = line.decode().strip().split(' ')
- targets.append(ta[0])
+ while True:
+ line = findtargets.stdout.readline()
+ if not line:
+ break
+ ta = line.decode().strip().split(' ')
+ targets.add(ta[0])
- subprocess.call(["rm", "-rf", sourcegit])
+ subprocess.call(["rm", "-rf", sourcegit])
populateTargets()
name = "all",
change_filter = filter.ChangeFilter(branch=repo_branch),
treeStableTimer = 60,
- builderNames = targets))
+ builderNames = list(targets)))
c['schedulers'].append(ForceScheduler(
name = "force",
name = "target",
label = "Build target",
default = "all",
- choices = [ "all" ] + targets
+ choices = set( "all" ) | targets
),
TagChoiceParameter(
name = "tag",