bbangert / buildbot-xmlrpc


Buildbot fork with additional XMLRPC methods and bugfixes.
Clone URL : http://bitbucket.org/bbangert/buildbot-xmlrpc/ (size: 1.9 MB)
commit 716: 7c17ccf26d9b
parent 715: 1d84062e7f81
branch: default
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.
warner@lothar.com
4 months ago

Changed (Δ212 bytes):

raw changeset »

buildbot/test/test_slavecommand.py (8 lines added, 3 lines removed)

Up to file-list buildbot/test/test_slavecommand.py:

@@ -102,9 +102,14 @@ class ShellBase(SignalMixin):
102
102
            self.assertEquals(got, contents)
103
103
104
104
    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']
108
113
    def checkrc(self, expected):
109
114
        got = self.getrc()
110
115
        self.assertEquals(got, expected)