commit: f45d8de0bc9d477dce9b3ae7a0d958e089307473
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 10 09:58:25 2019 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jun 10 09:58:25 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=f45d8de0
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 <AT> gentoo.org>
tests/init.sh.in | 4 ++--
1 file 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'"
}