aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-06-10 11:58:25 +0200
committerFabian Groffen <grobian@gentoo.org>2019-06-10 11:58:25 +0200
commitf45d8de0bc9d477dce9b3ae7a0d958e089307473 (patch)
tree177e86c292552bf3143c09e117ad1536ab0b3617 /tests
parentlibq/tree: fix crash in tree_open on failure (diff)
downloadportage-utils-f45d8de0bc9d477dce9b3ae7a0d958e089307473.tar.gz
portage-utils-f45d8de0bc9d477dce9b3ae7a0d958e089307473.tar.bz2
portage-utils-f45d8de0bc9d477dce9b3ae7a0d958e089307473.zip
tests: allow tmpdir to reside in a place defined by Q_TMPDIR
when using NFS or something like that, using local storage iso builddir is nice, because of speed but more because also not all operations are allowed on network shares, so using this in some scenarios allows to pass the tests Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/init.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/init.sh.in b/tests/init.sh.in
index c031ae3..875e2af 100644
--- a/tests/init.sh.in
+++ b/tests/init.sh.in
@@ -68,7 +68,7 @@ end() {
}
mktmpdir() {
- local d=${1:-${ab}/tmp}
+ local d=${1:-${Q_TMPDIR:-${ab}}/q-tmp}
rm -rf "$d" && \
mkdir -p "$d" && \
pushd "$d" >/dev/null \
@@ -76,7 +76,7 @@ mktmpdir() {
}
_cleantmpdir() {
local cmd=$1; shift
- local d=${1:-${ab}/tmp}
+ local d=${1:-${Q_TMPDIR:-${ab}}/q-tmp}
popd >/dev/null
${cmd} "${d}" || fail "could not clean tmp dir '$d'"
}