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*?

2. If you do 'make clean', then 'svn update', then re-run the test, do you still get the error?

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' );
    ...
}

In my never-ending quest for complete code coverage, I had to devise a way to test both branches in that return statement, i.e., test under circumstances in which 'DEVELOPING' both does and -- here's the tricky part -- does not exist. The only way I could do the latter was to copy the relevant files into a temporary directory and, for certain tests, not copy 'DEVELOPING' along with them. It's very hackish, but it did enable me to get to full coverage of that statement.

The fact that this test is in 't/postconfigure/' means that it is meant to be run only *after* Configure.pl has executed (whether that be immediately pre-make or as part of 'make test'. A SKIP block should come into play if you run this test *before* Configure.pl.

Let me know what further results you get.  Thank you very much.
kid51

Reply via email to