On Tue, 8 May 2007, James Keenan wrote: > Andy Dougherty wrote: > > The following oddity turned up today: > > > > t/postconfigure/02-revision_no_DEVELOPING........ > > # Failed test (t/postconfigure/02-revision_no_DEVELOPING.t at line 51) > > # '0' > > # ne > > # '0' > > # Looks like you failed 1 test of 16. > > dubious > > Test returned status 1 (wstat 256, 0x100) > > > > I really don't understand this message. > > > > 1. Can you say a bit more about the context in which you ran this test? > 'make test'? 'prove t/postconfigure/*.t'? In particular, did you run it > *before* running Configure.pl or *afterwards*?
I get that with either 'make test' or with perl -Ilib t/postconfigure/02-revision_no_DEVELOPING.t > 2. If you do 'make clean', then 'svn update', then re-run the test, do you > still get the error? Make clean doesn't affect it at all. I am not running from an svn repository, which may be part of the problem. I'm running from a snapshot. (Actually, that's not quite right either. I run the test from a directory built from the MANIFEST in a snapshot.) There are also a pile of errors about svn and svk not being found, but they don't result in failed tests. I have svn installed; it's just not in my $PATH. (And it doesn't work well anyway, which is why I don't use it.) You should be able to reproduce the error by running from a snapshot. One truly odd thing is the way the test output reads. (Though this is perhaps more of a Test::Whatever rant than a testing bug.) Here's the full output of the test: not ok 14 - current and config differ # Failed test (t/postconfigure/02-revision_no_DEVELOPING.t at line 51) # '0' # ne # '0' If you've written the test yourself, you might remember what that means. But, if you read only the output you see on the screen, you see a 'no ok' message, followed by a statement that 'current and config differ'. A naive reading of this line in the output is that 'current' and 'config' differ, and this is not ok. It is further followed by the curious statement that '0' ne '0', when, of course, '0' eq '0'. I would recommend replacing the 'current and config differ' statement by a statement of what *should* happen (e.g. 'current and config should differ', or perhaps "current and config shouldn't equal" to better match with the actual test performed. > 3. This test was tricky, and, in the course of developing it, I got this same > error several times. The trickiness arises from the fact that the underlying > code being tested, lib/Parrot/Revision.pm, has the name of a file in the > Parrot distribution hard-coded into its major subroutine: > > sub __get_revision { > return 0 unless ( -e 'DEVELOPING' ); > ... > } Perhaps that function should be changed. In perl5, all the snapshots have a .patch file which can be used to get the revision number. Perhaps the scheme that generates the snapshots for parrot could be revised to include a .revision file (or other such file) with the revision number. It already includes a .timestamp file, so this isn't a radical suggestion. Then you wouldn't have two code branches to worry about and there wouldn't be yet-another-difference between the developer and released versions. Or perhaps I'm the only one who ever uses a snapshot and so you can safely ignore them. I don't know. More generally, though, my larger point is this: your work on Configure.pl plays an important role in not only ensuring it will continue to work, but it also offers you unique opportunities to re-think how and why things are done. -- Andy Dougherty [EMAIL PROTECTED]