summaryrefslogtreecommitdiff
path: root/tests/libtest.sh
diff options
context:
space:
mode:
authorDan Nicholson <nicholson@endlessm.com>2019-06-17 13:37:35 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2019-06-19 17:17:11 +0000
commitd8649f4d5618b0a64988aa092bb566b5c50174e6 (patch)
tree65dda741b444e8205171a421a542c2b584287464 /tests/libtest.sh
parentd0ec319b6b763deb8f25226175e7ff709a4af8c8 (diff)
downloadostree-d8649f4d5618b0a64988aa092bb566b5c50174e6.tar.gz
tests/libtest: Allow specifying GPG homedir to cleanup
In case the tests want to use a custom GPG homedir, allow passing in the homedir to use when cleaning up a running gpg-agent. Closes: #1872 Approved by: cgwalters
Diffstat (limited to 'tests/libtest.sh')
-rwxr-xr-xtests/libtest.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/libtest.sh b/tests/libtest.sh
index e0022512..5f381c67 100755
--- a/tests/libtest.sh
+++ b/tests/libtest.sh
@@ -601,7 +601,8 @@ has_gpgme () {
}
libtest_cleanup_gpg () {
- gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye || true
+ local gpg_homedir=${1:-${test_tmpdir}/gpghome}
+ gpg-connect-agent --homedir "${gpg_homedir}" killagent /bye || true
}
is_bare_user_only_repo () {