Browse Source

infra/buildbot: fix "for w workers", use common defs for common sets

Paul Jakma 4 years ago
parent
commit
0d91779a1f
1 changed files with 12 additions and 15 deletions
  1. 12 15
      infra/buildbot/master/master.cfg

+ 12 - 15
infra/buildbot/master/master.cfg

@@ -80,16 +80,20 @@ for w in (w for w in workers.values () if ("latent" in w)
 	w["session"] = 'qemu+ssh://buildbot@sagan.jakma.org/system'
 
 osbuilders = ["build-" + kw for kw in workers]
+osfastbuilders = ["build-" + kw for kw in workers if workers[kw]["vm"] == False]
+osslowbuilders = ["build-" + kw for kw in workers if workers[kw]["vm"] == True]
+
+rpmbuilders = ["rpm-" + kw for kw in workers if workers[kw]["pkg"] == "rpm"]
 
 allbuilders =  []
 allbuilders += osbuilders
-allbuilders += ["rpm-" + kw for kw in workers if workers[kw]["pkg"] == "rpm"]
+allbuilders += rpmbuilders
 allbuilders += analyses_builders
 allbuilders += ["commit-builder"]
 allbuilders += ["build-distcheck"]
 
 # Force merging of requests.
-c['mergeRequests'] = lambda *args, **kwargs: True
+# c['mergeRequests'] = lambda *args, **kwargs: True
 
 ####### BUILDSLAVES
 c['slaves'] = []
@@ -159,16 +163,12 @@ c['schedulers'].append(schedulers.SingleBranchScheduler(
 # Initial build checks on faster, non-VM
 c['schedulers'].append(schedulers.Triggerable(
 	name="trigger-build-first",
-	builderNames=list("build-" + kw
-				for kw in workers
-					if workers[kw]["vm"] == False)))
+	builderNames=osfastbuilders))
 
 # Build using remaining builders, after firstbuilders.
 c['schedulers'].append(schedulers.Triggerable(
 	name="trigger-build-rest",
-	builderNames=list("build-" + kw
-				for w in workers
-					if workers[kw]["vm"] == True)))
+	builderNames=osslowbuilders))
 
 # Analyses tools, e.g. CLang Analyzer scan-build
 c['schedulers'].append(schedulers.Triggerable(
@@ -181,9 +181,7 @@ c['schedulers'].append(schedulers.Triggerable(
 # RPM check and build
 c['schedulers'].append(schedulers.Triggerable(
 		       name="trigger-rpm",	
-		       builderNames=["rpm-" + kw
-				      for kw in workers 
-				      if workers[kw]["pkg"] == "rpm"]))
+		       builderNames=rpmbuilders))
 
 # Try and force schedulers
 c['schedulers'].append(schedulers.ForceScheduler(
@@ -192,10 +190,9 @@ c['schedulers'].append(schedulers.ForceScheduler(
 
 c['schedulers'].append(schedulers.Try_Userpass(
 		       name="try",
-		       builderNames=["build-" + kw for kw in workers]
-		       		    + ["rpm-" + kw for kw in workers
-		       		    	if workers[kw]["pkg"] == "rpm"]
-				     + ["build-distcheck", 
+		       builderNames=osbuilders
+		       		    + rpmbuilders
+				    + ["build-distcheck", 
 					 "clang-analyzer" ],
 			userpass=users,
 			port=8031))