tokuhirom / Minilla

Authorizing tool for CPAN modules
https://metacpan.org/release/Minilla
Other
97 stars 65 forks source link

Fix an issue where run_tests.t fails on Windows #227

Closed sago35 closed 7 years ago

sago35 commented 7 years ago

This PR fixes the following tests in Windows.

This failure is reported below. It probably occurs only on Windows.

before

https://ci.appveyor.com/project/sago35/minilla/build/1.0.18

#   Failed test 'use Acme::Speciality;'
#   at t/00_compile.t line 4.
#     Tried to use 'Acme::Speciality'.
#     Error:  Can't locate Acme/Speciality.pm in @INC (you may need to install the Acme::Speciality module) (@INC contains: C:\Users\appveyor\AppData\Local\Temp\1\TQpJM_Zwu1\Acme-Speciality\blib\arch C:\Users\appveyor\AppData\Local\Temp\1\TQpJM_Zwu1\Acme-Speciality\blib\lib C:\projects\minilla\lib C:/projects/minilla/local/lib/perl5/MSWin32-x64-multi-thread C:/projects/minilla/local/lib/perl5 C:/Strawberry/perl/site/lib/MSWin32-x64-multi-thread C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .) at t/00_compile.t line 4.
# BEGIN failed--compilation aborted at t/00_compile.t line 4.
# Looks like you failed 1 test of 1.
        #   Failed test at t/module_maker/tiny/run_tests.t line 44.
        #          got: '256'
        #     expected: '0'

after

https://ci.appveyor.com/project/sago35/minilla/build/1.0.21


File::Spec's pod says If $base is not present or '', then Cwd::cwd() is used., but there is a difference in strawberry perl (windows). I don't know why.

There is no difference in Travis-CI

+++ rel2abs('blib/lib')         : /home/travis/build/sago35/Minilla/Acme-Foo/.build/0R5wXxKl/blib/lib
+++ rel2abs('blib/lib', cwd)    : /home/travis/build/sago35/Minilla/Acme-Foo/.build/0R5wXxKl/blib/lib
+++ rel2abs('blib/lib', getcwd) : /home/travis/build/sago35/Minilla/Acme-Foo/.build/0R5wXxKl/blib/lib
tokuhirom commented 7 years ago

Hmm.. it's strange behavior. It's maybe strawberry perl's issue. But we don't need to reject this patch.

sago35 commented 7 years ago

Thanks.