tests: Don't force use of /var/tmp

Now that we don't need user xattrs, a tmpfs is good enough.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2017-08-31 12:21:42 +01:00 committed by Alexander Larsson
parent a53a752a35
commit 0648452fca
3 changed files with 4 additions and 7 deletions

View File

@ -1,14 +1,12 @@
#! /bin/bash
#
# Run a test in tap mode, ensuring we have a temporary directory. We
# always use /var/tmp because we might want to use user xattrs, which
# aren't available on tmpfs.
# Run a test in tap mode, ensuring we have a temporary directory.
#
# The test binary is passed as $1
srcd=$(cd $(dirname $1) && pwd)
bn=$(basename $1)
tempdir=$(mktemp -d /var/tmp/tap-test.XXXXXX)
tempdir=$(mktemp -d /tmp/tap-test.XXXXXX)
touch ${tempdir}/.testtmp
function cleanup () {
if test -n "${TEST_SKIP_CLEANUP:-}"; then

View File

@ -72,8 +72,7 @@ fi
export MALLOC_CHECK_=3
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
# We need this to be in /var/tmp because /tmp has no xattr support
TEST_DATA_DIR=`mktemp -d /var/tmp/test-flatpak-XXXXXX`
TEST_DATA_DIR=`mktemp -d /tmp/test-flatpak-XXXXXX`
mkdir -p ${TEST_DATA_DIR}/home
mkdir -p ${TEST_DATA_DIR}/runtime
mkdir -p ${TEST_DATA_DIR}/system

View File

@ -798,7 +798,7 @@ global_setup (void)
g_autofree char *datadir = NULL;
g_autofree char *homedir = NULL;
testdir = g_strdup ("/var/tmp/flatpak-test-XXXXXX");
testdir = g_strdup ("/tmp/flatpak-test-XXXXXX");
g_mkdtemp (testdir);
g_test_message ("testdir: %s", testdir);