aboutsummaryrefslogtreecommitdiffstats
path: root/tests/migrations/common.scm (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: Fix no gpg-agent upon removal of GNUPGHOME.NIIBE Yutaka2018-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
* tests: Locate resources and scripts relative to top source dir.Justus Winter2017-04-241-1/+1
| | | | | | | | | | | | -- Locate every resource and every script used in the tests using a path relative to the top of the source tree. This is a purely mechanical change, mostly done using regular expressions, with a few manual fixups here and there. Signed-off-by: Justus Winter <[email protected]>
* tests: Make tests more robust.Justus Winter2017-04-111-4/+5
| | | | | | | | | * tests/openpgp/defs.scm (have-opt-always-trust): Execute in empty ephemeral home directory. This prevents gpg from picking up the configuration from the current gnupghome (if any). * tests/migrations/common.scm (untar-armored): Likewise. Signed-off-by: Justus Winter <[email protected]>
* tests: Create temporary directories in '/tmp'.Justus Winter2017-03-211-1/+1
| | | | | | | | | | | | | | | | | * tests/gpgscm/tests.scm (mkdtemp): Create temporary directories in '/tmp' on UNIX, or in '%Temp' on Windows. * tests/migrations/common.scm (run-test): Turn error into a warning. * tests/openpgp/defs.scm (start-agent): Likewise. -- This fixes the problem of GnuPG components being unable to communicate because of too long GnuPG home directories in important build environments like the Debian build servers despite the use of socket directories. This reverts d75d20909d9f60d33ffd210def92278c0f383aad. Signed-off-by: Justus Winter <[email protected]>
* tests: Fail if we cannot create the socket directory.Justus Winter2017-03-201-1/+1
| | | | | | | | | | | | * tests/migrations/common.scm (run-test): Turn warning into an error. * tests/openpgp/defs.scm (start-agent): Likewise. -- We use separate directories to create the sockets in so that the absolute path to the every socket fits into sun_path. Fixes-commit: 7e19786a5ddef637d1d9d21593fecf5a36b6f372 Signed-off-by: Justus Winter <[email protected]>
* tests: Harmonize temporary and socket directory handling.Justus Winter2017-03-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 <[email protected]>
* tests: Use the common test framework for the migration tests.Justus Winter2016-12-191-4/+6
| | | | | | | | | | | | | | * tests/migrations/Makefile.am (reqired_pgms): Add 'gpgscm'. (TESTS_ENVIRONMENT): Populate. (TESTS): Rename to 'XTESTS'. (xcheck): New target. (EXTRA_DIST): Add new files. (CLEANFILES): Remove log files. * tests/migrations/common.scm: Honor 'verbose', fix paths. * tests/migrations/run-tests.scm: New file. * tests/migrations/setup.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>
* g10: Properly ignore legacy keys in the keyring cache.Justus Winter2016-07-221-0/+13
| | | | | | | | | | | | | * g10/keyring.c (keyring_rebuild_cache): Properly ignore legacy keys in the keyring cache. * tests/migrations/Makefile.am (TESTS): Add new test. * tests/migrations/common.scm (GPG-no-batch): New variable. (run-test): New function. * tests/migrations/issue2276.scm: New file. * tests/migrations/issue2276.tar.asc: Likewise. GnuPG-bug-id: 2276 Signed-off-by: Justus Winter <[email protected]>
* tests/migrations: Fix distcheck.Justus Winter2016-07-051-4/+3
| | | | | | | | | | | | | | | | | * tests/migrations/Makefile.am (TESTS): Rename test. (TEST_FILES): Update list. (EXTRA_DIST): Add common.scm. * tests/migrations/common.scm (GPGTAR): New variable. (dearmor): Rename and untar archive. * tests/migrations/extended-private-key-format.scm: Rename. (setup): Update. * tests/migrations/extended-pkf.tar.asc: New file. * tests/migrations/extended-private-key-format.gpghome: Delete. * tests/migrations/from-classic.gpghome: Likewise. * tests/migrations/from-classic.scm (setup): Update. * tests/migrations/from-classic.tar.asc: New file. Signed-off-by: Justus Winter <[email protected]>
* tests/migrations: Convert to Scheme and re-enable.Justus Winter2016-06-211-0/+40
* configure.ac: Re-enable. * tests/Makefile.am: Likewise. * tests/migrations/Makefile.am (TESTS): Use Scheme tests. * tests/migrations/common.scm: New file. * tests/migrations/extended-private-key-format.scm: Likewise. * tests/migrations/from-classic.scm: Likewise. * tests/migrations/extended-private-key-format.test: Drop file. * tests/migrations/from-classic.test: Drop file. Signed-off-by: Justus Winter <[email protected]>