I seem to have fixed the issue, it had something to do with the scope
of some of the DBD specific variables. Basically, I had repleaced
several use vars (...) with our $variable not realizing the variables
were then being file scoped and not package scoped. Once I got the
variables into their proper scope, all was well. However, this doesn't
answer my question about why prove let this happen, and make test
caught it.
Steve
On Sep 3, 2004, at 1:45 PM, stevan little wrote:
I am getting ready to release a new version of DBD::Mock and all
seemed fine until I tried running 'make test' and I got a bunch of
warnings, which when I ran it with 'prove -b t/*.t' I did not get.
I have tried to debug the issue based on the DBI line number. But (as
far as I can tell) what it says is happening, is not happening (at
least according to the DBI debug/trace statements) and should not
happen (based on my understanding of the DBI code in DBI.pm and
DBI.xs). I have also tried turning warnings off, but that seems to
have no effect.
Of course I would be more inclined to think it was DBI too if the
problem didn't go away when I ran the tests with prove. I am wondering
if anyone else has had similar issues, and could possible shed some
light on it (and save me a few hours of poking at things). I have
included the output of the two runs at the end of this mail too, in
case that helps.
Thanks much,
Steve
[~/Desktop/DBD-Mock-0.12] stevan% make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_basic......................ok
t/10_db_handle..................ok
t/11_dr_handle..................ok
t/12_db_can_connect.............ok 9/23Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/12_db_can_connect.............NOK 20# Failed test
(t/12_db_can_connect.t at line 73)
# 'Use of uninitialized value in subroutine entry at
/Library/Perl/darwin/DBI.pm line 1078.
# '
# doesn't match '(?-xism:No connection present)'
t/12_db_can_connect.............ok 24/23# Looks like you planned 23
tests but ran 1 extra.
t/12_db_can_connect.............dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 20, 24
Failed 2/23 tests, 91.30% okay
t/13_misc_mock_attr.............ok 5/26Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
Use of uninitialized value in subroutine entry at
/Library/Perl/darwin/DBI.pm line 1078.
Use of uninitialized value in subroutine entry at
/Library/Perl/darwin/DBI.pm line 1078.
Use of uninitialized value in subroutine entry at
/Library/Perl/darwin/DBI.pm line 1078.
Use of uninitialized value in subroutine entry at
/Library/Perl/darwin/DBI.pm line 1078.
Use of uninitialized value in subroutine entry at
/Library/Perl/darwin/DBI.pm line 1078.
t/13_misc_mock_attr.............ok 7/26Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/13_misc_mock_attr.............ok
t/14_db_parser..................ok 6/29Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/14_db_parser..................ok 13/29Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/14_db_parser..................ok
t/20_st_execute_empty...........ok 2/14Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/20_st_execute_empty...........ok
t/25_st_execute_bound_params....ok 2/10Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/25_st_execute_bound_params....ok
t/30_st_execute_pass_params.....ok 2/9Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/30_st_execute_pass_params.....ok
t/35_st_fetch_records...........ok 2/39Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/35_st_fetch_records...........ok 16/39Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/35_st_fetch_records...........ok 38/39Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/35_st_fetch_records...........ok
t/37_st_can_connect.............ok 5/23Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/37_st_can_connect.............ok 14/23Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/37_st_can_connect.............ok
t/40_mock_statement_track.......ok
t/50_db_pool....................ok 10/16Use of uninitialized value in
subroutine entry at /Library/Perl/darwin/DBI.pm line 1078.
t/50_db_pool....................ok
t/pod...........................ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-----------------------------------------------------------------------
--------
t/12_db_can_connect.t 2 512 23 2 8.70% 20 24
Failed 1/14 test scripts, 92.86% okay. 0/288 subtests failed, 100.00%
okay.
make: *** [test_dynamic] Error 2
[~/Desktop/DBD-Mock-0.12] stevan% prove -b t/*.t
t/00_basic......................ok
t/10_db_handle..................ok
t/11_dr_handle..................ok
t/12_db_can_connect.............ok
t/13_misc_mock_attr.............ok
t/14_db_parser..................ok
t/20_st_execute_empty...........ok
t/25_st_execute_bound_params....ok
t/30_st_execute_pass_params.....ok
t/35_st_fetch_records...........ok
t/37_st_can_connect.............ok
t/40_mock_statement_track.......ok
t/50_db_pool....................ok
t/pod...........................ok
All tests successful.
Files=14, Tests=288, 10 wallclock secs ( 4.56 cusr + 0.75 csys =
5.31 CPU)