tests: Accommodate c-tap-harness 4.7 The SOURCE and BUILD environment variables have been changed to C_TAP_SOURCE and C_TAP_BUILD in the new version of c-tap-harness. The runtests command syntax has changed as well. Convert all of the old SOURCE and BUILD environment variables to the new C_TAP_SOURCE and C_TAP_BUILD names. Add the required -l command line option to specify the test list. Add the new runtests -v option to run the tests in verbose mode to make it easier to see which tests failed. Change-Id: I209a6dc13d6cd1507519234fce1564fc4641e70b Reviewed-on: https://gerrit.openafs.org/14295 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
tests: Run perl via 'env' The 'perl' binary may not be /usr/bin/perl, depending on the system. For example, on modern FreeBSD it tends to be /usr/local/bin/perl instead. To avoid relying on perl to be in a specific location, just run via /usr/bin/env instead, so we pick up perl from $PATH instead. Change-Id: Ic8dc247c82342ff79dfa80426c489ccb8e3e1450 Reviewed-on: https://gerrit.openafs.org/14144 Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
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: 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>
Introduce TAP tests of man pages for command_subcommand Introduces the first batch of man page testing as part of the TAP tests. We would like to fail, for example, when someone has added a new command to vos but not AHEM documented it. For now, the tests consist of checking to ensure that for every subcommand listed in the output of "command help" (e.g. vos help), fail the test if there is not a man page for those (e.g. vos_delentry.1 etc). Copy any of the -man-t tests and edit to make a new one All tests make use of a simple new Perl library stored in tests-lib/perl5 (a new area, not just named 'lib' because I didn't want it to be confused with a s test for a 'lib' in the src). Change-Id: I1e07adafe718c4549f1855c5e5b0d10dd9ab5f00 Reviewed-on: http://gerrit.openafs.org/4846 Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>