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
This commit is contained in:
Jonathan Lebon authored and Atomic Bot committed 2017-09-21 21:50:40 +00:00
1 parent 6e4146a354
commit 335f914d48
1 file changed
+2 -1
+2 -1
View File
@@ -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