< Project:Perl < maint-notes < dev-perl

Project:Perl/maint-notes/dev-perl/App-perlbrew

Testing

Network Tests

Several test in the test suite need network IO to execute. To execute these tests, do as following:

  • root #FEATURES="-network-sandbox" DIST_TEST_OVERRIDE="do network parallel" emerge -va1 dev-perl/App-perlbrew

Without this, you will see this in the output:

CODE Output without network acceess
<syntaxhighlight lang="tap">
t/17.release-detail-cperl-remote.t ..... skipped: These tests send HTTP requests. Set env TEST_LIVE=1 to really run them
t/18.release-detail-perl-remote.t ...... skipped: These tests send HTTP requests. Set env TEST_LIVE=1 to really run them
t/http.t ............................... skipped: (no reason given) 
</syntaxhighlight>
CODE Output with network acceess
<syntaxhighlight lang="tap">
t/17.release-detail-cperl-local.t ...... ok
t/18.release-detail-perl-local.t ....... ok
t/http.t ............................... skipped: (no reason given) 
</syntaxhighlight>

Additionally, one can do:

  • root #FEATURES="-network-sandbox" DIST_TEST_OVERRIDE="do network network-dev-test parallel" emerge -va1 dev-perl/App-perlbrew

Which will make t/http.t do something other than "skip", but this will contact a domain operated by perlbrew, and fetch code from it. It doesn't look risky to me, but worth checking yourself, given the warning in the code

CODE t/http.t
<syntaxhighlight lang="perl">unless ($ENV{PERLBREW_DEV_TEST}) {
    plan skip_all => <<REASON;

This test invokes HTTP request to external servers and should not be ran in
blind. Whoever which to test this need to set PERLBREW_DEV_TEST env var to 1.

REASON
}</syntaxhighlight>
This article is issued from Gentoo. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.