summaryrefslogtreecommitdiff
path: root/t/zzz_cleanup.t
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-05-26 09:51:40 -0400
committerNiko Tyni <ntyni@debian.org>2018-06-29 10:20:20 +0200
commitfc8cd3e445b2c8b94c8515695bd906b896b8cb1d (patch)
tree72d9d08dff3b1761f622c3a04ddf56734d553303 /t/zzz_cleanup.t
parentddc919c9c1fa7181662bfcb60ee3edf8d715b589 (diff)
Use a short temporary homedir during the test suite
This avoids problems with the length of the path to the homedir as compared to the size limits of sockaddr_un.sun_path, particularly on systems where /run/user/$(id -u) is not present or available (such as many minimalist build environments). Gbp-Pq: Name 0018-Use-a-short-temporary-homedir-during-the-test-suite.patch
Diffstat (limited to 't/zzz_cleanup.t')
-rw-r--r--t/zzz_cleanup.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/zzz_cleanup.t b/t/zzz_cleanup.t
index eea3a48..c3ec16f 100644
--- a/t/zzz_cleanup.t
+++ b/t/zzz_cleanup.t
@@ -11,9 +11,11 @@ use File::Path qw (remove_tree);
# this is actually no test, just cleanup.
TEST
{
+ my $homedir = $gnupg->options->homedir();
my $err = [];
# kill off any long-lived gpg-agent, ignoring errors:
- system('gpgconf', '--homedir=test/gnupghome', '--quiet', '--kill', 'gpg-agent');
- remove_tree('test/gnupghome', {error => \$err});
+ system('gpgconf', '--homedir', $homedir, '--quiet', '--kill', 'gpg-agent');
+ remove_tree($homedir, {error => \$err});
+ unlink('test/gnupghome');
return ! @$err;
};