testlib: find the test library more robustly
commit371ba938df0fe1c1109f5abe6f97e76ee297a731
authorKyle J. McKay <mackyle@gmail.com>
Fri, 30 Dec 2016 07:41:30 +0000 (29 23:41 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 30 Dec 2016 07:41:30 +0000 (29 23:41 -0800)
treef905407c0a634833524ee56d0b7afa1bb034cfc5
parentb015d49fcc3292d90ef0cdf62113850516319454
testlib: find the test library more robustly

The requirement is now that ${TEST_DIRECTORY:-.}/test-lib.sh
always exist and that it will lead (by following a symlink
if necessary) to the correct directory that contains all of
test-lib.sh, test-lib-main.sh and test-lib-functions.sh.

Testing will be aborted if this is not the case.

With this support it's easier to run tests located in other
places by either pointing TEST_DIRECTORY to the right directory
or creating a symlink for test-lib.sh in the current directory.

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