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 2017-09-20 17:06:41 +00:00 committed by Atomic Bot
parent 6e4146a354
commit 335f914d48

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