p5-JSON-WebToken
p5-JSON-WebToken copied to clipboard
Tests fail when . not in @INC (perl 5.26 and above)
Getting errors like: Can't locate t/Util.pm in @INC
The easiest fix is to just do use lib '.';
at the top of tests that fail.
23:08:32 13968 ERROR [463]: + export PERL_USE_UNSAFE_INC=0
23:08:32 13968 ERROR [463]: + PERL_USE_UNSAFE_INC=0
23:08:32 13968 ERROR [463]: + ./Build test
23:08:32 13968 ERROR [463]: t/00_compile.t ................................................. ok
23:08:32 13968 ERROR [463]: Can't locate t/Util.pm in @INC (you may need to install the t::Util module) (@INC contains: /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/blib/lib /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/blib/arch /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/_build/lib /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0 /opt/cpanel/perl5/528/site_lib/x86_64-linux-64int /opt/cpanel/perl5/528/site_lib) at t/01_basic.t line 3.
23:08:32 13968 ERROR [463]: BEGIN failed--compilation aborted at t/01_basic.t line 3.
23:08:32 13968 ERROR [463]: t/01_basic.t ...................................................
23:08:32 13968 ERROR [463]: Dubious, test returned 2 (wstat 512, 0x200)
23:08:32 13968 ERROR [463]: No subtests run
23:08:32 13968 ERROR [463]: Can't locate t/Util.pm in @INC (you may need to install the t::Util module) (@INC contains: /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/blib/lib /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/blib/arch /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/_build/lib /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0 /opt/cpanel/perl5/528/site_lib/x86_64-linux-64int /opt/cpanel/perl5/528/site_lib) at t/02_rsa.t line 3.
23:08:32 13968 ERROR [463]: BEGIN failed--compilation aborted at t/02_rsa.t line 3.
23:08:32 13968 ERROR [463]: t/02_rsa.t .....................................................
23:08:32 13968 ERROR [463]: Dubious, test returned 2 (wstat 512, 0x200)
23:08:32 13968 ERROR [463]: No subtests run
23:08:32 13968 ERROR [463]: Can't locate t/Util.pm in @INC (you may need to install the t::Util module) (@INC contains: /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/blib/lib /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/blib/arch /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/_build/lib /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0 /opt/cpanel/perl5/528/site_lib/x86_64-linux-64int /opt/cpanel/perl5/528/site_lib) at t/03_add_signing_algorithm.t line 30.
23:08:32 13968 ERROR [463]: BEGIN failed--compilation aborted at t/03_add_signing_algorithm.t line 30.
23:08:32 13968 ERROR [463]: t/03_add_signing_algorithm.t ...................................
23:08:32 13968 ERROR [463]: Dubious, test returned 2 (wstat 512, 0x200)
23:08:32 13968 ERROR [463]: No subtests run
23:08:32 13968 ERROR [463]: t/04_secret_cb.t ............................................... ok
23:08:32 13968 ERROR [463]: t/99_exception.t ............................................... ok
23:08:32 13968 ERROR [463]: t/spec/draft-ietf-jose-json-web-signature-08-A1.hmac_sha256.t .. ok
23:08:32 13968 ERROR [463]: t/spec/draft-ietf-jose-json-web-signature-08-A2.rsa_sha256.t ... skipped: Test requires module 'Crypt::OpenSSL::RSA' but it's not found
23:08:32 13968 ERROR [463]: Can't locate t/Util.pm in @INC (you may need to install the t::Util module) (@INC contains: /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/blib/lib /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/blib/arch /home/rpmbuild/rpm-build/BUILD/JSON-WebToken-0.10/_build/lib /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/528/lib/perl5/5.28.0 /opt/cpanel/perl5/528/site_lib/x86_64-linux-64int /opt/cpanel/perl5/528/site_lib) at t/spec/draft-ietf-oauth-json-web-token-06-3.1.example.t line 3.
23:08:32 13968 ERROR [463]: BEGIN failed--compilation aborted at t/spec/draft-ietf-oauth-json-web-token-06-3.1.example.t line 3.
23:08:32 13968 ERROR [463]: t/spec/draft-ietf-oauth-json-web-token-06-3.1.example.t ........
23:08:32 13968 ERROR [463]: Dubious, test returned 2 (wstat 512, 0x200)
23:08:32 13968 ERROR [463]: No subtests run
23:08:32 13968 ERROR [463]:
23:08:32 13968 ERROR [463]: Test Summary Report
23:08:32 13968 ERROR [463]: -------------------
23:08:32 13968 ERROR [463]: t/01_basic.t (Wstat: 512 Tests: 0 Failed: 0)
23:08:32 13968 ERROR [463]: Non-zero exit status: 2
23:08:32 13968 ERROR [463]: Parse errors: No plan found in TAP output
23:08:32 13968 ERROR [463]: t/02_rsa.t (Wstat: 512 Tests: 0 Failed: 0)
23:08:32 13968 ERROR [463]: Non-zero exit status: 2
23:08:32 13968 ERROR [463]: Parse errors: No plan found in TAP output
23:08:32 13968 ERROR [463]: t/03_add_signing_algorithm.t (Wstat: 512 Tests: 0 Failed: 0)
23:08:32 13968 ERROR [463]: Non-zero exit status: 2
23:08:32 13968 ERROR [463]: Parse errors: No plan found in TAP output
23:08:32 13968 ERROR [463]: t/spec/draft-ietf-oauth-json-web-token-06-3.1.example.t (Wstat: 512 Tests: 0 Failed: 0)
23:08:32 13968 ERROR [463]: Non-zero exit status: 2
23:08:32 13968 ERROR [463]: Parse errors: No plan found in TAP output
23:08:32 13968 ERROR [463]: Files=9, Tests=20, 0 wallclock secs ( 0.05 usr 0.01 sys + 0.50 cusr 0.07 csys = 0.63 CPU)
23:08:32 13968 ERROR [463]: Result: FAIL
23:08:32 13968 ERROR [463]: Failed 4/9 test programs. 0/20 subtests failed.