From: Stefano Lattarini Date: Fri, 6 Jul 2012 18:49:15 +0000 (+0200) Subject: tests: don't clutter the top-level dir with temporary test directories X-Git-Tag: v1.12.2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14487be67a4d2e7cfcbda928c998e83a0bdbae96;p=thirdparty%2Fautomake.git tests: don't clutter the top-level dir with temporary test directories * t/self-check-me.tap: Be sure to initialize '$am_create_testdir' to "no" in all the shell invocations sourcing './defs'. Otherwise, when running the testsuite with 'keep_testdirs=yes', the following temporary director are left cluttering the top-level directory: ./012.dir ./abc..dir ./a.b.c.dir ./foo.dir ./foo.bar.dir ./foo-bar-.dir ./_foo__bar.dir Signed-off-by: Stefano Lattarini --- diff --git a/t/self-check-me.tap b/t/self-check-me.tap index 717fe2e37..e89e15085 100755 --- a/t/self-check-me.tap +++ b/t/self-check-me.tap @@ -31,7 +31,11 @@ set +e do_check () { - $AM_TEST_RUNNER_SHELL -c '. ./defs && echo me=$me' "$1" | grep "^me=$2$" + $AM_TEST_RUNNER_SHELL -c ' + am_create_testdir=no # Do not pollute the top-level directory. + . ./defs + echo me=$me + ' "$1" | grep "^me=$2$" command_ok_ "me=$1" test $? -eq 0 } @@ -47,7 +51,12 @@ do_check abc. 'abc\.' # A definition of $me in the environment should be ignored. -s=$(me=bad $AM_TEST_RUNNER_SHELL -c '. ./defs && echo me=$me' foo.sh) +s=$(me=bad $AM_TEST_RUNNER_SHELL -c ' + # Do not pollute the top-level directory. + am_create_testdir=no + . ./defs + echo me=$me +' foo.sh) command_ok_ "override of \$me before ./defs causes no error" \ test $? -eq 0