pjf / ipc-system-simple

Perl module to make running system commands and capturing errors as simple as possible.

Home Page:http://search.cpan.org/perldoc?IPC::System::Simple

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test failures with Strawberry Perl 5.30.1

SteelBlueVision opened this issue · comments

I am getting the following failures when trying to install v. 1.26 with Strawberry Perl 5.30.1 on Windows 10:
http://www.cpan.org/authors/id/J/JK/JKEENAN/IPC-System-Simple-1.26.tar.gz

Test Summary Report

t/04_capture.t (Wstat: 1024 Tests: 12 Failed: 4)
Failed tests: 3, 5, 7, 11
Non-zero exit status: 4
t/12_systemx.t (Wstat: 256 Tests: 7 Failed: 1)
Failed test: 4
Non-zero exit status: 1
t/win32.t (Wstat: 512 Tests: 33 Failed: 2)
Failed tests: 24, 26
Non-zero exit status: 2
Files=19, Tests=157, 2 wallclock secs ( 0.03 usr + 0.01 sys = 0.05 CPU)
Result: FAIL

Failed 3/19 test programs. 7/157 subtests failed.

gmake: *** [Makefile:877: test_dynamic] Error 2

Samples of failures:

t/03_signal.t ............ skipped: Signals not implemented on Win32
# Failed test 'Scalar capture'
# at t/04_capture.t line 28.
# got: ''
# expected: 'Hello
# Goodbye
# '
# Failed test 'capture and qx() return same results'
# at t/04_capture.t line 32.
# got: ''
# expected: 'Hello
# Goodbye
# '
# Failed test 'List capture'
# at t/04_capture.t line 39.
# Structures begin differing at:
# $got->[0] = Does not exist
# $expected->[0] = 'Hello
# '
# Failed test 'Single-arg capture still works'
# at t/04_capture.t line 59.
# ''
# doesn't match '(?^:Hello)'
# Looks like you failed 4 tests of 12.

Investigation

Did a build manually, and it seems that 04_capture.t when executing the Line 25:
my $output = capture($output_exe);

..., seems to read from stdin without echo, instead of executing the command $output_exe and reading its output. On my system during the test, the value of $output_exe is:
C:\strawberry\perl\bin\perl.exe output.pl

I went deeper and found that in sub _win32_capture:
$command contains: C:\strawberry\perl\bin\perl.exe output.pl
@args is empty!

So, later when the exe file is parsed out into $exe the output.pl part is lost and, because @args is empty, instead of the intended call to the output.pl script:
C:\strawberry\perl\bin\perl.exe output.pl
..., we get:
C:\strawberry\perl\bin\perl.exe
..., which just sits there when executed and waits for you to type in a perl script interactively.

Thanks for the report. I have just been assigned as a co-maintainer of IPC-System-Simple. I don't have access to a Windows development machine, nor do I have recent experience with code development on Windows. So I'm not at all surprised that we're having problems on mswin32. I cannot promise a quick fix, but when I have access to Windows I will re-examine your report.

Thank you very much.
Jim Keenan

Noting a somewhat larger set of failures in a run on Strawberry Perl here:
http://www.cpantesters.org/cpan/report/56b76875-6c0b-1014-b292-6f0d4e39b6ce
(first CPANtesters report received in a long time).

Can you try the following branch in the github repository and see if it reduces the number of test failures?
https://github.com/pjf/ipc-system-simple/tree/theory-win32quote

Thank you very much.
Jim Keenan

I believe that we have addressed this issue in CPAN versions 1.28 and later (currently, 1.29). Can you confirm?

Thank you very much.
Jim Keenan

I believe that this issue may be resolved in IPC-System-Simple version 1.30, just released to CPAN. Can you confirm?

Thank you very much.
Jim Keenan