testlib: add TEST_HELPER_DIRECTORY and some doc updates
commitca8da33860490795791dbed5dd4a8c8901824f4b
authorKyle J. McKay <mackyle@gmail.com>
Fri, 17 Mar 2017 23:08:09 +0000 (17 16:08 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 17 Mar 2017 23:08:09 +0000 (17 16:08 -0700)
tree9cbf4c05eafbb6c1f7e6fa1b6b7cac6cf94ff826
parent54981a9a80de5ad181f3e8dedd806525278bb628
testlib: add TEST_HELPER_DIRECTORY and some doc updates

If the TEST_HELPER_DIRECTORY is not set it defaults to
$TEST_DIRECTORY/helper (but only if that's an existing directory)
and if the value of $TEST_HELPER_DIRECTORY is an existing directory
it's added to the PATH.

When helper support was originally added the same checks took place
before adding the "helper" directory to the PATH but until now
it has not been overridable nor the result accessible.

With the new TEST_HELPER_DIRECTORY variable this changes and
any "helper" scripts that need to find themselves or perhaps some
associated files they use can now make use of "$TEST_HELPER_DIRECTORY"
to do so.

And while updating the documentation for this add an explanation
for the "$this_test" variable and the expected
"$TEST_DIRECTORY/$this_test/" location of any test-specific
auxilliary files.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
t/README-TESTLIB
t/test-lib-main.sh
t/test-lib.sh