aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-05-25 15:35:37 +0200
committerFabian Groffen <grobian@gentoo.org>2019-05-25 15:35:37 +0200
commit5db00ff1e743cc7383849cea9434a7d5df3b80e0 (patch)
tree07f2c33f6e45a80f653e92a0f1d92573a2ffbfce /tests
parenttests/qmanifest: silence some gpg warnings about permissions (diff)
downloadportage-utils-5db00ff1e743cc7383849cea9434a7d5df3b80e0.tar.gz
portage-utils-5db00ff1e743cc7383849cea9434a7d5df3b80e0.tar.bz2
portage-utils-5db00ff1e743cc7383849cea9434a7d5df3b80e0.zip
tests/qmanifest: move GNUPG homedir to TMPDIR
Hopefully, TMPDIR is shorter than our T. gpgme is pretty annoying when it comes to paths, it often considers a path to be too long, so we need to keep it to a minimum. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qmanifest/dotest6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/qmanifest/dotest b/tests/qmanifest/dotest
index 9d28133e..4e8c66fe 100755
--- a/tests/qmanifest/dotest
+++ b/tests/qmanifest/dotest
@@ -44,9 +44,10 @@ test 05 1 "qmanifest -o notatree"
# generate a valid tree
rm -Rf testtree
cp -r "${ROOT}/simpletree" testtree || echo try it anyway
-export HOME=${ROOT} # for gnupg home
+export HOME=$(mktemp -d) # for gnupg home
+cp -r "${ROOT}/.gnupg" "${HOME}/"
# silence gpg warnings
-chmod -R og-rwx "${ROOT}"/.gnupg
+chmod -R og-rwx "${HOME}"/.gnupg
# make it a fully valid tree
rm testtree/my-cat/mypackage/unrecorded-file
# drop ROOT, we'll work here in T
@@ -60,6 +61,7 @@ test 07 0 "qmanifest testtree | sed -e '/Manifest timestamp/d' -e 's/made .* UTC
# shut down agents and whatnot
gpgconf --kill all
+rm -Rf "${HOME}"
cleantmpdir