Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

PAUSE problem

by hsmyers (Canon)
on May 03, 2011 at 02:39 UTC ( #902614=perlquestion: print w/ replies, xml ) Need Help??
hsmyers has asked for the wisdom of the Perl Monks concerning the following question:

This is more or less a shot in the dark, but the Monastery has always been my 'goto place' (bad pun, bad, bad!) What I have is the following; if I run dmake test I get:
C:\>perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', ' +blib/arch')" t/*.t t/01_epdcode.t ...... ok t/02_Storable.t ..... ok t/03_epdlist.t ...... ok t/04_epdstr.t ....... ok t/05_list-str.t ..... ok t/06_epdgetboard.t .. ok t/07_psquares.t ..... ok t/08_epdset.t ....... ok All tests successful. Files=8, Tests=33, 2 wallclock secs ( 0.09 usr + 0.03 sys = 0.13 CP +U) Result: PASS
While the tester for PAUSE gets:
Output from '/usr/bin/make test': PERL_DL_NONLAZY=1 /home/sts/cpansmoke/perl-5.12.3/bin/perl "-MExtUtils +::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t # No tests run! t/01_epdcode.t ...... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 7/7 subtests t/02_Storable.t ..... ok t/03_epdlist.t ...... No subtests run t/04_epdstr.t ....... No subtests run t/05_list-str.t ..... No subtests run t/06_epdgetboard.t .. No subtests run t/07_psquares.t ..... No subtests run t/08_epdset.t ....... No subtests run Test Summary Report ------------------- t/01_epdcode.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 7 tests but ran 0. t/03_epdlist.t (Wstat: 0 Tests: 0 Failed: 0) Parse errors: No plan found in TAP output t/04_epdstr.t (Wstat: 0 Tests: 0 Failed: 0) Parse errors: No plan found in TAP output t/05_list-str.t (Wstat: 0 Tests: 0 Failed: 0) Parse errors: No plan found in TAP output t/06_epdgetboard.t (Wstat: 0 Tests: 0 Failed: 0) Parse errors: No plan found in TAP output t/07_psquares.t (Wstat: 0 Tests: 0 Failed: 0) Parse errors: No plan found in TAP output t/08_epdset.t (Wstat: 0 Tests: 0 Failed: 0) Parse errors: No plan found in TAP output Files=8, Tests=3, 3 wallclock secs ( 0.12 usr 0.04 sys + 2.32 cusr + 0.21 csys = 2.69 CPU) Result: FAIL Failed 7/8 test programs. 0/3 subtests failed. *** Error code 255 Stop in /home/sts/cpansmoke/perl-5.12.3/cpan/build/Chess-PGN-EPD-0.25- +YJnWEi (line 781 of Makefile).
His report on machine and environment shows nothing that I can see that should make a difference. That said, he is testing under MirOS BSD while I'm running Windows Vista, likewise he is testing using perl 5.12.3 while I am using perl 5.10.1. I don't mind that I'm getting fails, I do mind that I've no useful information to go on. Just staring at the ashes, all I can see is that something is preventing all of the subtests from running excepting t/02_Storable.t. I look at the
t/01_epdcode.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 7 tests but ran 0.
Here is the offending code:
#!/usr/bin/perl # 01_epdcode.t -- test epdcode. use Test::More tests => 7; use Chess::PGN::EPD qw( epdlist epdcode ); ok(1); # 1. If we made it this far, we're ok. my @epd1; my @epd2; my @moves1 = qw( e4 e6 f4 d5 e5 c5 Nf3 Nc6 d3 Be7 Be2 Nh6 c3 O-O O-O f6 exf6 Bxf6 d4 cxd4 cxd4 Qb6 Nc3 Bxd4+ Kh1 Bxc3 bxc3 Ng4 Nd4 Nxd4 cxd4 Nf6 Ba3 Rf7 Rb1 Qd8 Bd3 Bd7 Qf3 Bc6 f5 Ne4 Bxe4 dxe4 Qd1 exf5 Rb2 Qd5 Rbf2 e3 Re2 Bb5 ); my @moves2 = qw( d4 Nf6 c4 e6 Nc3 Bb4 e3 b6 Ne2 Bb7 a3 Be7 f3 d5 cxd5 exd5 Ng3 O-O Bd3 +c5 O-O Re8 Nf5 Bf8 g4 g6 Ng3 Nc6 g5 cxd4 exd4 Nd7 Nge2 Bg7 Nb5 Nf8 f4 a6 +f5 axb5 f6 Bh8 Bxb5 Ba6 Bxa6 Rxa6 Bf4 Qd7 Rc1 Raa8 Rc3 Re4 Ng3 Rxd4 Qc2 N +a5 Be3 Rg4 Qd1 Nc4 Bc1 b5 Rd3 d4 Re1 h5 b3 Nb6 Re7 Qd6 Re4 Rxe4 Nxe4 Qc6 +Nd2 Ne6 Nf3 Rd8 Be3 Qe4 ); @epd1 = reverse epdlist( @moves1 ); @epd2 = reverse epdlist( @moves2 ); is(ECO(\@epd1),'C00','ECO lookup #1'); # 2. is(NIC(\@epd1),'FR 1','NIC lookup #1'); # 3. is(Opening(\@epd1),'French: Labourdonnais variation','Opening lookup # +1'); # 4. is(ECO(\@epd2),'E44','ECO lookup #2'); # 5. is(NIC(\@epd2),'NI 13','NIC lookup #2'); # 6. is(Opening(\@epd2),'Nimzo-Indian: Fischer variation, 5.Ne2'); # 7. sub ECO { my $movesref = shift; return epdcode('ECO',$movesref); } sub NIC { my $movesref = shift; return epdcode('NIC',$movesref); } sub Opening { my $movesref = shift; return epdcode('Opening',$movesref); }
I am (as usual) probably missing something obvious here, but whatever it is, I can't see it. So would someone with out the mote in the eye problem, tell me what I'm missing? I'd particularly like to know since I need to extend the testing to cover code I've added since I made the change to .25!

--hsm

"Never try to teach a pig to sing...it wastes your time and it annoys the pig."

Comment on PAUSE problem
Select or Download Code
Re: PAUSE problem
by Anonymous Monk on May 03, 2011 at 03:39 UTC
    I see that kind of problem sometimes, it's due to prereqs failing the compile-time check or something like that.

    What you could do is ask the tester to provide you the prove -v output. That way, it should contain any errors/warnings/etc that was masked by the TAP system.

    You can use the Find-A-Tester website to send the tester an email.

    Thanks for your work on the CPAN module ( I assume it is Chess::PGN::EPD? ) and hope you can resolve this!
      I've got a great deal of output from the tester including his -v output but that is from perl -v and given what you've said I assume you mean something else? I noticed the Find-A-Tester link and planned on that as my next step but was holding out for suggestions on intelligent questions to ask. Last time I had a problem like this was before the testers had their act together (the one who failed me didn't have the necessary modules installed but insisted it was my fault :) ) And yes, this is the current version of Chess::PGN::EPD actually not quite current version (mine is always better he he!)

      --hsm

      "Never try to teach a pig to sing...it wastes your time and it annoys the pig."
        What you want is the verbose test output - ie, what he gets from doing this manually:
        perl Makefile.PL make perl -Mblib t/01_epdcode.t
Re: PAUSE problem
by snoopy (Deacon) on May 03, 2011 at 05:56 UTC
    Hi there,

    Looks to me as if someone's already done the leg-work of diagnosing the problem, and submitting an RT ticket that includes a patch for Chess::PGN::EPD 0.25. See rt://67745

    I was getting the above errors on Debian 6.0. It worked for me after applying the patch.

      Thanks for spotting this! It is enough to push me over into finally building a Linux test box; something I haven't had since the 1.4 kernel!

      I'll apply the patch and see if it works as is in Windows or if I'll need to check to see which OS I'm in. Hope it works, as an OS-around would be at best a kind of ugly hack.

      --hsm

      "Never try to teach a pig to sing...it wastes your time and it annoys the pig."
Re: PAUSE problem
by Anonymous Monk on May 03, 2011 at 09:50 UTC
      Since I didn't know that the problem was not with PAUSE until the node mentioning the patch, I'm not sure that the title wasn't accurate at that point in time. Vague perhaps, but still accurate. A quibble and your point is taken. More importantly I had not known about the modules you mention and find that very useful--- thanks! Don't understand the last line though; what did you have in mind?

      --hsm

      "Never try to teach a pig to sing...it wastes your time and it annoys the pig."
        Don't understand the last line though; what did you have in mind?

        Nothing important, just hoops. Instead of

        my $mod = __PACKAGE__; $mod =~ s{::}{/}g; $mod .= '.pm'; $mod = $INC{$mod}; $mod =~ s/EPD\.pm//i; my $module_dir_qfn = realpath($mod); my $db_dir_qfn = catdir($module_dir_qfn, 'db');
        You might have used
        realpath( catfile( __FILE__, updir(), 'db' ) );
        Since I didn't know that the problem was not with PAUSE until the node mentioning the patch, I'm not sure that the title wasn't accurate at that point in time. Vague perhaps, but still accurate. A quibble and your point is taken.

        I probably should have phrased that better, thanks :)

        With the information contained in your question, and the guidance of How do I compose an effective node title?, effective titles might be:

        • FAIL Chess-PGN-EPD-0.25 v5.12.3 MirOS BSD
        • tester fail cpansmoke/perl-5.12.3/cpan/build/Chess-PGN-EPD-0.25
        • Chess-PGN-EPD-0.25/t/01_epdcode.t Non-zero exit status
        • Chess-PGN-EPD-0.25/t/01_epdcode.t Parse errors: Bad plan
        • Chess-PGN-EPD-0.25 Failed 7/8 test programs
        • problem testing Chess-PGN-EPD-0.25
        • Chess-PGN-EPD-0.25 subtest not run on MirOS BSD
        "PAUSE problem" makes me think there is a bug PAUSE
Re: PAUSE problem
by Khen1950fx (Canon) on May 03, 2011 at 10:47 UTC
    I tried Chess::PGN::EPD on 5.8.8 and 5.10.1---both failed. First, in your EPD.pm, you used use feature ':5.10'. I don't think that that is what you wanted. Second, double-check your variables. I had a gazillion syntax errors:).
      Second, double-check your variables. I had a gazillion syntax errors:)

      There are no syntax errors in Chess::PGN::EPD

      I need to check to see if the :5.10 is actually necessary for the code as it stands now. Don't particularly like breaking things, but since I've moved on, my code may well have moved on with me. As for 'a gazillion syntax errors' could you provide a screen capture so I can see what you are talking about?

      Update: Nice to know there are no syntax errors :) It's always possible that something crept in, but this is version 26 so I'd be a little surprised. Now on the 5.10 front, the total difference was in the use of given/when in a single sub routine! That being the case it was easy enough to revert to pre-5.10 code. It will need a bit more testing, but I think I can safely say that Chess::PGN::EPD-0.27 should run fine under 5.8 etc.

      --hsm

      "Never try to teach a pig to sing...it wastes your time and it annoys the pig."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://902614]
Approved by ww
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2014-07-28 12:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (196 votes), past polls