[Buildbot-devel] Test failures with 0.7.4

Brad Hards bradh at frogmouth.net
Sun Oct 1 10:20:30 UTC 2006


On Sunday 01 October 2006 18:08, Brian Warner wrote:
> The test_slavecommand, test_maildir, and test_mailparse failures are the
> result of that setup.py bug which didn't install the auxilliary datafiles
> (like buildbot/test/mail/*) into /usr/local/lib (or whatever you set
> --prefix to) when it installed everything else. If you run the test from
> your source directory where you unpacked the tarball, those tests ought to
My apologies - perhaps I shouldn't have deleted all those old buildbot mails 
without reading them...

> pass. This setup.py bug is fixed in CVS, and I've attached the patch which
> fixed it below if you'd like to try it against 0.7.4 .
One chunk got rejected, but I applied it by hand - now good.

> That leaves the test_scheduler failure:
>
>   File
> "/usr/local/lib/python2.4/site-packages/buildbot/test/test_scheduler.py",
> line 58, in testNightly self.failUnlessEqual(int(t-now), 2*HOUR+54*MIN+24)
> twisted.trial.unittest.FailTest: 6864 != 10464
This is still happening - as expected, the patch didn't change it.

> I suspect this is a timezone issue, since the difference between those two
> values is 3600 seconds (one hour). There have been some other reports of
> this kind of test failure, mostly from places that have just switched to
> daylight savings. I seem to remember that the most immediately obvious fix
> (which involved fiddling with the last part of the tuple you pass to
> time.mktime, the bit that controls whether we're in DST or not) gave me
> failures on certain systems or versions of python. I couldn't find a value
> that would work in both environments.
>
> What timezone+DST are you in? What happens if you change
I am in UTC+10. Daylight saving has not yet taken effect (about 1 month to 
go).
$ date +%z
+1000

> test_scheduler.py:55 to read:
>         now = time.mktime((2005, 11, 15, 0, 5, 36, 1, 319, 1))
    testNightly ...                                                       [OK]
> or:
>         now = time.mktime((2005, 11, 15, 0, 5, 36, 1, 319, -1))
    testNightly ...                                                       [OK]

-1 might be the right thing to do here, or perhaps switch to using datetime:
http://www.python.org/pycon/2005/papers/60/timeofday.pdf

In any case, the problem appears to be in the tests, not in the code, so I'm 
happy.

Thanks again.

Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20061001/dfe8f4ab/attachment.bin>


More information about the devel mailing list