[llvm-commits] [zorg] r152719 - /zorg/trunk/zorg/buildbot/builders/LNTBuilder.py

Tobias Grosser grosser at fim.uni-passau.de
Wed Mar 14 08:09:04 PDT 2012


Author: grosser
Date: Wed Mar 14 10:09:04 2012
New Revision: 152719

URL: http://llvm.org/viewvc/llvm-project?rev=152719&view=rev
Log:
LNTBuilder: Allow to set the package_cache

This also slightly reworks the parameter handling to avoid the need
to define default values twice.

Modified:
    zorg/trunk/zorg/buildbot/builders/LNTBuilder.py

Modified: zorg/trunk/zorg/buildbot/builders/LNTBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/LNTBuilder.py?rev=152719&r1=152718&r2=152719&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/LNTBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/LNTBuilder.py Wed Mar 14 10:09:04 2012
@@ -11,12 +11,14 @@
 import zorg
 from zorg.buildbot.builders import ClangBuilder
 
-# The URL of our local package cache.
-g_package_url = "http://lab.llvm.org/packages"
-
 def getLNTFactory(triple, nt_flags, xfails=[], clean=True, test=False,
                   **kwargs):
-    submitURL = kwargs.pop("submitURL", "http://llvm.org/perf/submitRun")
+    lnt_args = {}
+    lnt_arg_names = ['submitURL', 'package_cache']
+
+    for argname in lnt_arg_names:
+        if argname in kwargs:
+            lnt_args[argname] = kwargs.pop(argname)
 
     # Build compiler to test.  
     f = ClangBuilder.getClangBuildFactory(
@@ -27,13 +29,11 @@
     AddLNTTestsToFactory(f, nt_flags,
                          cc_path="llvm.install.1/bin/clang",
                          cxx_path="llvm.install.1/bin/clang++",
-                         submitURL = submitURL)
+                         **lnt_args);
 
     return f
 
-def AddLNTTestsToFactory(f, nt_flags, cc_path, cxx_path,
-                         parallel = False, jobs = '%(jobs)s',
-                         submitURL = "http://llvm.org/perf/submitRun"):
+def AddLNTTestsToFactory(f, nt_flags, cc_path, cxx_path, **kwargs):
     """
     Add the buildbot steps necessary to run an LNT driven test of a compiler.
 
@@ -42,6 +42,11 @@
     directory.
     """
 
+    parallel = kwargs.pop('parallel', False)
+    jobs = kwargs.pop('jobs', '$(jobs)s')
+    submitURL = kwargs.pop('submitURL', 'http://llvm.org/perf/submitRun')
+    package_cache = kwargs.pop('package_cache', 'http://lab.llvm.org/packages')
+
     # Create variables to refer to the compiler-under-test.
     #
     # We assume any relative paths are relative to the build directory (which
@@ -84,7 +89,7 @@
             name='venv.lnt.install', haltOnFailure=True,
             command=[WithProperties('%(builddir)s/lnt.venv/bin/pip'), 'install',
                      '--no-index',
-                     '--find-links', g_package_url,
+                     '--find-links', package_cache,
                      '-e', '.'],
             description=['install', 'LNT'], workdir='zorg/lnt',
             env={'ARCHFLAGS' : '-arch i386 -arch x86_64'}))





More information about the llvm-commits mailing list