diff options
-rwxr-xr-x | tests/libtest.sh | 4 | ||||
-rwxr-xr-x | tests/test-commit-sign.sh | 2 | ||||
-rwxr-xr-x | tests/test-gpg-signed-commit.sh | 2 | ||||
-rwxr-xr-x | tests/test-pull-mirror-summary.sh | 2 | ||||
-rwxr-xr-x | tests/test-pull-summary-sigs.sh | 2 | ||||
-rwxr-xr-x | tests/test-remote-gpg-import.sh | 2 |
6 files changed, 9 insertions, 5 deletions
diff --git a/tests/libtest.sh b/tests/libtest.sh index 3e4c4bd6..03b498aa 100755 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -349,3 +349,7 @@ skip_without_fuse () { exit 0 fi } + +libtest_cleanup_gpg () { + gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye || true +} diff --git a/tests/test-commit-sign.sh b/tests/test-commit-sign.sh index 1b153e9a..e469c0f9 100755 --- a/tests/test-commit-sign.sh +++ b/tests/test-commit-sign.sh @@ -132,6 +132,6 @@ if ${CMD_PREFIX} ostree --repo=repo show main | grep -o 'Found [[:digit:]] signa fi rm -rf repo gnomerepo-files -gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye +libtest_cleanup_gpg echo "ok" diff --git a/tests/test-gpg-signed-commit.sh b/tests/test-gpg-signed-commit.sh index 096c0e1c..fa42d677 100755 --- a/tests/test-gpg-signed-commit.sh +++ b/tests/test-gpg-signed-commit.sh @@ -78,6 +78,6 @@ if ${OSTREE} show test2 | grep -o 'Found [[:digit:]] signature'; then assert_not_reached fi -gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye +libtest_cleanup_gpg echo "ok" diff --git a/tests/test-pull-mirror-summary.sh b/tests/test-pull-mirror-summary.sh index d5e27fc8..49aa91ad 100755 --- a/tests/test-pull-mirror-summary.sh +++ b/tests/test-pull-mirror-summary.sh @@ -122,4 +122,4 @@ echo "ok pull mirror with invalid summary sig and no verification" # echo "ok pull mirror with signed summary covering static deltas" -gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye +libtest_cleanup_gpg diff --git a/tests/test-pull-summary-sigs.sh b/tests/test-pull-summary-sigs.sh index dd2fcb0f..40de0a66 100755 --- a/tests/test-pull-summary-sigs.sh +++ b/tests/test-pull-summary-sigs.sh @@ -134,4 +134,4 @@ grep static-deltas summary.txt > static-deltas.txt assert_file_has_content static-deltas.txt \ $(${OSTREE} --repo=repo rev-parse origin:main) -gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye +libtest_cleanup_gpg diff --git a/tests/test-remote-gpg-import.sh b/tests/test-remote-gpg-import.sh index aa90eb89..8d155f79 100755 --- a/tests/test-remote-gpg-import.sh +++ b/tests/test-remote-gpg-import.sh @@ -143,5 +143,5 @@ if ${OSTREE} pull R2:main >/dev/null 2>&1; then fi ${OSTREE} pull R3:main >/dev/null -gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye +libtest_cleanup_gpg echo "ok" |