[zorg] r305622 - Added ability to customize check step.

Galina Kistanova via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 16 18:18:12 PDT 2017


Author: gkistanova
Date: Fri Jun 16 20:18:12 2017
New Revision: 305622

URL: http://llvm.org/viewvc/llvm-project?rev=305622&view=rev
Log:
Added ability to customize check step.

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

Modified: zorg/trunk/zorg/buildbot/builders/UnifiedTreeBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/UnifiedTreeBuilder.py?rev=305622&r1=305621&r2=305622&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/UnifiedTreeBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/UnifiedTreeBuilder.py Fri Jun 16 20:18:12 2017
@@ -129,6 +129,7 @@ def addCmakeSteps(
 def addNinjaSteps(
            f,
            obj_dir = None,
+           checks = None,
            install_dir = None,
            env = None,
            stage_name = None,
@@ -151,14 +152,15 @@ def addNinjaSteps(
                            **kwargs # Pass through all the extra arguments.
                            ))
 
-    # Test just built components
-    f.addStep(NinjaCommand(name="test-%scheck-all" % step_name,
-                           targets=["check-all"],
-                           description=["Test", "just", "built", "components"],
-                           env=env,
-                           workdir=obj_dir,
-                           **kwargs # Pass through all the extra arguments.
-                           ))
+    # Test just built components if requested.
+    if checks:
+      f.addStep(NinjaCommand(name="test-%scheck-all" % step_name,
+                             targets=checks,
+                             description=["Test", "just", "built", "components"],
+                             env=env,
+                             workdir=obj_dir,
+                             **kwargs # Pass through all the extra arguments.
+                             ))
 
     # Install just built components
     if install_dir:
@@ -215,6 +217,7 @@ def getCmakeWithNinjaBuildFactory(
            depends_on_projects = None,
            llvm_srcdir = None,
            obj_dir = None,
+           checks = None,
            install_dir = None,
            clean = False,
            extra_configure_args = None,
@@ -227,6 +230,9 @@ def getCmakeWithNinjaBuildFactory(
     else:
         cmake_args = list()
 
+    if checks is None:
+        checks = ['check-all']
+
     # Some options are required for this build no matter what.
     CmakeCommand.applyRequiredOptions(cmake_args, [
         ('-G',                      'Ninja'),
@@ -245,6 +251,7 @@ def getCmakeWithNinjaBuildFactory(
     addNinjaSteps(
            f,
            obj_dir=obj_dir,
+           checks=checks,
            install_dir=f.install_dir,
            env=env,
            **kwargs)
@@ -255,6 +262,7 @@ def getCmakeWithNinjaWithMSVCBuildFactor
            depends_on_projects = None,
            llvm_srcdir = None,
            obj_dir = None,
+           checks = None,
            install_dir = None,
            clean = False,
            extra_configure_args = None,
@@ -273,6 +281,9 @@ def getCmakeWithNinjaWithMSVCBuildFactor
     else:
         cmake_args = list()
 
+    if checks is None:
+        checks = ['check-all']
+
     # Set up VS environment, if appropriate.
     if not vs:
         # We build by Visual Studio 2015, unless otherwise is requested.
@@ -310,6 +321,7 @@ def getCmakeWithNinjaWithMSVCBuildFactor
     addNinjaSteps(
            f,
            obj_dir=obj_dir,
+           checks=checks,
            install_dir=f.install_dir,
            env=env,
            **kwargs)
@@ -320,6 +332,7 @@ def getCmakeWithNinjaMultistageBuildFact
            depends_on_projects = None,
            llvm_srcdir = None,
            obj_dir = None,
+           checks = None,
            install_dir = None,
            clean = False,
            extra_configure_args = None,
@@ -355,6 +368,9 @@ def getCmakeWithNinjaMultistageBuildFact
     if install_dir is None:
         install_dir = "install"
 
+    if checks is None:
+        checks = ['check-all']
+
     stage_objdirs = list()
     stage_installdirs = list()
     for s in stage_names:
@@ -410,6 +426,7 @@ def getCmakeWithNinjaMultistageBuildFact
     addNinjaSteps(
            f,
            obj_dir=stage_objdirs[0],
+           checks=checks,
            install_dir=stage_installdirs[0],
            env=env,
            stage_name=stage_names[0],
@@ -463,6 +480,7 @@ def getCmakeWithNinjaMultistageBuildFact
         addNinjaSteps(
            f,
            obj_dir=stage_objdirs[stage_idx],
+           checks=checks,
            install_dir=stage_installdirs[stage_idx],
            env=env,
            stage_name=stage_names[stage_idx],




More information about the llvm-commits mailing list