mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
04605389d7
Split the man page check routine into two routines; one to get the list of sub-commands for a command, and another to verify a man page exists for each sub-command. Use the list of sub-commands to set up the Test::More plan before running the tests. Setting the plan before running the tests allows the the man page tests to run on systems which ship older versions the Test::More module. Change-Id: I1ed6fb87989e1deff4696562f3b917140592ed17 Reviewed-on: http://gerrit.openafs.org/9835 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
26 lines
592 B
Perl
Executable File
26 lines
592 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
use File::Basename;
|
|
use lib "./tests-lib/perl5";
|
|
use mancheck_utils;
|
|
|
|
# Set this to the bare command to test
|
|
my $command = 'pts';
|
|
my $builddir = $ENV{BUILD};
|
|
if (!$builddir) {
|
|
$builddir = dirname($0) . "/..";
|
|
}
|
|
$builddir .= "/..";
|
|
# Set this to the directory holding $command
|
|
my $srcdir = "$builddir/src/ptserver";
|
|
|
|
#---------------------------------------------------------------------
|
|
|
|
my @sub_commands = lookup_sub_commands($srcdir, $command);
|
|
plan tests => scalar @sub_commands;
|
|
|
|
test_command_man_pages($builddir, $command, @sub_commands);
|
|
|