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

t\Legacy\fail-more.t and t\Legacy\More.t appear to fail when running "nmake test" on Windows #1002

Closed
twata1 opened this issue Aug 24, 2024 · 6 comments

Comments

@twata1
Copy link

twata1 commented Aug 24, 2024

Hello,

Since version 1.302193, when I run "nmake test" on Windows, t\Legacy\fail-more.t and t\Legacy\More.t appear to fail.
Please see example outputs below.

C:\home\mountain5380rc1\Test-Simple-1.302201>nmake test TEST_FILES="t\Legacy\fail-more.t t\Legacy\More.t"

Microsoft (R) Program Maintenance Utility Version 14.33.31630.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        "C:\perl64\5.38.0rc1\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches;
harness(0, 'blib\lib', 'blib\arch')" t\Legacy\fail-more.t t\Legacy\More.t
t\Legacy\fail-more.t .. 1/81 #   Failed test at t\Legacy\fail-more.t line 133.
#          got: 'Use of apostrophe as package separator was deprecated in Perl 5.37.9,
# and will be removed in Perl 5.42.0.  You should change code that uses
# Test::More::isn't() to use Test::More::isnt() as a replacement at t\Legacy\fail-more.t line 132
# '
#     expected: 'Use of apostrophe as package separator was deprecated in Perl 5.37.9,
# and will be removed in Perl 5.42.0.  You should change code that uses
# Test::More::isn't() to use Test::More::isnt() as a replacement at t/Legacy/fail-more.t line 132
# '
t\Legacy\fail-more.t .. Failed 1/81 subtests
t\Legacy\More.t ....... 1/57
#   Failed test 'Got expected warning from isn::t() under use warnings'
#   at t\Legacy\More.t line 32.
#          got: 'Use of apostrophe as package separator was deprecated in Perl 5.37.9,
# and will be removed in Perl 5.42.0.  You should change code that uses
# Test::More::isn't() to use Test::More::isnt() as a replacement at t\Legacy\More.t line 31
# '
#     expected: 'Use of apostrophe as package separator was deprecated in Perl 5.37.9,
# and will be removed in Perl 5.42.0.  You should change code that uses
# Test::More::isn't() to use Test::More::isnt() as a replacement at t/Legacy/More.t line 31
# '
# Looks like you failed 1 test of 57.
t\Legacy\More.t ....... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/57 subtests

Test Summary Report
-------------------
t\Legacy\fail-more.t (Wstat: 0 Tests: 81 Failed: 1)
  Failed test:  15
t\Legacy\More.t     (Wstat: 256 (exited 1) Tests: 57 Failed: 1)
  Failed test:  8
  Non-zero exit status: 1
Files=2, Tests=138,  1 wallclock secs ( 0.06 usr +  0.01 sys =  0.08 CPU)
Result: FAIL
Failed 2/2 test programs. 2/138 subtests failed.
NMAKE : fatal error U1077: 'C:\perl64\5.38.0rc1\bin\perl.exe' : return code '0x1'
Stop.

C:\home\mountain5380rc1\Test-Simple-1.302201>

Thank you,

@jkeenan
Copy link

jkeenan commented Aug 24, 2024

Hello,

Since version 1.302193, when I run "nmake test" on Windows, t\Legacy\fail-more.t and t\Legacy\More.t appear to fail. Please see example outputs below.

C:\home\mountain5380rc1\Test-Simple-1.302201>nmake test TEST_FILES="t\Legacy\fail-more.t t\Legacy\More.t"

Microsoft (R) Program Maintenance Utility Version 14.33.31630.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        "C:\perl64\5.38.0rc1\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches;
harness(0, 'blib\lib', 'blib\arch')" t\Legacy\fail-more.t t\Legacy\More.t
t\Legacy\fail-more.t .. 1/81 #   Failed test at t\Legacy\fail-more.t line 133.
#          got: 'Use of apostrophe as package separator was deprecated in Perl 5.37.9,
# and will be removed in Perl 5.42.0.  You should change code that uses
# Test::More::isn't() to use Test::More::isnt() as a replacement at t\Legacy\fail-more.t line 132
# '
#     expected: 'Use of apostrophe as package separator was deprecated in Perl 5.37.9,
# and will be removed in Perl 5.42.0.  You should change code that uses
# Test::More::isn't() to use Test::More::isnt() as a replacement at t/Legacy/fail-more.t line 132
# '
t\Legacy\fail-more.t .. Failed 1/81 subtests
t\Legacy\More.t ....... 1/57
#   Failed test 'Got expected warning from isn::t() under use warnings'
#   at t\Legacy\More.t line 32.
#          got: 'Use of apostrophe as package separator was deprecated in Perl 5.37.9,
# and will be removed in Perl 5.42.0.  You should change code that uses
# Test::More::isn't() to use Test::More::isnt() as a replacement at t\Legacy\More.t line 31
# '
#     expected: 'Use of apostrophe as package separator was deprecated in Perl 5.37.9,
# and will be removed in Perl 5.42.0.  You should change code that uses
# Test::More::isn't() to use Test::More::isnt() as a replacement at t/Legacy/More.t line 31
# '
# Looks like you failed 1 test of 57.
t\Legacy\More.t ....... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/57 subtests

Test Summary Report
-------------------
t\Legacy\fail-more.t (Wstat: 0 Tests: 81 Failed: 1)
  Failed test:  15
t\Legacy\More.t     (Wstat: 256 (exited 1) Tests: 57 Failed: 1)
  Failed test:  8
  Non-zero exit status: 1
Files=2, Tests=138,  1 wallclock secs ( 0.06 usr +  0.01 sys =  0.08 CPU)
Result: FAIL
Failed 2/2 test programs. 2/138 subtests failed.
NMAKE : fatal error U1077: 'C:\perl64\5.38.0rc1\bin\perl.exe' : return code '0x1'
Stop.

C:\home\mountain5380rc1\Test-Simple-1.302201>

My impression is that there are two inter-related problems here. First, some of the test messages have Unix-style forward-slashes as path separators, which may not match test output where Windows prints back-slashes.

Second, Test-Simple-1.302193 aimed at adapting the distribution to the deprecation of apostrophes as package separators and inside variable names. But in the Perl core distribution, we advanced from deprecation to removal of that functionality earlier this month.

commit 0c81a5c9ca0287c0ee954a71b1bffdeb2cb3e9c8
Merge: 3e14b2fcf5 83d4e742eb
Author:     Tony Cook <[email protected]>
AuthorDate: Sun Aug 11 21:03:07 2024
Commit:     Tony Cook <[email protected]>
CommitDate: Sun Aug 11 21:03:07 2024

    remove use of ' as a package separator

In the Perl core distribution, we are as of today using Test-Simple-1.302201. Perhaps the t/Legacy need further adaptation -- but I'm not familiar enough with Test-Simple's own development to know how to proceed. @exodist?

@exodist
Copy link
Member

exodist commented Aug 24, 2024

I will remove all uses of ' as a package separator and adjust the tests accordingly.

Can you spell out for me which tests use hardcoddd unix path separators? I can fix those too.

@twata1
Copy link
Author

twata1 commented Aug 24, 2024

It is thought to be here.

. " at t/Legacy/More.t line 31\n",

# Test::More::isn't() to use Test::More::isnt() as a replacement at t/Legacy/fail-more.t line 132

@exodist
Copy link
Member

exodist commented Sep 2, 2024

Please check #1003 to see if it fixes the issue

@twata1
Copy link
Author

twata1 commented Sep 4, 2024

I can confirm that this issue has been fixed!

The result logs of nmake test and gmake test are attached for your reference.
nmake-test-gh1003.log.txt
gmake-test-gh1003.log.txt

People who build Perl using Visual Studio must be pleased.
I thank you for your correspondence!

@exodist exodist closed this as completed in 32f8a24 Sep 4, 2024
exodist added a commit that referenced this issue Sep 4, 2024
@exodist
Copy link
Member

exodist commented Sep 4, 2024

Running my usual downstream tests to make sure nothing is broken, then will release to cpan

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