[Buildbot-devel] CVS change source

Andy Howell AndyHowell at austin.rr.com
Thu Jul 8 02:49:48 UTC 2010


On 07/07/2010 11:55 AM, Dustin J. Mitchell wrote:

>> It still needs more testing before, but seems to work in my limited trials.
> 
> Tests - and documentation - would be great.
> 
>> My hope is that the script and my changes to changes/mail.py can eventually be added to
>> the distribution, making it easier to setup buildbot with CVS.
> 
> Absolutely!
> 
> When you're writing the tests, try to write them in such a way that
> they do not require CVS or any other non-default equipment to run, but
> still exercise most of the new code.
> 

I need a some advice on constructing the tests. On the CVS side of things, my
buildbot-cvs-mail script is executed by CVS. Its passed some command line args, forks,
reads from stdin, and sends a mail via a smtplib.SMTP() connection.
Making a full test that goes through the mail server is a bit problematic. I could make
simple mock for the 3 smtplib methods that are used and send the results to stdout when
testing. I've got driver script sends fake CVS output, though it does not read the mail
generated.

The buildbot side is more difficult for me. I created a new subsclass of MailDirSource
called BuiltbotCVSMaildirSource. It just implements the parse method.

At the top of mail.py, I see:

# -*- test-case-name: buildbot.test.test_mailparse -*-

but don't see a test_mailparse anywhere. Is that just a placeholder?

Thanks,

	Andy




More information about the devel mailing list