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

Broken on Windows #9

Closed
genio opened this issue Oct 22, 2018 · 12 comments
Closed

Broken on Windows #9

genio opened this issue Oct 22, 2018 · 12 comments

Comments

@genio
Copy link

genio commented Oct 22, 2018

When attempting to install on Win10 (x64) with Strawberry Perl 5.28.0.1, it appears to be failing a few tests. I assume these failures are do to DOS shortnames being in use.

--> Working on Test::CheckManifest
Fetching http://www.cpan.org/authors/id/R/RE/RENEEB/Test-CheckManifest-1.33.tar.gz ... OK
Configuring Test-CheckManifest-1.33 ... OK
Building and testing Test-CheckManifest-1.33 ... FAIL
! Installing Test::CheckManifest failed. See C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248741.14584\build.log for details. Retry with --force to force install it.
Test::Pod::Spelling::CommonMistakes is up to date. (1.001)
PS C:\Users\cwhitener\chase\win32-daemon> cpanm -v Test::CheckManifest
cpanm (App::cpanminus) 1.7044 on perl 5.028000 built for MSWin32-x64-multi-thread
Work directory is C:\STRAWB~1\5280~1.1\data/.cpanm/work/1540248764.23920
You have make C:\Strawberry\5.28.0.1\c\bin\gmake.exe
You have LWP 6.34
Falling back to Archive::Tar 2.32
Searching Test::CheckManifest () on cpanmetadb ...
--> Working on Test::CheckManifest
Fetching http://www.cpan.org/authors/id/R/RE/RENEEB/Test-CheckManifest-1.33.tar.gz ... OK
Unpacking Test-CheckManifest-1.33.tar.gz
Entering Test-CheckManifest-1.33
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34)
Running Makefile.PL
Configuring Test-CheckManifest-1.33 ... Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Test::CheckManifest
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have Carp 0 ... Yes (1.50)
Checking if you have Test::Builder 0 ... Yes (1.302138)
Checking if you have File::Basename 0 ... Yes (2.85)
Checking if you have File::Find 0 ... Yes (1.34)
Checking if you have File::Spec 0 ... Yes (3.75)
Checking if you have CPAN::Meta::YAML 0 ... Yes (0.018)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34)
Checking if you have Cwd 0 ... Yes (3.75)
Building and testing Test-CheckManifest-1.33 ... cp lib/Test/CheckManifest.pm blib\lib\Test\CheckManifest.pm
"C:\Strawberry\5.28.0.1\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/extra/*.t t/xt/*.t
t/00_load.t ........................ ok
t/01_selftest.t .................... 1/9
#   Failed test 'Filter: \.(?:svn|git|build)'
#   at t/01_selftest.t line 38.
#          got: 0
#     expected: 1
# The following files are not part of distro but named in the MANIFEST file: C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\META.yml
t/01_selftest.t .................... 7/9
#   Failed test 'filter OR exclude'
#   at t/01_selftest.t line 49.
#          got: 0
#     expected: 1
# The following files are not part of distro but named in the MANIFEST file: C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\META.yml, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\t\testrules.yml

#   Failed test 'Filter \.git or \.svn'
#   at t/01_selftest.t line 54.
#          got: 0
#     expected: 1
# The following files are not part of distro but named in the MANIFEST file: C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\META.yml
# Looks like you failed 3 tests of 9.
t/01_selftest.t .................... Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/9 subtests
t/extra/02_test_in_subdirectory.t ..
#   Failed test 'Filter: \.(?:svn|git)'
#   at t/extra/02_test_in_subdirectory.t line 12.
t/extra/02_test_in_subdirectory.t .. 1/1 #          got: 0
#     expected: 1
# The following files are not part of distro but named in the MANIFEST file: C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\META.yml
# Looks like you failed 1 test of 1.
t/extra/02_test_in_subdirectory.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
t/xt/02_issue1.t ................... 1/1
#   Failed test at t/xt/02_issue1.t line 11.
#          got: 0
#     expected: 1
# The following files are not part of distro but named in the MANIFEST file: C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\Changes, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\LICENSE, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\MANIFEST, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\META.json, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\META.yml, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\Makefile.PL, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\README, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\lib\Test\CheckManifest.pm, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\t\00_load.t, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\t\01_selftest.t, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\t\extra\02_test_in_subdirectory.t, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\t\file with whitespaces.txt, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\t\testrules.yml, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\t\xt\02_issue1.t, C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\Test-CheckManifest-1.33\t\xt\03_issue7.t
# Looks like you failed 1 test of 1.
t/xt/02_issue1.t ................... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
t/xt/03_issue7.t ................... 1/? # Tests were run but no plan was declared and done_testing() was not seen.
t/xt/03_issue7.t ................... Dubious, test returned 254 (wstat 65024, 0xfe00)
All 1 subtests passed
        (less 1 skipped subtest: 0 okay)

Test Summary Report
-------------------
t/01_selftest.t                  (Wstat: 768 Tests: 9 Failed: 3)
  Failed tests:  2, 8-9
  Non-zero exit status: 3
t/extra/02_test_in_subdirectory.t (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
t/xt/02_issue1.t                 (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
t/xt/03_issue7.t                 (Wstat: 65024 Tests: 1 Failed: 0)
  Non-zero exit status: 254
  Parse errors: No plan found in TAP output
Files=5, Tests=13,  1 wallclock secs ( 0.05 usr +  0.00 sys =  0.05 CPU)
Result: FAIL
Failed 4/5 test programs. 5/13 subtests failed.
gmake: *** [Makefile:863: test_dynamic] Error 254
FAIL
! Installing Test::CheckManifest failed. See C:\STRAWB~1\5280~1.1\data\.cpanm\work\1540248764.23920\build.log for details. Retry with --force to force install it.
@LorenzoTa
Copy link
Contributor

I can confirm that it does not pass test under strawberry.

removing the test at line 49 (and changing the plan to 8 tests) it PASS:
ok_manifest({filter => [qr/\.(git|build)/], exclude => ['/t/test']}, 'filter OR exclude');

I have to investigate further
thanks
L*

@LorenzoTa
Copy link
Contributor

the problem with the above test 'filter OR exclude' happens just after "file with spaces" is processed. this make me suspicious. Infact the file giving the error is testrules.yaml
# The following files are not part of distro but named in the MANIFEST file: C:\X\Test-CheckManifest\t\testrules.yml

the yaml file is in @files but not in @dir_files
:$VAR1 = [
'C:\X\Test-CheckManifest\Changes',
'C:\X\Test-CheckManifest\MANIFEST',
'C:\X\Test-CheckManifest\t\00_load.t',
'C:\X\Test-CheckManifest\t\01_selftest.t',
'C:\X\Test-CheckManifest\t\xt\02_issue1.t',
'C:\X\Test-CheckManifest\t\xt\03_issue7.t',
'C:\X\Test-CheckManifest\t\file with whitespaces.txt',
'C:\X\Test-CheckManifest\t\testrules.yml',
'C:\X\Test-CheckManifest\t\extra\02_test_in_subdirectory.t',
'C:\X\Test-CheckManifest\lib\Test\CheckManifest.pm'
];
$VAR2 = [
'C:\X\Test-CheckManifest\Changes',
'C:\X\Test-CheckManifest\MANIFEST',
'C:\X\Test-CheckManifest\lib\Test\CheckManifest.pm',
'C:\X\Test-CheckManifest\t\00_load.t',
'C:\X\Test-CheckManifest\t\01_selftest.t',
'C:\X\Test-CheckManifest\t\file with whitespaces.txt',
'C:\X\Test-CheckManifest\t\extra\02_test_in_subdirectory.t',
'C:\X\Test-CheckManifest\t\xt\02_issue1.t',
'C:\X\Test-CheckManifest\t\xt\03_issue7.t'
];

But the filtering part seems too complicated for me.. so i cannot see atm where it fails
Being part of what module-starter produces is important this module is able to run (and to be tested!) on as much platform as possible

@LorenzoTa
Copy link
Contributor

removing the file testrules.yml from its original position and from MANIFEST the test PASS

@reneeb
Copy link
Owner

reneeb commented Dec 11, 2018

Thanks for your analysis. I think I've spotted a bug... I will release a new version this evening.

reneeb added a commit that referenced this issue Dec 11, 2018
@reneeb
Copy link
Owner

reneeb commented Dec 12, 2018

@LorenzoTa Can you please check version 1.35? Thanks

@LorenzoTa
Copy link
Contributor

i'm working on 1.35 (even if the folder is misnamed)

shell>perl -I ./lib -MTest::CheckManifest -E "say $Test::CheckManifest::VERSION"
1.35

But.. no hope. I have problem to understand the filter part, but all call to File::Spec->catfile( $home . '/MANIFEST' ) and similar methods, should be File::Spec->catfile( $home , 'MANIFEST' ) without path separator and with colon not dot

I fear that to compare dastructures you must use is_deeply against @$folders obtained by File::Spec->splitpath

shell>prove -l -v ./t/01_selftest.t
./t/01_selftest.t ..
1..10
ok 1 - expected: Manifest not ok
#   Failed test 'Filter: \.(?:svn|git|build)'
not ok 2 - Filter: \.(?:svn|git|build)#   at ./t/01_selftest.t line 41.

#          got: 0
#     expected: 1
# The following files are not named in the MANIFEST file: D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\CONTRIBUTING.md, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\README.mkdn, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\02_validate_args.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\03_find_home.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\04_check_excludes.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\05_is_excluded.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\06_bailout.t
ok 3 - expected: Manifest not ok (Exclude /.git/)
ok 4 - Filter: \.svn
ok 5 - expected: Manifest not ok (Exclude /.git/) [2]
ok 6 - expected: Manifest not ok (exclude OR filter)
ok 7 - filter AND exclude
ok 8 - filter OR exclude - test.svn is missing in MANIFEST
not ok 9 - filter OR exclude#   Failed test 'filter OR exclude'

#   at ./t/01_selftest.t line 61.
#          got: 0
#     expected: 1
# The following files are not named in the MANIFEST file: D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\CONTRIBUTING.md, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\README.mkdn, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\02_validate_args.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\03_find_home.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\04_check_excludes.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\05_is_excluded.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\06_bailout.t
#   Failed test 'Filter \.git or \.svn'
not ok 10 - Filter \.git or \.svn
#   at ./t/01_selftest.t line 68.
#          got: 0
#     expected: 1
# The following files are not named in the MANIFEST file: D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\CONTRIBUTING.md, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\README.mkdn, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\02_validate_args.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\03_find_home.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\04_check_excludes.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\05_is_excluded.t, D:\ulisseDUE\Test-CheckManifest1.34\Test-CheckManifest-master\t\06_bailout.t
# Looks like you failed 3 tests of 10.
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/10 subtests

Test Summary Report
-------------------
./t/01_selftest.t (Wstat: 768 Tests: 10 Failed: 3)
  Failed tests:  2, 9-10
  Non-zero exit status: 3
Files=1, Tests=10,  1 wallclock secs ( 0.03 usr +  0.01 sys =  0.05 CPU)
Result: FAIL

shell>

I hope i'll have more time to debug it next days
best regards

@reneeb
Copy link
Owner

reneeb commented Dec 12, 2018

I've just released version 1.35

@LorenzoTa
Copy link
Contributor

i'm now try to fix 05_is_excluded.t that fails with Use of uninitialized value $home in quotemeta at line 264

What _find_home is expected to return? just the directory where the current $0 is running?

@reneeb
Copy link
Owner

reneeb commented Dec 21, 2018

I already fixed that "uninitialized" warning... I work on that test as well.

_find_home should return the directory where the MANIFEST is located...

@LorenzoTa
Copy link
Contributor

just a note:
@reneeb in the future I'll try to be more polite in my PR ;) I'm quite new at this and I made half a mess..
I plan a new branch for each pr to propose you, ok? For the moment thanks for the attention and the patience and happy holidays!

@reneeb
Copy link
Owner

reneeb commented Dec 23, 2018

No worries...

Thanks for your PR. It helps a lot.

@reneeb
Copy link
Owner

reneeb commented Feb 1, 2023

This should be fixed in the meantime. The CI pipeline doesn't spot an error...

@reneeb reneeb closed this as completed Feb 1, 2023
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