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/proxy-with-stack-trace.t tests fail on Windows due to path separator #107

Open
shawnlaffan opened this issue Dec 12, 2023 · 4 comments
Open

Comments

@shawnlaffan
Copy link

Tested with Strawberry Perl 5.38.2.2.

One option is to change test regexp to allow for the windows path separator.

(?^:^Help! at t[/\\]proxy-with-stack-trace\.t

Alternately the path separator could be normalised to a forward slash before comparison. s{\\}{/}

Test errors:

t/proxy-with-stack-trace.t .. 1/241
#   Failed test 'default log with Moose::Exception message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help! at t\proxy-with-stack-trace.t line 122
#       main::bar('quux') called at t\proxy-with-stack-trace.t line 136
#       main::foo('bar', 'baz') called at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help! at t/proxy-with-stack-trace\.t line \d+\n)'

#   Failed test 'proxy log with Moose::Exception message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help! at t\proxy-with-stack-trace.t line 122
#       main::bar at t\proxy-with-stack-trace.t line 136
#       main::foo at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help! at t/proxy-with-stack-trace\.t line \d+\n)'

#   Failed test 'proxy log show args with Moose::Exception message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help! at t\proxy-with-stack-trace.t line 122
#       main::bar('quux') called at t\proxy-with-stack-trace.t line 136
#       main::foo('bar', 'baz') called at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help! at t/proxy-with-stack-trace\.t line \d+\n)'

#   Failed test 'default log with Throwable::Error message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help!
#
# Trace begun at t\proxy-with-stack-trace.t line 128
# eval {...} at t\proxy-with-stack-trace.t line 128
# main::bar('quux') called at t\proxy-with-stack-trace.t line 136
# main::foo('bar', 'baz') called at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help!\n\nTrace begun at t/proxy-with-stack-trace\.t line \d+\n)'

#   Failed test 'proxy log with Throwable::Error message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help!
#
# Trace begun at t\proxy-with-stack-trace.t line 128
# eval {...} at t\proxy-with-stack-trace.t line 128
# main::bar at t\proxy-with-stack-trace.t line 136
# main::foo at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help!\n\nTrace begun at t/proxy-with-stack-trace\.t line \d+\n)'

#   Failed test 'proxy log show args with Throwable::Error message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help!
#
# Trace begun at t\proxy-with-stack-trace.t line 128
# eval {...} at t\proxy-with-stack-trace.t line 128
# main::bar('quux') called at t\proxy-with-stack-trace.t line 136
# main::foo('bar', 'baz') called at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help!\n\nTrace begun at t/proxy-with-stack-trace\.t line \d+\n)'
# Looks like you failed 6 tests of 241.
t/proxy-with-stack-trace.t .. Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/241 subtests
@MMNOnZeNet
Copy link

Confirmed when trying to install Log::Any on windows 10 with Strawberry Perl 5.38.2.2
Workaround ?
build.log

@shawnlaffan
Copy link
Author

Now I look, PR #104 provides fixes that should work.

@MMNOnZeNet - if this is the only failure you are seeing then one option is to skip tests when installing. e.g. cpanm --notests Log::Any.

@MMNOnZeNet
Copy link

Thanks to you,
Modified proxy-with-stack-trace and it went OK

@pryrt
Copy link

pryrt commented Sep 13, 2024

Any estimate when #104 will be merged and a new version of Log::Any released?

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