From 335f914d48064fe4e3abbbb3bf8b3e8605f262f9 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Wed, 20 Sep 2017 17:06:41 +0000 Subject: [PATCH] tests: allow specifying tmpdir Allow developers to override the default /var/tmp dir, which e.g. might be on overlayfs and thus produces reduced coverage. Closes: #1207 Approved by: cgwalters --- buildutil/tap-test | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildutil/tap-test b/buildutil/tap-test index ac729d8d..e35f2a4a 100755 --- a/buildutil/tap-test +++ b/buildutil/tap-test @@ -8,7 +8,8 @@ srcd=$(cd $(dirname $1) && pwd) bn=$(basename $1) -tempdir=$(mktemp -d /var/tmp/tap-test.XXXXXX) +TEST_TMPDIR=${TEST_TMPDIR:-/var/tmp} +tempdir=$(mktemp -d $TEST_TMPDIR/tap-test.XXXXXX) touch ${tempdir}/.testtmp function cleanup () { if test -f ${tempdir}/.testtmp; then