From: Dmitry V. Levin Date: Tue, 19 Jan 2010 16:03:31 +0000 (+0300) Subject: Fix test failure when a shell uses $TMPDIR for here-documents. X-Git-Tag: v2.66~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dbbe5693ded3e2ef3e694810608db9f007460d6;p=thirdparty%2Fautoconf.git Fix test failure when a shell uses $TMPDIR for here-documents. * tests/tools.at (autotools and whitespace in file names): Create $TMPDIR before potential use like in other whitespace tests. Signed-off-by: Dmitry V. Levin Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 70432f8a..ec631ffb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-21 Dmitry V. Levin + + Fix test failure when a shell uses $TMPDIR for here-documents. + * tests/tools.at (autotools and whitespace in file names): Create + $TMPDIR before potential use like in other whitespace tests. + 2010-01-20 Paolo Bonzini Add recommendation on (not) unsetting IFS. diff --git a/tests/tools.at b/tests/tools.at index cea3a0fa..d8ac0dc5 100644 --- a/tests/tools.at +++ b/tests/tools.at @@ -1283,7 +1283,7 @@ export x rm -f a b for funny in \ 'with funny '\'' $x & #! name ' \ - 'with funny \ '\'' \'\'' " b * ? name ' + 'with funny \ '\'' \'\'' " b * ? name ' #" do funny=`func_sanitize_file_name "$funny"` file=" file $funny" @@ -1291,6 +1291,9 @@ do TMPDIR=" tmp$dir" export TMPDIR + # skip if we cannot create such a file or directory + AT_CHECK([mkdir "$dir" "$TMPDIR" && touch "$file.in" || exit 77]) + cat >"$file.in" <<'END' [AC_INIT(x,0) m4@&t@_include([foo.m4]) @@ -1298,8 +1301,6 @@ AC_CONFIG_HEADERS([config.h:config.hin]) AC_MACRO AC_OUTPUT] END - # skip if we cannot create such a file or directory - AT_CHECK([mkdir "$dir" "$TMPDIR" && test -f "$file.in" || exit 77]) cat >"$dir"/foo.m4 <<'END' [AC_DEFUN([AC_MACRO], [echo hi])] END