Changeset 710

Show
Ignore:
Timestamp:
09/06/08 18:20:09 (3 months ago)
Author:
warner@lothar.com
Message:

test_slavecommand.py: undo breakage triggered by the elapsedTime patch.
Make test more flexible, by not assuming the rc will be in the last update.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • buildbot/test/test_slavecommand.py

    r352 r710  
    103103 
    104104    def getrc(self): 
    105         self.failUnless(self.builder.updates[-1].has_key('rc')) 
    106         got = self.builder.updates[-1]['rc'] 
    107         return got 
     105        # updates[-2] is the rc, unless the step was interrupted 
     106        # updates[-1] is the elapsed-time header 
     107        u = self.builder.updates[-1] 
     108        if "rc" not in u: 
     109            self.failUnless(len(self.builder.updates) >= 2) 
     110            u = self.builder.updates[-2] 
     111            self.failUnless("rc" in u) 
     112        return u['rc'] 
    108113    def checkrc(self, expected): 
    109114        got = self.getrc()