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

From Gentoo Wiki
Jump to:navigation Jump to:search

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
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)
CODE Output with network acceess
t/17.release-detail-cperl-local.t ...... ok
t/18.release-detail-perl-local.t ....... ok
t/http.t ............................... skipped: (no reason given)

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
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
}