Subject: | "Live" network tests that take a while aught to be opt-in |
Tests are fine, but ime, lots of people don't want to run network tests that take several minutes if they don't have to.
There's also something about vivifying a path in $ENV{HOME} during testing that I'm not too fond of.
Its not massively slow *every* time, but it varies
Heres a 5 minute run:
PERL_DL_NONLAZY=1 /home/kent/perl5/perlbrew/perls/perl-5.19.10/bin/perl5.19.10 "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-require.t .... ok
t/02-bad-path.t ... ok
t/03-live-test.t .. ok
All tests successful.
Files=3, Tests=4, 291 wallclock secs ( 0.04 usr 0.01 sys + 4.23 cusr 0.48 csys = 4.76 CPU)
291 wallclock = 4.8 minutes.
And here's a 1 minute run:
rness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-require.t .... ok
t/02-bad-path.t ... ok
t/03-live-test.t .. ok
All tests successful.
Files=3, Tests=4, 43 wallclock secs ( 0.03 usr 0.01 sys + 3.96 cusr 0.42 csys = 4.42 CPU)
And of course, its hard for an end user to repeat the slow tests due to touching $ENV{HOME} and you have to remove certain files to simply replicate the test :)
Another slow 4 minute run
PERL_DL_NONLAZY=1 /home/kent/perl5/perlbrew/perls/perl-5.19.10/bin/perl5.19.10 "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-require.t .... ok
t/02-bad-path.t ... ok
t/03-live-test.t .. ok
All tests successful.
Files=3, Tests=4, 236 wallclock secs ( 0.03 usr 0.01 sys + 3.89 cusr 0.41 csys = 4.34 CPU)
Of course, once the cache is there its much faster:
PERL_DL_NONLAZY=1 /home/kent/perl5/perlbrew/perls/perl-5.19.10/bin/perl5.19.10 "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-require.t .... ok
t/02-bad-path.t ... ok
t/03-live-test.t .. ok
All tests successful.
Files=3, Tests=4, 1 wallclock secs ( 0.03 usr 0.01 sys + 0.73 cusr 0.09 csys = 0.86 CPU)