Thread

Posted on Sat Feb 4 02:10:09 2006 by btp
Problems building Test-Class on NetBSD
Hey, I've got an account on a NetBSD Alpha box, and I'm running into problems when I try to install Test-Class. I use this command:
perl -MCPAN -eshell install Test::Class
and, here's my failure:
cp lib/Test/Class.pod blib/lib/Test/Class.pod Manifying blib/man3/Test::Class.3 /usr/pkg/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /usr/pkg/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'bl +ib/arch')" t/* .t t/_new.................ok t/bailout..............ok t/builder..............ok t/compile..............ok t/current_method.......ok t/die_before_plan......NOK 3# Test 3 got: "# Failed test 'setup (for test method 'test') died (di +ed before plan set)'" (t/die_before_plan.t at line 42 fail #3) # Expected: "# Failed test (t/die_before_plan.t at line 32)" # t/die_before_plan.t line 42 is: ok($actual, $expected); t/die_before_plan......NOK 4# Test 4 got: "# in t/die_before_plan.t at line 32." (t/die_before_pl +an.t at line 4 2 fail #4) # Expected: "ok 2 - test just here to get setup method run" Use of uninitialized value in scalar chomp at t/die_before_plan.t line 40, <DATA> line 4. Use of uninitialized value in substitution (s///) at t/die_before_plan.t line 41, <DATA> line 4. t/die_before_plan......NOK 5# Test 5 got: "ok 2 - test just here to get setup method run" (t/die_be +fore_plan.t at line 42 fail #5) # Expected: <UNDEF> t/die_before_plan......FAILED tests 3-5 Failed 3/4 tests, 25.00% okay t/documented...........skipped all skipped: Test::Pod::Coverage required t/expected_tests.......ok t/fail1................ok t/fail2................NOK 3# Test 3 got: "# Failed test 'The object isa Object'" (t/fail2.t at l +ine 47 fail #3 ) # Expected: "# Failed test (t/fail2.t at line 22)" # t/fail2.t line 47 is: ok($actual, $expected); t/fail2................NOK 4# Test 4 got: "# in t/fail2.t at line 22." (t/fail2.t at line 47 fail + #4) # Expected: "# The object isn't defined" t/fail2................NOK 5# Test 5 got: "# The object isn't defined" (t/fail2.t at line 47 fa +il #5) # Expected: "not ok 2 - cannot create Objects" t/fail2................NOK 6# Test 6 got: "not ok 2 - cannot create Objects" (t/fail2.t at line 47 +fail #6) # Expected: "# Failed test (t/fail2.t at line 22)" t/fail2................NOK 7# Test 7 got: "# Failed test 'cannot create Objects'" (t/fail2.t at l +ine 47 fail #7 ) # Expected: "not ok 3 - cannot create Objects" t/fail2................NOK 8# Test 8 got: "# in t/fail2.t at line 22." (t/fail2.t at line 47 fail + #8) # Expected: "# Failed test (t/fail2.t at line 22)" Use of uninitialized value in scalar chomp at t/fail2.t line 45, <DATA> line 8. Use of uninitialized value in substitution (s///) at t/fail2.t line 46, <DATA> line 8. t/fail2................NOK 9# Test 9 got: "not ok 3 - cannot create Objects" (t/fail2.t at line 47 +fail #9) # Expected: <UNDEF> Use of uninitialized value in scalar chomp at t/fail2.t line 45, <DATA> line 8. Use of uninitialized value in substitution (s///) at t/fail2.t line 46, <DATA> line 8. t/fail2................NOK 10# Test 10 got: "# Failed test 'cannot create Objects'" (t/fail2.t at + line 47 fail #10) # Expected: <UNDEF> Use of uninitialized value in scalar chomp at t/fail2.t line 45, <DATA> line 8. Use of uninitialized value in substitution (s///) at t/fail2.t line 46, <DATA> line 8. t/fail2................NOK 11# Test 11 got: "# in t/fail2.t at line 22." (t/fail2.t at line 47 fa +il #11) # Expected: <UNDEF> t/fail2................FAILED tests 3-12 Failed 10/9 tests, -11.11% okay
Any ideas?
Direct Responses: 1767 | 3187 | Write a response
Posted on Tue Feb 7 19:49:46 2006 by adrianh in response to 1755
Re: Problems building Test-Class on NetBSD

Could you run

make test TEST_VERBOSE=1

and see what it says?

Ta, Adrian
Direct Responses: 1768 | Write a response
Posted on Tue Feb 7 20:22:36 2006 by btp in response to 1767
Re: Problems building Test-Class on NetBSD
Sure, here's what I get with TEST_VERBOSE=1
PERL_DL_NONLAZY=1 /usr/pkg/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(1, 'blib/lib', 'bl +ib/arch')" t/*.t t/_new.................1..6 ok 1 - use Test::Class; ok 2 - The object isa Test::Class ok 3 - key/value set ok 4 - The object isa Test::Class ok 5 - prototype key/value set ok 6 - new key/value set ok t/bailout..............1..2 ok 1 - bailout works ok 2 - exit value okay ok t/builder..............1..1 ok 1 - builder ok t/compile..............1..2 ok 1 - cannot test anon sub ok 2 - bad number detected ok t/current_method.......1..4 # # Local::Test->test ok 1 - current_method in setup ok 2 - current_method in method ok 3 - current_method in teardown ok 4 - current_test outside runtests ok t/die_before_plan......1..4 # Running under perl version 5.008007 for netbsd # Current time local: Tue Feb 7 18:14:46 2006 # Current time GMT: Tue Feb 7 18:14:46 2006 # Using Test.pm version 1.25 ok 1 ok 2 not ok 3 # Test 3 got: "# Failed test 'setup (for test method 'test') died (died before plan set)'" (t/die +_before_pla n.t at line 42 fail #3) # Expected: "# Failed test (t/die_before_plan.t at line 32)" # t/die_before_plan.t line 42 is: ok($actual, $expected); not ok 4 # Test 4 got: "# in t/die_before_plan.t at line 32." (t/die_before_plan.t at line 42 fail #4) # Expected: "ok 2 - test just here to get setup method run" Use of uninitialized value in scalar chomp at t/die_before_plan.t line 40, <DATA> line 4. Use of uninitialized value in substitution (s///) at t/die_before_plan.t line 41, <DATA> line 4. not ok 5 # Test 5 got: "ok 2 - test just here to get setup method run" (t/die_before_plan.t at line 42 fail +#5) # Expected: <UNDEF> FAILED tests 3-5 Failed 3/4 tests, 25.00% okay t/documented...........1..0 # Skip Test::Pod::Coverage required skipped all skipped: Test::Pod::Coverage required t/expected_tests.......1..7
Thanks
Direct Responses: 2725 | Write a response
Posted on Thu Jul 27 20:57:42 2006 by wainstead in response to 1768
Re: Problems building Test-Class on NetBSD
I've encountered the exact same error on Mandrake Linux 10 and Darwin (Tiger, OSX 10.4). Running it (die_before_plan.t) through the debugger, all I see is that the strings after __END__ do not match what is returned from $io; but they only differ by a little bit.

If I change them to:

__DATA__ 1..1 not ok 1 - setup (for test method 'test') died (died before plan set) # Failed test 'setup (for test method 'test') died (died before plan set)' # in t/die_before_plan.t at line 34. ok 2 - test just here to get setup method run

then the tests pass. I can't tell, though, whether this is good or bad :o)

Write a response
Posted on Wed Oct 4 13:08:31 2006 by adrianh in response to 1755
Re: Problems building Test-Class on NetBSD
This problem has been fixed in the current releases - apologies for the length of time it took :-)
Write a response