From 2a9c41ef4b6df68fc5caa030a9f0641468914439 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 10 Apr 2017 22:35:44 -0400 Subject: test/test-common.sh: Ensure that an old gpg-agent isn't running. It is possible that the gpg has been updated since the user's gpg-agent was started; this will cause mysterious errors, as they will detect the version mismatch. If the user isn't running a gpg-agent, then one will be started. However, it will persist longer than useful, and it will be left looking at a .gnupg directory that no longer exists. It's just not worth the trouble to let an existing agent keep running. --- test/test-common.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/test-common.sh b/test/test-common.sh index 2cbbe56..244e3b7 100644 --- a/test/test-common.sh +++ b/test/test-common.sh @@ -18,14 +18,19 @@ before() { unset BUILDDIR unset PKGEXT SRCEXT unset GPGKEY PACKAGER + killall gpg-agent &>/dev/null || true + tmpdir="$(mktemp -d --tmpdir "test-${roundup_desc//\//-}.${roundup_test_name}.XXXXXXXXXXXX")" chmod 755 "$tmpdir" + stat=0 + common_before } after() { common_after + killall gpg-agent &>/dev/null || true if [[ -f "$tmpdir/.used-sudo" ]]; then sudo rm -rf -- "$tmpdir" "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" else -- cgit v1.2.3-54-g00ecf