testlib: provide config settings to tests and use them
commit94ca8320ccb21cedbf6731565996f1be1dfcba0d
authorKyle J. McKay <mackyle@gmail.com>
Thu, 15 Dec 2016 05:47:25 +0000 (14 21:47 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 15 Dec 2016 05:47:25 +0000 (14 21:47 -0800)
tree558c0842ba2b45f620dbd918f9705095aea0849f
parent869fcf80b1e4572b8971147a1c5c9f5fa5cfdc28
testlib: provide config settings to tests and use them

Make any GIT_PATH, PERL_PATH, SHELL_PATH or DIFF settings
available to test scripts and use them by default for the
specified utilities.

Also pick up GIT_MINIMUM_VERSION from any config and actually
test it if set to make sure the configured GIT_PATH is at
least that version.

Finally support TG_TEST_INSTALLED and if set use the tg found
in $PATH rather than the bin-wrappers/tg executable.

As part of these changes excess calls to 'command -v' have
also been eliminated.

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