-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathsettings.py
More file actions
69 lines (60 loc) · 1.76 KB
/
settings.py
File metadata and controls
69 lines (60 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import yaml
# Define branch to build
branches_list = [
"7.0",
"6.19",
"6.18",
"6.12",
"6.6",
"6.1",
"5.15",
"5.10",
]
def get_arches():
config = yaml.safe_load(open("config/config.yaml"))
architecture_testing_list = config["architecture_testing_list"]
return architecture_testing_list
#def get_arches_stabilization():
# config = yaml.safe_load(open("config/config_stabilization.yaml"))
# architecture_stabilization_list = config["architecture_stabilization_list"]
# return architecture_stabilization_list
# get a list of all workers
def get_workers():
try:
cf = open("buildbot-config.yaml")
cy = yaml.safe_load(cf)
except IOError:
return []
if "workers" not in cy:
print("ERROR: no workers list")
return []
return cy["workers"]
# get a list of all workers who can work arch+toolchain
def get_workers_for(arch, toolchain):
fwl = []
wl = get_workers()
for wkr in wl:
if arch == "gentoo_sources":
if "gentoo_sources" in wkr:
fwl.append(wkr["name"])
continue
if arch == "other_sources":
if "other_sources" in wkr:
fwl.append(wkr["name"])
continue
if arch == "eclass_change":
if "eclass_change" in wkr:
fwl.append(wkr["name"])
continue
if "toolchains" not in wkr:
fwl.append(wkr["name"])
continue
if arch not in wkr["toolchains"]:
continue
if toolchain not in wkr["toolchains"][arch]:
continue
fwl.append(wkr["name"])
print("DEBUG: get_workers_for %s %s is %s" % (arch, toolchain, str(fwl)))
return fwl