tests: Fix no gpg-agent upon removal of GNUPGHOME.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 4 Apr 2018 11:27:08 +0000 (20:27 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 4 Apr 2018 11:27:08 +0000 (20:27 +0900)
commit83529e1bd14a6d39f2a8ecab9fb6aa4c1f344c73
tree7a8a1e7c8367547880106c65cf5cac33e677e31e
parentcb1731c23cddfa524d3f51cfd82029bff853a073
tests: Fix no gpg-agent upon removal of GNUPGHOME.

* tests/gpgscm/gnupg.scm (with-ephemeral-home-directory): Add
teadown-fn.
* tests/gpgsm/export.scm: Use -no-atexit version and stop-agent.
* tests/openpgp/decrypt-session-key.scm: Likewise.
* tests/openpgp/decrypt-unwrap-verify.scm: Likewise.
* tests/openpgp/defs.scm (have-opt-always-trust): Likewise.
(setup-environment-no-atexit): New.
(start-agent): Support no use of atexit.
* tests/gpgsm/gpgsm-defs.scm (setup-gpgsm-environment-no-atexit): New.
* tests/migrations/common.scm (untar-armored): Follow the change
of with-ephemeral-home-directory.

--

When gpg-agent detects homedir removal, it will automatically exit.
Then, call of 'gpgconf --kill all' will fail.  So, stop-agent should
be called before the removal of homedir.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
tests/gpgscm/gnupg.scm
tests/gpgsm/export.scm
tests/gpgsm/gpgsm-defs.scm
tests/migrations/common.scm
tests/openpgp/decrypt-session-key.scm
tests/openpgp/decrypt-unwrap-verify.scm
tests/openpgp/defs.scm