[zorg] r244704 - [zorg] Add steps to acquire and release lock at the start and end of lldb android build

Ying Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 17:26:41 PDT 2015


Author: chying
Date: Tue Aug 11 19:26:41 2015
New Revision: 244704

URL: http://llvm.org/viewvc/llvm-project?rev=244704&view=rev
Log:
[zorg] Add steps to acquire and release lock at the start and end of lldb android build

- Allow multiple slaves to run on same machine, but only one build could be stared at a time

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

Modified: zorg/trunk/zorg/buildbot/builders/LLDBBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/LLDBBuilder.py?rev=244704&r1=244703&r2=244704&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/LLDBBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/LLDBBuilder.py Tue Aug 11 19:26:41 2015
@@ -863,6 +863,7 @@ def getShellCommandStep(f,
                         description="",
                         flunkOnFailure=True,
                         haltOnFailure=True,
+                        alwaysRun=False,
                         workdir='scripts',
                         env=None):
     if env is None:
@@ -873,6 +874,7 @@ def getShellCommandStep(f,
                            env=env,
                            flunkOnFailure=flunkOnFailure,
                            haltOnFailure=haltOnFailure,
+                           alwaysRun=alwaysRun,
                            workdir=workdir))
 
 # get configuration of tests
@@ -920,6 +922,13 @@ def getLLDBScriptCommandsFactory(
                        ):
     f = buildbot.process.factory.BuildFactory()
 
+    # Acquire lock
+    if downloadBinary:
+        getShellCommandStep(f, name='acquire lock',
+                            command=['acquireLock' + scriptExt,
+                                     WithProperties('%(scheduler:-none)s')],
+                            description='get')
+
     # Checkout source code
     getShellCommandStep(f, name='checkout source code',
                         command=['checkoutSource' + scriptExt,
@@ -965,4 +974,11 @@ def getLLDBScriptCommandsFactory(
         f.addStep(trigger.Trigger(schedulerNames=['lldb_android_scheduler'],
                                   updateSourceStamp=False,
                                   waitForFinish=False))
+    # Release lock
+    if downloadBinary:
+        getShellCommandStep(f, name='release lock',
+                            command=['releaseLock' + scriptExt,
+                                     WithProperties('%(scheduler:-none)s')],
+                            description='release',
+                            alwaysRun=True)
     return f




More information about the llvm-commits mailing list