Commit Graph

6 Commits

Author SHA1 Message Date
Werner Koch bcd5feec0e
tests: New way to make use of gpgconf.ctl in tests.
* Makefile.am (all-local): New to setup symlinks.
(distclean-local): New.
* tests/Makefile.am: Remove the gpgconf related targets.  Just keep
gpgconf.ctl.in in EXTRA_DIST
* tests/cms/Makefile.am (GNUPG_BUILD_ROOT):
* tests/gpgme/Makefile.am (GPGSCM_PATH):
* tests/openpgp/Makefile.am (GNUPG_BUILD_ROOT):
* tests/pkits/Makefile.am (GNUPG_BUILD_ROOT):
* tests/tpm2dtests/defs.scm (tools): Revert to the former values.
* tests/openpgp/defs.scm (tools): Ditto.
--

This
Fixes-commit: 399ebf6d87
Fixes-commit: 84fcd8e6eb
because we ran into problems with the idea of first doing a
test-install for the checks.  "make distcheck" turned out to
be too problematic.  Symlinks are a better way of doing this.
Also fixes
GnuPG-bug-id: 5634
2021-10-12 14:30:13 +02:00
Werner Koch 84fcd8e6eb
tests: Use the new gpgconf.ctl based method.
* tests/openpgp/defs.scm:  We expect that stuff is now installed.
(tools): Fix the names.
(intsalled?, bin-prefix): Remove.
(tool-hardcoded): Simplify.
(gpg-conf'): Simplify.
(GNUPG_BUILDDIR): Do not anymore set this envvar.
* tests/tpm2dtests/defs.scm: Ditto.
--

This simplifies things a bit.
2021-10-01 15:05:01 +02:00
Werner Koch 399ebf6d87
build: Prepare for using installed versions for tests.
* tests/gpgconf.ctl.in: New.
* tests/Makefile.am (EXTRA_DIST): Add new file.
(TESTINST_DIRS): New.
(clean-local): New.
(clean-local-testinst): New.
(check-recursive): New hook.
(bin/gpgconf.ctl): Run a test install.
* tests/cms/Makefile.am (TESTS_ENVIRONMENT): Set new envvar
GNUPG_BUILD_ROOT.
* tests/gpgme/Makefile.am (TESTS_ENVIRONMENT): Ditto.
* tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Ditto.
* tests/pkits/Makefile.am (TESTS_ENVIRONMENT): Ditto.
* tests/tpm2dtests/Makefile.am (TESTS_ENVIRONMENT): Ditto.
--

Right now this helps only with the global configuraion dir which is
now not set and thus the build host'ss own /etc/gnupg does not anymore
affect the build.

Signed-off-by: Werner Koch <wk@gnupg.org>
2021-10-01 14:46:16 +02:00
Damien Goutte-Gattat via Gnupg-devel ad481666ea
build: Fix distcheck when tpm2dtests are run.
* tests/tpm2dtests/Makefile.am (EXTRA_DIST): Distribute test files.
(CLEANFILES): Make sure to remove log files.

Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
2021-03-16 10:56:57 +01:00
James Bottomley a788f2e830
tests:tpm2d: add missing start_sw_tpm.sh script
* tests/tpm2dtests/start_sw_tpm.sh: New.
* tests/tpm2dtests/Makefile.am: Add.
--

This accidentally got left out of the initial commit for testing
6720f1343 ("tpm2d: add tests for the tpm2daemon")

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

Added to Makefile and wrote tiny ChangeLog.

Signed-off-by: Werner Koch <wk@gnupg.org>
2021-03-15 17:09:32 +01:00
James Bottomley 6720f1343a
tpm2d: add tests for the tpm2daemon
* configure.ac: Detect TPM emulator and enable tests.
* tests/tpm2dtests/: New test suite.
* tests/Makefile.am: Run tests.

--
Add a set of tests that exercise tpm2daemon handling of keys and
verify compatibility with non-tpm based keys.

Running this test infrastructure requires a tpm emulator, which is
tested for during configuration.  If an emulator is not found, the
tests won't be run since they require the presence of a TPM (although
the TPM handling code will still be built).

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

- Fixed tests/Makefile.am for make distcheck.

Signed-off-by: Werner Koch <wk@gnupg.org>
2021-03-10 14:29:50 +01:00