summaryrefslogtreecommitdiff
path: root/tests/check.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tests/check.mk')
-rw-r--r--tests/check.mk3
1 files changed, 2 insertions, 1 deletions
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; \