diff --git a/tests/check.mk b/tests/check.mk index df0c92467..1391d516b 100644 --- a/tests/check.mk +++ b/tests/check.mk @@ -49,7 +49,8 @@ built_programs = \ # variables to test scripts. TESTS_ENVIRONMENT = \ . $(srcdir)/lang-default; \ - tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.; \ + tmp__=$${TMPDIR-/tmp}; \ + test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.; \ . $(srcdir)/envvar-check; \ TMPDIR=$$tmp__; export TMPDIR; \ exec 9>&2; \ diff --git a/tests/misc/sort-compress b/tests/misc/sort-compress index a51a2df7c..50845c9e2 100755 --- a/tests/misc/sort-compress +++ b/tests/misc/sort-compress @@ -22,9 +22,6 @@ print_ver_ sort seq -w 2000 > exp || framework_failure tac exp > in || framework_failure -# Ensure that $TMPDIR is valid. -TMPDIR=.; export TMPDIR - # This should force the use of temp files sort -S 1k in > out || fail=1 compare exp out || fail=1 diff --git a/tests/misc/sort-compress-proc b/tests/misc/sort-compress-proc index 8d0094f13..30f6b43b1 100755 --- a/tests/misc/sort-compress-proc +++ b/tests/misc/sort-compress-proc @@ -20,13 +20,6 @@ print_ver_ sort expensive_ -# Ensure that $TMPDIR is valid. -if test -d /tmp && test -w /tmp -then TMPDIR=/tmp -else TMPDIR=. -fi -export TMPDIR - seq -w 2000 > exp || fail=1 tac exp > in || fail=1 insize=$(stat -c %s -