-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[CI:DOCS] Tests for xref-helpmsgs-manpages #21055
Conversation
In the process of adding new functionality to the xref script, I realized it is much too fragile. It's too easy to make some minor change that could break the crossrefs, giving us the illusion of testing. Solution: add a test suite for the script. Still incomplete, but an important step toward building confidence. Requires minor surgery to the script itself Signed-off-by: Ed Santiago <[email protected]>
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.
Annotations to help reviewers (assuming there are any such present this week)
my $PODMAN = $ENV{PODMAN} || $Default_Podman; | ||
|
||
# Path to all doc files, including .rst and (down one level) markdown | ||
my $Docs_Path = 'docs/source'; | ||
our $Docs_Path = 'docs/source'; |
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.
my
-> our
makes it a scoped named variable that we can then use from the .t
file.
# "podman inspect" tries to autodetect if it's being run | ||
# on an image or container. It cannot sanely be documented. |
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.
This warning has been present for a few months. I left it in because maybe I could find a way to document podman inspect --format
? But nope, I don't think it's practical. Here I simply remove the warning.
@@ -460,12 +463,11 @@ sub podman_help { | |||
sub podman_man { | |||
my $command = shift; | |||
my $subpath = "$Markdown_Path/$command.1.md"; | |||
my $manpath = "$FindBin::Bin/../$subpath"; |
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.
Pointless variable. The cd
near top guarantees us being in the right dir to use relative paths.
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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago, giuseppe The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Followup to containers#21055: regression tests for the code that reads man pages. These are not xref-related at all, just simple consistency checks on the man page content. In the process of writing these tests, I also fixed a longstanding bug where warning messages could be emitted multiple times, once for each time we read a man page file (as happens with command aliases). Signed-off-by: Ed Santiago <[email protected]>
In the process of adding new functionality to the xref script,
I realized it is much too fragile. It's too easy to make some
minor change that could break the crossrefs, giving us the
illusion of testing.
Solution: add a test suite for the script. Still incomplete,
but an important step toward building confidence.
Requires minor surgery to the script itself
(Note: this test suite is something for me to run. It can't run in CI due to missing dependencies)
Signed-off-by: Ed Santiago [email protected]