tests: Fix manpage tests for objdir builds 40/13940/2
authorAndrew Deason <adeason@sinenomine.net>
Tue, 12 Nov 2019 02:34:27 +0000 (20:34 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 20 Dec 2019 16:29:45 +0000 (11:29 -0500)
commit0b8b6683fb525bbeaf118014beb2371e0cf23d90
tree8fb013b9adec014b361005402198edf89396fa80
parent63fd13bf9e6af21136007c9980816875ebea5f7c
tests: Fix manpage tests for objdir builds

The manpage tests have a couple of problems when running for objdir
builds:

- We try to specify './tests-lib/perl5' as a directory to find our
  helper library. However, the cwd when we're running the tests is in
  an objdir build, where the helper library is in the srcdir. Fix this
  by using the SOURCE env var specified by the tests wrapper.

- All of these tests specify the directory in which to find the man
  pages in a subdir of BUILD, but our manpages are located in the src
  dir (since they are built by regen.sh, not by configure/make). Fix
  this by specifying a SOURCE-based directory instead.

To avoid needing to make the same change for each of these tests, also
refactor the manpage tests so each test only needs to specify the
subdirectory and command name, and get rid of some of the common
boilerplate.

Change-Id: I96be199b1dec8db0545ae3cf19d2595c4afe4cdd
Reviewed-on: https://gerrit.openafs.org/13940
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
tests/bozo/bos-man-t
tests/bucoord/backup-man-t
tests/kauth/kas-man-t
tests/ptserver/pts-man-t
tests/tests-lib/perl5/mancheck_utils.pm
tests/venus/fs-man-t
tests/volser/vos-man-t