From: Stefano Lattarini Date: Tue, 19 Apr 2011 20:57:39 +0000 (+0200) Subject: tests: in self-checks, use $SHELL, not /bin/sh X-Git-Tag: ng-0.5a~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=942379cc3862ca20003ccea44edff90e6a13b314;p=thirdparty%2Fautomake.git tests: in self-checks, use $SHELL, not /bin/sh * tests/self-check-me-in-env.test: Include `./defs-static' to get the definition of `$SHELL'. Use `$SHELL' instead of `/bin/sh' to execute the tests. --- diff --git a/ChangeLog b/ChangeLog index 6ea78a280..6aeafd510 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-04-19 Stefano Lattarini + + tests: in self-checks, use $SHELL, not /bin/sh + * tests/self-check-me-in-env.test: Include `./defs-static' to get + the definition of `$SHELL'. Use `$SHELL' instead of `/bin/sh' to + execute the tests. + 2011-04-19 Stefano Lattarini tests: prefer AM_TESTS_ENVIRONMENT to TESTS_ENVIRONMENT diff --git a/tests/self-check-me-in-env.test b/tests/self-check-me-in-env.test index 344a861b8..966088dcf 100755 --- a/tests/self-check-me-in-env.test +++ b/tests/self-check-me-in-env.test @@ -18,11 +18,13 @@ # Make sure that the testsuite initialization code complains when # $me is set in the environment. +. ./defs-static || exit 1 + set -x exec 5>&1 -env me=foo /bin/sh -c '. ./defs' foo.test && exit 1 -env me=foo /bin/sh -c '. ./defs' foo.test 2>&1 1>&5 \ +env me=foo $SHELL -c '. ./defs' foo.test && exit 1 +env me=foo $SHELL -c '. ./defs' foo.test 2>&1 1>&5 \ | grep "variable \`me' is set in the environment.*unsafe" || exit 1 :