tap-test: create tmpdir in /var/tmp

So that we can use xattrs.

Closes: #854
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2017-06-28 14:59:23 -07:00 committed by Atomic Bot
parent 0fafd8ea18
commit 1c17e93029

View File

@ -2,10 +2,11 @@
set -euo pipefail set -euo pipefail
# run a GTest in tap mode. The test binary is passed as $1 # run a GTest in tap mode. The test binary is passed as $1
# use /var/tmp so we can use xattrs in case /tmp is on tmpfs
srcd=$(cd $(dirname $1) && pwd) srcd=$(cd $(dirname $1) && pwd)
bn=$(basename $1) bn=$(basename $1)
test_tmpdir=$(mktemp -d) test_tmpdir=$(mktemp -d /var/tmp/tap-test.XXXXXX)
function cleanup () { function cleanup () {
if test -z "${TEST_SKIP_CLEANUP:-}"; then if test -z "${TEST_SKIP_CLEANUP:-}"; then
if test -f ${test_tmpdir}/.test; then if test -f ${test_tmpdir}/.test; then