openafs/tests/ptserver/pts-man-t
Michael Meffie 04605389d7 tests: make a plan for man page checks
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>
2013-05-01 07:19:01 -07:00

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);