[Buildbot-devel] test_slavecommand vs Win32

Brian Warner warner-buildbot at lothar.com
Thu Apr 21 19:36:01 UTC 2005


Ok, it looks like test_slavecommand is setting usePTY=True and then assuming
that both stdout+stderr will be merged into the stdout stream. That's what
PTYs do, but if you aren't using a PTY then it gets more interesting.

Under posix, not using a PTY means you get separate streams.
test_slavecommand doesn't cover that, so if you're under posix and you change
FakeSlaveBuilder at like 29 to usePTY=False, the tests fail, since now you're
only getting half the output.

Under windows, SlaveShellCommand turns off usePTY:

        self.usePTY = self.builder.usePTY
        if runtime.platformType != "posix":
            self.usePTY = False # PTYs are posix-only

(it might also be turned off regardless of platform if we want to write data
into the command, say, to run 'patch').

What happens in that case? Nick, from your report, it sounds like you're
getting separate stdout and stderr streams. Does that seem right? If so, I'll
change the test to have a switch that says whether to expect separate streams
or a merged one, and I'll have the switch be set according to platform. I'll
also extend it to test both with-PTY and without-PTY on posix.

FYI, I'm aiming for a release in the next few days, 'cause it's been way too
long since the last one. I'd like to clean up these test failures first,
though.

cheers,
 -Brian




More information about the devel mailing list