tests: `lib/' shell scripts transparently tested also with $SHELL
With the previous commit, the user could prefer the use of $SHELL
over /bin/sh in some tests checking the Automake-provided shell
scripts by manually exporting `test_prefer_config_shell' to "yes"
in the environment. With this commit, we ensure that such tests
*always* and *transparently* run using both $SHELL and /bin/sh
to execute the checked scripts. The `test_prefer_config_shell'
variable becomes an internal detail, and is no more meant to be
manually defined or overridden.
* tests/defs-static.in: Check that `test_prefer_config_shell' is
not exported in the environment. Error out if this is the case.
* tests/config-shell-tests.sh: New file, driver script to run
checks on the shell scripts in `lib/' using the $SHELL determined
at configure time instead of the default system shell /bin/sh.
* Makefile.am (TESTS_EXTENSIONS): Add `.shtst'.
(SHTST_LOG_COMPILER): Define, it calls `config-shell-tests.sh'.
(config_shell_tests): Define to a list of tests that wraps other
`*.test' tests using `config-shell-tests.sh'.
($(config_shell_tests)): Dummy dependency declaration required
in order to have make actually produce expected log files from
the `.shtst.log' suffix rule.
(EXTRA_DIST): Distribute `config-shell-tests.sh'.
(TESTS): Add `$(config_shell_tests)'.
* tests/self-check-env-sanitize.test: Update, by checking that
`test_prefer_config_shell' isn't exported in the environment.