[llvm-commits] [zorg] r141393 - in /zorg/trunk/zorg/llvmlab: ./ __init__.py

Daniel Dunbar daniel at zuster.org
Fri Oct 7 12:54:42 PDT 2011


Author: ddunbar
Date: Fri Oct  7 14:54:42 2011
New Revision: 141393

URL: http://llvm.org/viewvc/llvm-project?rev=141393&view=rev
Log:
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.

Added:
    zorg/trunk/zorg/llvmlab/
    zorg/trunk/zorg/llvmlab/__init__.py

Added: zorg/trunk/zorg/llvmlab/__init__.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/llvmlab/__init__.py?rev=141393&view=auto
==============================================================================
--- zorg/trunk/zorg/llvmlab/__init__.py (added)
+++ zorg/trunk/zorg/llvmlab/__init__.py Fri Oct  7 14:54:42 2011
@@ -0,0 +1,55 @@
+"""
+lab.llvm.org site specific customizations for the LLVM Lab web app.
+"""
+
+import os
+import sys
+
+# Allow direct import of the master configuration files.
+g_master_dir = os.path.join(os.path.dirname(__file__),
+                            "..", "..", "buildbot", "llvmlab", "master")
+if g_master_dir not in sys.path:
+    sys.path.append(g_master_dir)
+try:
+    from config import phase_config
+except:
+    # FIXME: Remove this once actual phase_config object is in place.
+    class DummyConfig:
+        phases = []
+    phase_config = DummyConfig()
+
+import llvmlab.ci.config
+import llvmlab.ci.summary
+
+def construct_config():
+    phases = []
+    builders = []
+    published_builds = []
+
+    # Add hard coded builders.
+    builders.append(llvmlab.ci.config.Builder("Validated Build"))
+
+    for phase in phase_config.phases:
+        # Add the phase object.
+        phase_builder = "phase%d - %s" % (phase['number'], phase['name'])
+        phases.append(llvmlab.ci.config.Phase(
+                phase['title'], phase['number'], phase_builder,
+                [b['name'] for b in phase['builders']],
+                phase['description']))
+
+        # Add the builder objects.
+        builders.append(llvmlab.ci.config.Builder(phase_builder))
+        for b in phase['builders']:
+            builders.append(llvmlab.ci.config.Builder(b['name']))
+
+    return llvmlab.ci.config.Config(phases, builders, published_builds,
+                                    "Validated Build")
+
+def register(app):
+    # Construct the LLVM Lab dashboard configuration object directly from the
+    # buildbot phase_config module.
+    config = construct_config()
+    app.config.summary = llvmlab.ci.summary.Summary(
+        config, app.config.status)
+
+    print >>sys.stderr, "note: loaded lab.llvm.org extensions"





More information about the llvm-commits mailing list