-
Notifications
You must be signed in to change notification settings - Fork 601
Do not fail on minimized systems #23787
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
Do not fail on minimized systems #23787
Conversation
b357d5c to
65a30ae
Compare
tonycoz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did consider whether testing man perlrules matched the "No manpage found" text would be better, but that could lead to silent skips when we should still be performing the test.
lib/perl5db.t
Outdated
| local $ENV{LC_ALL} = "C"; | ||
| my $out = `/usr/bin/man --version`; | ||
| $out !~ /^This system has been minimized/ | ||
| or skip "No man. This system has been minimized...", 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 3 lines would be better placed 3 lines higher, i.e., just after the other skip statements and before the 3 local $ENV{} statements.
I think the last 2 lines would be more quickly understood if they were expressed in the positive, rather than in the negative, i.e.,
$out =~ /^This system has been minimized/
and skip "No man. This system has been minimized...", 1;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the locale is non-English moving this above the environment changes may produce non-English messages, breaking the test (though I don't know if whatever produces the message pays the space cost of localizing the message.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it probably should come after the localizations, but I do agree with @jkeenan that the negative match doesn't help readability here. How about
if ($out =~ /^This system has been minimized/) {
skip "No man. This system has been minimized...", 1;
}
65a30ae to
f43f6b5
Compare
f43f6b5 to
82e0a32
Compare
jkeenan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
thanks everyone. |
GH #23780
Perl installation fails on minimized systems.
Here we just add another test that
manis available and SKIPperldocsection if it is not.After the fix output looks like this: