gnupg/tests/gpgsm
Justus Winter 7e19786a5d
tests: Harmonize temporary and socket directory handling.
* tests/gpgscm/tests.scm (mkdtemp): Do not magically obey the
environment variable 'TMP', make sure to always return an absolute
path.
* tests/gpgme/Makefile.am (TMP): Drop variable.
(TESTS_ENVIRONMENT): Drop 'TMP'.
* tests/gpgme/gpgme-defs.scm (create-gpgmehome): Start the agent.  Do
not create private key store, the agent does that for us.
* tests/gpgsm/Makefile.am (TMP): Drop variable.
(TESTS_ENVIRONMENT): Drop 'TMP'.
* tests/gpgme/gpgme-defs.scm (create-gpgsmhome): Start the agent.  Do
not create private key store, the agent does that for us.
* tests/migrations/Makefile.am (TMP): Drop variable.
(TESTS_ENVIRONMENT): Drop 'TMP'.
* tests/migrations/common.scm (gpgconf): New variable.
(run-test): Create and remove socket directory.
* tests/migrations/extended-pkf.scm (src-tarball): Remove variable.
(setup): Remove function.
(trigger-migration): Likewise.
Use 'run-test' to execute the test.
* tests/migrations/from-classic.scm (src-tarball): Remove variable.
(setup): Remove function.
Use 'run-test' to execute the tests.
* tests/openpgp/Makefile.am (TMP): Drop variable.
(TESTS_ENVIRONMENT): Drop 'TMP'.
* tests/openpgp/README: Do not mention 'TMP'.
* tests/openpgp/defs.scm (with-home-directory): New macro.
(create-legacy-gpghome): Do not create private key store, the agent
does that for us.
(start-agent): Make sure to terminate the right agent with 'atexit'.
--

Previously, the test suite relied upon creating home directories in
'/tmp'.  This has been problematic in some build environments,
although POSIX mandates that '/tmp' must be available.

We now rely on 'gpgconf --create-socketdir' to create a suitable
socket directory for us.  This allows us to get rid of some cruft.  It
also aligns the environment the tests are run in closer with the
environment that we intend that GnuPG runs in.

Signed-off-by: Justus Winter <justus@g10code.com>
2017-03-06 18:10:10 +01:00
..
32100C27173EF6E9C4E9A25D3D69F86D37A4F939 tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
Makefile.am tests: Harmonize temporary and socket directory handling. 2017-03-06 18:10:10 +01:00
cert_dfn_pca01.der tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
cert_dfn_pca15.der tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
cert_g10code_test1.der tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
decrypt.scm tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
encrypt.scm tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
export.scm tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
gpgsm-defs.scm tests: Harmonize temporary and socket directory handling. 2017-03-06 18:10:10 +01:00
import.scm tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
plain-1.cms.asc tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
plain-2.cms.asc tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
plain-3.cms.asc tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
plain-large.cms.asc tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
run-tests.scm tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
setup.scm tests: Fix macro. 2017-01-05 17:00:36 +01:00
shell.scm tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
sign.scm tests: Add test suite for gpgsm. 2016-12-20 16:51:38 +01:00
verify.scm tests,w32: Fix gpgsm signature verification test. 2017-01-25 15:39:30 +01:00