[Buildbot-commits] [Buildbot] #2505: Build Step Locked Even Though It's To Be Skipped

Buildbot trac trac at buildbot.net
Mon Jun 3 22:05:19 UTC 2013


#2505: Build Step Locked Even Though It's To Be Skipped
---------------------------+------------------------------------
Reporter:  Jeremy.Cornett  |      Owner:
    Type:  undecided       |     Status:  new
Priority:  minor           |  Milestone:  undecided
 Version:  0.8.7p1         |   Keywords:  locks, steps, dostepif
---------------------------+------------------------------------
 I have a build step that I've parametrized such that it may or may not be
 skipped. I've also applied an exclusive lock on this build step because
 the step is used in multiple builders and utilizes a resource that can't
 be shared. I noticed that even though the step should be skipped, it waits
 until the step can execute due to the lock, and then skips. It seems to be
 a waste of time waiting for the lock when the step was to be skipped to
 begin with. It would be beneficial if the dostepif could be evaluated
 before the lock is.

 ----

 lockPlatformTests = locks.MasterLock("PlatformTests")

 def RunPlatformTests(Set):
     def IsDoStepTest(self):
         description = self.description[0]
         scheduler = self.getProperty('scheduler')
         if description.endswith("\"Full\""):
             if string.find(scheduler, 'nightly', 0) != -1:
                 return True
         if description.endswith("\"Smoke\""):
             if string.find(scheduler, 'auto', 0) != -1 or
 string.find(scheduler, 'force', 0) != -1 or string.find(scheduler,
 'trigger', 0) != -1:
                 return True
         return False

     if Set == "Smoke":
         stepTimeout = 3600
     else:
         stepTimeout = 7200

     return shell.MSTest(
         command=[JoinPath(("BuildSystem", "RunPlatformTests.cmd"), "Win"),
 "pickone"],
         name="Test Platform \""+Set+"\"",
         description="Testing Platform \""+Set+"\"",
         descriptionDone="Test Platform \""+Set+"\"",
         flunkOnWarnings=True,
         timeout=stepTimeout,
         doStepIf=IsDoStepTest,
         locks=[lockPlatformTests.access('exclusive')])

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2505>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list