]> git.ipfire.org Git - thirdparty/automake.git/commit
tests: `lib/' shell scripts transparently tested also with $SHELL
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 6 Jun 2011 14:12:59 +0000 (16:12 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 7 Jun 2011 21:16:16 +0000 (23:16 +0200)
commit7df1a9bd2b5e981e957aaf269fc15f980a993394
treef9d1db91b23b341a94c6a128d56075190300f57b
parent2838ad57693eec3e8467460e61e1c0d98ec53d3b
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.
ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/config-shell-tests.sh [new file with mode: 0755]
tests/defs-static.in
tests/self-check-env-sanitize.test