Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to install on Windows #5

Open
Zane-XY opened this issue May 20, 2014 · 4 comments
Open

failed to install on Windows #5

Zane-XY opened this issue May 20, 2014 · 4 comments

Comments

@Zane-XY
Copy link

Zane-XY commented May 20, 2014

Does this module support Windows?
I am using strawberry perl v5.18.2 on Windows 7, can't install it via cpan:

# Looks like you failed 1 test of 1.
t/simpleapp-diag.t ..... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
t/simpleapp-dubious.t .. 0 planned, only 0 passed.
 Non-zero exit status: t/dubious.t
t/dubious.t:
Can't find string terminator "'" anywhere before EOF at t/dubious.t line 7.
t/simpleapp-dubious.t .. 1/1 #   Failed test at t/simpleapp-dubious.t line 23.
#     Structures begin differing at:
#          $got->[0] = Does not exist
#     $expected->[0] = '0 planned, only 0 passed.
#      Non-zero exit status: t/dubious.t
#     '
# Looks like you failed 1 test of 1.
t/simpleapp-dubious.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
t/simpleapp-simple.t ... ALL PASSED

t/simpleapp-simple.t ... 1/1 #   Failed test at t/simpleapp-simple.t line 25.
#     Structures begin differing at:
#          $got->[0] = Does not exist
#     $expected->[0] = 'ALL PASSED
#     '
# Looks like you failed 1 test of 1.
t/simpleapp-simple.t ... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests

@gugod
Copy link
Owner

gugod commented Aug 2, 2015

this test t/simpleapp-dubious.t is mean to catch the case when a .t file failed to run anything due to compilation error. autoprove should keep running an notify it as some sort of error. t/simpleapp-simple.t test the other extreme, that autoprove should be able catch when a .t test file finished with "ALL PASSED"

I am not sure what cause them to fail... but feel free to ignore the error, of course. But judging from your error here, I think there is a good chance that autoprove does not work on Win32 at all.

@gugod
Copy link
Owner

gugod commented Aug 2, 2015

Furthermore I'm all OK to support windows, but I do not always have a Win32 machine equipped with me. Feel free to send PRs/patches and convince me to merge them. (and I'm usually very easy to convince :)

@jmaslak
Copy link
Contributor

jmaslak commented Aug 2, 2015

I can duplicate this issue w/ Strawberry Perl 5.22.0 on Win 10 on the current Git repo with the Perl executable patch. The problem, I believe, is that the child process running App::Prove isn't inheriting the library path from the parent process, so, because Test::Continuous is not yet installed in the system path at test time, and because the directory where App::Prove is running has changed, it can't find the Test::Continuous::Formatter module that it needs.

Let me take a look.

Here's the output of a prove -l -v t/simpleapp-simple.t (ignore the cygwin64 stuff - I'm running it from that directory, but am definitely running Strawberry Perl, not Cygwin):

C:\cygwin64\home\jmaslak\Test-Continuous>prove -lr t/simpleapp-simple.t
t/simpleapp-simple.t .. Can't load Test::Continuous::Formatter: Can't locate Test/Continuous/Formatter.pm in @INC (you may need to install the Test::Continuous::Formatter module) (@INC contains: C:/cygwin64/home/jmaslak/Test-Continuous/t/lib:C:/cygwin64/home/jmaslak/Test-Continuous/t/../lib:C:\cygwin64\home\jmaslak\Test-Continuous\lib C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .) at (eval 11) line 2.
 at C:/Strawberry/perl/lib/TAP/Harness/Env.pm line 118.
t/simpleapp-simple.t .. 1/1
#   Failed test at t/simpleapp-simple.t line 25.
#     Structures begin differing at:
#          $got->[0] = Does not exist
#     $expected->[0] = 'ALL PASSED
#     '
# Looks like you failed 1 test of 1.
t/simpleapp-simple.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests

@jmaslak
Copy link
Contributor

jmaslak commented Aug 3, 2015

The cause is that Windows uses a semicolon, not a colon, to separate components in $ENV{PERL5LIB}. I am working through things to use File::Spec and $Config{path_sep}. I've noticed a few other things I'm going to try to fix up in another few commits before I'm fully ready to tackle this - I have a partial patch together and it is running on Strawberry 5.20 and passing tests, but it's not quite in a shippable state. Stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants