gnupg/tests/gpgscm
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
..
LICENSE.TinySCHEME Add license notices for TinySCHEME. 2016-06-17 18:53:45 +02:00
Makefile.am tests,build: Fix distcheck. 2017-02-15 16:03:12 +01:00
Manual.txt Fix more spelling 2016-09-17 16:00:37 +09:00
ffi-private.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ffi.c gpgscm: Fix creation of temporary directories. 2017-03-06 18:10:08 +01:00
ffi.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
ffi.scm tests: Check expiration times of created keys. 2017-02-15 14:53:07 +01:00
init.scm gpgscm: Guard use of tagged expressions. 2017-02-17 10:43:20 +01:00
lib.scm gpgscm: Guard use of tagged expressions. 2017-02-17 10:43:20 +01:00
main.c Clean up word replication. 2017-02-21 13:11:46 -05:00
opdefines.h gpgscm: Keep a history of calls for error messages. 2016-12-08 17:15:20 +01:00
private.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
repl.scm gpgscm: Better error reporting. 2016-12-08 17:22:50 +01:00
scheme-config.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
scheme-private.h gpgscm: Track source locations in every kind of ports. 2017-02-28 10:00:29 +01:00
scheme.c gpgscm: Improve parsing. 2017-02-28 16:19:18 +01:00
scheme.h gpgscm: Keep a history of calls for error messages. 2016-12-08 17:15:20 +01:00
t-child.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
t-child.scm gpgscm: Improve test of low-level functions. 2016-10-07 16:25:55 +02:00
tests.scm tests: Harmonize temporary and socket directory handling. 2017-03-06 18:10:10 +01:00
time.scm tests: Check expiration times of created keys. 2017-02-15 14:53:07 +01:00