Skip to content

Commit affc51a

Browse files
committed
llvmlab: Stub out dummy llvmlab plugin for the lab.llvm.org installation.
- Won't work yet because we haven't moved that config over to using the "phase_config" description objects. llvm-svn: 141393
1 parent a3a3f09 commit affc51a

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

zorg/llvmlab/__init__.py

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
"""
2+
lab.llvm.org site specific customizations for the LLVM Lab web app.
3+
"""
4+
5+
import os
6+
import sys
7+
8+
# Allow direct import of the master configuration files.
9+
g_master_dir = os.path.join(os.path.dirname(__file__),
10+
"..", "..", "buildbot", "llvmlab", "master")
11+
if g_master_dir not in sys.path:
12+
sys.path.append(g_master_dir)
13+
try:
14+
from config import phase_config
15+
except:
16+
# FIXME: Remove this once actual phase_config object is in place.
17+
class DummyConfig:
18+
phases = []
19+
phase_config = DummyConfig()
20+
21+
import llvmlab.ci.config
22+
import llvmlab.ci.summary
23+
24+
def construct_config():
25+
phases = []
26+
builders = []
27+
published_builds = []
28+
29+
# Add hard coded builders.
30+
builders.append(llvmlab.ci.config.Builder("Validated Build"))
31+
32+
for phase in phase_config.phases:
33+
# Add the phase object.
34+
phase_builder = "phase%d - %s" % (phase['number'], phase['name'])
35+
phases.append(llvmlab.ci.config.Phase(
36+
phase['title'], phase['number'], phase_builder,
37+
[b['name'] for b in phase['builders']],
38+
phase['description']))
39+
40+
# Add the builder objects.
41+
builders.append(llvmlab.ci.config.Builder(phase_builder))
42+
for b in phase['builders']:
43+
builders.append(llvmlab.ci.config.Builder(b['name']))
44+
45+
return llvmlab.ci.config.Config(phases, builders, published_builds,
46+
"Validated Build")
47+
48+
def register(app):
49+
# Construct the LLVM Lab dashboard configuration object directly from the
50+
# buildbot phase_config module.
51+
config = construct_config()
52+
app.config.summary = llvmlab.ci.summary.Summary(
53+
config, app.config.status)
54+
55+
print >>sys.stderr, "note: loaded lab.llvm.org extensions"

0 commit comments

Comments
 (0)