Subject: | cpan test failure with Win32::TieRegistry on cygwin |
Date: | Tue, 2 May 2017 09:55:48 -0400 |
To: | bug-Win32-TieRegistry [...] rt.cpan.org |
From: | Doug Seay <dougseay [...] gmail.com> |
Looking at the output of "test Win32::TieRegistry" it seems that some
of the expected values contain \r and cygwin doesn't have this. I
assume it is related to EOLN processing.. Glancing at
http://www.cpantesters.org/distro/W/Win32-TieRegistry.html I see this
isn't unique to me in that all the cygwin systems are failing.
It looks to me like the expected value has a trailing \r and the
actual value does not. I looked at "Version" in
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Internet Explorer" and I
don't see any \r on my win7 box. So I think the test's expected value
has a \r that it shouldn't. In both t/02_main.t and t/rt23328.t I
removed the \r characters for cygwin with
my $output = qx{reg query "$branch_reg" 2>&1};
my $error_code = $?;
$output =~ tr/\r//d if ( $^O eq 'cygwin' );
and that seemed to do the trick. I don't think that $^O check is
necessary because the \r was gobbled up on MSWin32, but I'm not
certain so I'll leave that in. Only that last line is new, the other
two are there for context, With that change I see
[*] .../Win32-TieRegistry-0.30-B94iaG> make test
PERL_DL_NONLAZY=1 "/usr/bin/perl.exe" "-MExtUtils::Command::MM"
"-MTest::Harness" "-e" "undef *Test::Harness::Switches;
test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01_compile.t .. ok
t/02_main.t ..... ok
t/rt23328.t ..... ok
All tests successful.
Files=3, Tests=13, 1 wallclock secs ( 0.05 usr 0.05 sys + 0.18 cusr
0.40 csys = 0.67 CPU)
Result: PASS
where before I saw
cpan[5]> test Win32::TieRegistry
Running test for module 'Win32::TieRegistry'
Checksum for /home/dseay/.cpan/sources/authors/id/C/CH/CHORNY/Win32-TieRegistry-0.30.tar.gz
ok
Configuring C/CH/CHORNY/Win32-TieRegistry-0.30.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Win32::TieRegistry
Writing MYMETA.yml and MYMETA.json
CHORNY/Win32-TieRegistry-0.30.tar.gz
/usr/bin/perl Makefile.PL -- OK
Running make for C/CH/CHORNY/Win32-TieRegistry-0.30.tar.gz
cp lib/Win32/TieRegistry.pm blib/lib/Win32/TieRegistry.pm
cp lib/Tie/Registry.pm blib/lib/Tie/Registry.pm
Manifying 2 pod documents
CHORNY/Win32-TieRegistry-0.30.tar.gz
make -- OK
Running make test
PERL_DL_NONLAZY=1 "/usr/bin/perl.exe" "-MExtUtils::Command::MM"
"-MTest::Harness" "-e" "undef *Test::Harness::Switches;
test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01_compile.t .. ok
t/02_main.t ..... 1/8
# Failed test 'Value matches expected'
# at t/02_main.t line 52.
# got: 'iexplore.exe'
' expected: 'iexplore.exe
# Looks like you failed 1 test of 8.
t/02_main.t ..... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/8 subtests
t/rt23328.t ..... 1/3
# Failed test 'Value matches expected'
# at t/rt23328.t line 36.
# got: '9.11.9600.18638'
' expected: '9.11.9600.18638
# Looks like you failed 1 test of 3.
t/rt23328.t ..... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
Test Summary Report
-------------------
t/02_main.t (Wstat: 256 Tests: 8 Failed: 1)
Failed test: 8
Non-zero exit status: 1
t/rt23328.t (Wstat: 256 Tests: 3 Failed: 1)
Failed test: 3
Non-zero exit status: 1
Files=3, Tests=13, 1 wallclock secs ( 0.08 usr 0.00 sys + 0.21 cusr
0.26 csys = 0.55 CPU)
Result: FAIL
Failed 2/3 test programs. 2/13 subtests failed.
make: *** [Makefile:861: test_dynamic] Error 1
CHORNY/Win32-TieRegistry-0.30.tar.gz
make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports CHORNY/Win32-TieRegistry-0.30.tar.gz
Failed during this command:
CHORNY/Win32-TieRegistry-0.30.tar.gz : make_test NO