Re: TEST_VERBOSE
On Tue, Sep 03, 2002 at 07:08:25PM -0700, David Wheeler wrote: > In fact, other than the Test::Class method names, TEST_VERBOSE adds > nothing to the output -- not even diag messages. So I've added this to > the script that runs my test scripts through Test::Harness: > > use Test::Harness qw(runtests $verbose); > $verbose = $ENV{TEST_VERBOSE} ? 1 : 0; > > But what am I missing? I know that a lot of people on the cpan-testers > list ask for tests to be re-run with TEST_VERBOSE=1, but I can't see > that it actually makes much difference. Should it? TEST_VERBOSE, to Test::Harness, is not an environment variable. It's a make attribute used by MakeMaker to set $Test::Harness::verbose like you have above. make test TEST_VERBOSE=1 That's what the folks on cpan-testers are asking for. HARNESS_VERBOSE is the environment variable Test::Harness responds to. Test::Class uses the TEST_VERBOSE environment variable to print out the name of each test before it's run. -- Michael G. Schwern <[EMAIL PROTECTED]>http://www.pobox.com/~schwern/ Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One It's Tobacco time!
Re: TEST_VERBOSE
On Wednesday, September 4, 2002, at 12:48 AM, Michael G Schwern wrote: > TEST_VERBOSE, to Test::Harness, is not an environment variable. It's > a make > attribute used by MakeMaker to set $Test::Harness::verbose like you > have > above. > > make test TEST_VERBOSE=1 > > That's what the folks on cpan-testers are asking for. Oh. Duh. So I was using it wrong, thinking it was an environment variable. Thanks for straightening me out. > HARNESS_VERBOSE is the environment variable Test::Harness responds > to. Then, although I was essentially doing the right thing setting HARNESS_VERBOSE (which also appears to let all diag messages print), I'm doing it the wrong way. So I just have to figure out how to write my Makefile to take the TEST_VERBOSE=1 argument and do something with it. > Test::Class uses the TEST_VERBOSE environment variable to print out > the name > of each test before it's run. Ah, and that's a little different, since here it *is* an environment variable. Interesting. Thanks, David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 http://david.wheeler.net/ Yahoo!: dew7e Jabber: [EMAIL PROTECTED]
Devel::Cover and v5.8.0
-BEGIN PGP SIGNED MESSAGE- Moin, null:/home/te/perl/perl-5.8.0/lib # perl -MDevel::Cover -I. Math/Complex.t [snip] Can't locate object method "START" via package "B::SPECIAL" at /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/Devel/Cover.pm line 147. END failed--call queue aborted. B.pm contains B::SPECIAL in only one place and no "START" AFAIS. Devel::Cover seems to die always with this error. Did anybody use Devel::Cover with 5.8.0 yet? Cheers, Tels - -- perl -MMath::String -e 'print \ Math::String->from_number("215960156869840440586892398248"),"\n"' http://bloodgate.com/perl My current Perl projects PGP key available on http://bloodgate.com/tels.asc or via email. -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. iQEVAwUBPXZ5c3cLPEOTuEwVAQGssAf+JZkgAjXc3tpd4VaF9ywlRIdgzvjv7Pml S+3w9V4bJvvWYob710C4PYZLW+qlDf2Eo6PlPj5UVFEJQJSWo8wjoPAdeDD7P5Jl pUA2iZjyDFDp9byayt37gkYBcSfGD1A/OacSV1XB25PG1lUfyL7AVJiPKoWjPesX hwAOrwgHfAAJBw8+om/x7L8v3CJzw1V8gL2OK260tZThbXmO85dcnQ+CH54E6INV TzzjL2fEQ3jidRjIxJlReUU82dw0LW1gmzka2edyqD7VxLRN29er/qxMzKNJ5et3 a2vmLckRE62xqIuoLIjYY+lQ4wxF2KMSP8OUKuIo1/+5cNarLZJbRw== =i1fB -END PGP SIGNATURE-
RE: Devel::Cover and v5.8.0 [PATCH]
-BEGIN PGP SIGNED MESSAGE- Moin, while trying to fix the error I noticed that the testsuite breaks when Devel::Cover is already installed (and/or cover is moved into a dir of PATH). null:/home/te/perl/Devel-Cover-0.14 # make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/t1ok t/t2Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. Use of uninitialized value in multiplication (*) at /home/te/perl/Devel-Cover-0.14/blib/lib/Devel/Cover/Criterion.pm line 32. t/t2NOK 1# Test 1 got: 'mismatch: extra' (t/t2.t at line 35) # Expected: 'done' t/t2FAILED test 1 Failed 1/1 tests, 0.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed - - --- t/t2.t 11 100.00% 1 Failed 1/2 test scripts, 50.00% okay. 1/2 subtests failed, 50.00% okay. make: *** [test_dynamic] Error 29 null:/home/te/perl/Devel-Cover-0.14 # The attached patch fixes the "START" crash as well as a "ROOT" crash that would occur on line 175. I have no idea if it is the right fix, but it seems to work. Somebody with more insight can probably tell if this is a Devel::Cover or a v5.8.0 problem. Also, Devel::Cover's testsuite did not catch it, since it worked flawlessly at the first run. Anyway, even with that fix I get a lot of Use of uninitialized value in multiplication (*) at /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/Devel/Cover/Criterion.pm line 32. when trying to run for instance 5.8.0-Complex.t trough it. Hm. Tomorrow is another day... HTH, Tels - -- perl -MDev::Bollocks -e'print Dev::Bollocks->rand(),"\n"' proactively maintain essential e-tailers http://bloodgate.com/perl My current Perl projects PGP key available on http://bloodgate.com/tels.asc or via email -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. iQEVAwUBPXZ+h3cLPEOTuEwVAQHLhgf9EC0zXb7UJox/EZ7hJ+H6Sdef1FotJ2fK jkfoeoiByOc2uOz8nh7mv1MG5wq7eDjRjKO7jpJGh2mSconOdUFyi+1qmafS8gKg 9subSOknxd46naD8cyFBOXBkQXy2LxG2bzf9ZYcojITFpbupqipZtfm6rbkWGmRn u8KQ/71xRl+OJE5ug1m47pSVUQ4sfYSLnnbK1IARiGstZLsOx6k9KP3bTran+MLT AQlKJjzQ7aw3M3IDYFHMLjCjNBaK7BPOmDHQ84IHQL4XoIDR+Nl3d76jvv/KeLWx ANzrFxBWjlx9vz2rAm+Kibw6FMvqQIFI3TkJDX4UgOmTeUnq3Cve1Q== =BgmY -END PGP SIGNATURE- --- Cover.pm.oldWed Sep 4 23:36:14 2002 +++ Cover.pmWed Sep 4 23:38:46 2002 @@ -144,6 +144,8 @@ sub report for my $sub (@Todo) { +next unless $sub->[1]->CV->isa('B::CV'); + if (class($sub->[1]->CV->START) eq "COP") { # Determine whether this sub is in a package we are covering.
Re: Devel::Cover and v5.8.0 [PATCH]
Tels wrote in perl.qa : > --- Cover.pm.old Wed Sep 4 23:36:14 2002 > +++ Cover.pm Wed Sep 4 23:38:46 2002 > @@ -144,6 +144,8 @@ sub report > > for my $sub (@Todo) > { > +next unless $sub->[1]->CV->isa('B::CV'); That's a guard against a B::SPECIAL object, isn't it ? Well, B::SPECIAL is for one of the internal constants '0', '1' and 'undef'. There ought to be a better interface to this, but I can't really figure out what to improve. In fact I think you really want next if $sub->[1]->CV->isa('B::SPECIAL') == B::svref_2object(\undef); (does this line fix your problem ?) and there should be a shortcut for it. > + > if (class($sub->[1]->CV->START) eq "COP") > { > # Determine whether this sub is in a package we are covering.
Re: Devel::Cover and v5.8.0 [PATCH]
-BEGIN PGP SIGNED MESSAGE- Moin, On 04-Sep-02 Rafael Garcia-Suarez carved into stone: > Tels wrote in perl.qa : >> --- Cover.pm.old Wed Sep 4 23:36:14 2002 >> +++ Cover.pm Wed Sep 4 23:38:46 2002 >> @@ -144,6 +144,8 @@ sub report >> >> for my $sub (@Todo) >> { >> +next unless $sub->[1]->CV->isa('B::CV'); > > That's a guard against a B::SPECIAL object, isn't it ? Wlll, actually, yes. Maybe against other objects, that is why I didn't want to test for B::SPECIAL. > Well, B::SPECIAL is for one of the internal constants '0', '1' and > 'undef'. There ought to be a better interface to this, but I can't > really figure out what to improve. I have no idea what you talk about - I am a total B:: newbie :) OTOH, previous to 5.8.0 (e.g. 5.7.x) this used to work, so something changed in either B:: or in Devel::Cover (but v0.14 of Devel::Cover is rather old). > In fact I think you really want > next if $sub->[1]->CV->isa('B::SPECIAL') == B::svref_2object(\undef); > (does this line fix your problem ?) I'll try tomorrow. (My patch "fixes" the problem in that Devel::Cover no longer crashes, but I am unsure whether it really works e.g. the numbers are still correct) > and there should be a shortcut for it. And some testcases in Devel::Cover :) >> + >> if (class($sub->[1]->CV->START) eq "COP") Alternatively, can B::SPECIAL get a START() and ROOT() method or does this not make sense? Thanx in advance, Tels - -- perl -MDev::Bollocks -e'print Dev::Bollocks->rand(),"\n"' conveniently transition viral bandwidth http://bloodgate.com/perl My current Perl projects PGP key available on http://bloodgate.com/tels.asc or via email -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. iQEVAwUBPXaEkncLPEOTuEwVAQHOlwf+JffoGuOed4BpuZ8KajuLl/KhT+JCMhuv cLGPcmPROIYGE9c/8fNdLZ/7z0oRpb6IZLXIchdk3x/srKDJXYSY92uVSTREF458 xY3VrvlbvTRLUGlE8BJl8r82psbcm/HvwUqpY1UHfF3Wnvd6ErXd+80SWKaFUuCK MVmOgbCjM019iaKQFFyoEatb0HWv5UqKQVUdEWG9zVG5lulLq5DzED++JL3c5JNQ ee6vSq+P1ECURqpT1jvPou4KQzg48F5ln09z25ABFQlxuFzlOycOzQldoBtGvCe2 2C+nJVY7qdNWvDeh+KAUga1idto/osQ0k2E7ITgR99I/1b7sckvPRw== =dol5 -END PGP SIGNATURE-
Re: Devel::Cover and v5.8.0 [PATCH]
Tels wrote in perl.qa : > >> Well, B::SPECIAL is for one of the internal constants '0', '1' and >> 'undef'. There ought to be a better interface to this, but I can't >> really figure out what to improve. > > I have no idea what you talk about - I am a total B:: newbie :) The big story : Each time a literal 1, 0 or undef is seen in perl source code, or returned by a built-in, no new object is created by perl, but only a reference to inner 'special' static constant. > Alternatively, can B::SPECIAL get a START() and ROOT() method or does this > not make sense? Not at all. undef, 0 and 1 have no start or root, have they ? You can still do sub B::SPECIAL::AUTOLOAD { undef } but I doubt this will be of any help.