QA'ers,
Once again I am trying to get a handle on how to track down failures caught only under D::C or the debugger.


I've written coverage tests for Ima::DBI,as part of the Phalanx/Kwalitee effort for Class::DBI. And its works fine except under the GUI debugger or D::C

For plain make test we have
[EMAIL PROTECTED] ImaDBI]$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/DBI....ok
All tests successful.
Files=1, Tests=54, 1 wallclock secs ( 0.30 cusr + 0.05 csys = 0.35 CPU)



For D::C we have

[EMAIL PROTECTED] ImaDBI]$ perl Makefile.PL && HARNESS_PERL_SWITCHES=-MDevel::Cover make test || cover
checking for optional Test::MockObject ........ found
Writing Makefile for Ima::DBI
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/DBI....ok 54/54# Looks like your test died just after 54.
t/DBI....dubious
Test returned status 255 (wstat 65280, 0xff00)
after all the subtests completed successfully
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/DBI.t 255 65280 54 0 0.00% ??
Failed 1/1 test scripts, 0.00% okay. 0/54 subtests failed, 100.00% okay.
make: *** [test_dynamic] Error 2
Reading database from /home/le6303/work/Kwalitee.ClassDBI/ImaDBI/cover_db
Devel::Cover: Deleting old coverage for changed file blib/lib/Ima/DBI.pm
Devel::Cover: Deleting old coverage for changed file blib/lib/Ima/DBI.pm



----------------------------------- ------ ------ ------ ------ ------ ------
File stmt branch cond sub time total
----------------------------------- ------ ------ ------ ------ ------ ------
blib/lib/Ima/DBI.pm 100.0 100.0 100.0 100.0 100.0 100.0
Total 100.0 100.0 100.0 100.0 100.0 100.0
----------------------------------- ------ ------ ------ ------ ------ ------


For running under the debugger we have

[EMAIL PROTECTED] ImaDBI]$ perl -d:ptkdb t/DBI.t
1..54
ok 1 - set_db("test1")
ok 2 - set_db("test2")
...
ok 53 - rollback with one db setup
ok 54 - fail rollback
DESTROY created new reference to dead object 'DBI::dr' during global destruction.


Now I dont know where to go from here - have I uncovered a bug in DBI ?
Or is it elsewhere ?
How do I interprete the stat and wstat values form D::C ?
Do I need to compile a debug version of perl and step through under the debugger with that ?


--
Leif Eriksen
Snr Developer
http://www.hpa.com.au/
phone: +61 3 9217 5545
email: [EMAIL PROTECTED]

Reply via email to