1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

tests:tpm2dtests: Fix tests with TPM2D.

* tests/tpm2dtests/Makefile.am (TESTS_ENVIRONMENT): Fix.
* tests/tpm2dtests/all-tests.scm: Follow the change of gpgscm.
* tests/tpm2dtests/run-tests.scm: Likewise.

--

GnuPG-bug-id: 6052
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-10-03 11:53:00 +09:00
parent 4206d89003
commit 321f9c0a3f
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054
3 changed files with 16 additions and 11 deletions

View File

@ -34,10 +34,10 @@ TESTS_ENVIRONMENT = LC_ALL=C \
PATH="../gpgscm:$(PATH)" \
abs_top_srcdir="$(abs_top_srcdir)" \
objdir="$(abs_top_builddir)" \
TPMSERVER="$(TPMSERVER)" \
TPMSERVER="$(TPMSERVER)" TSSSTARTUP="$(TSSSTARTUP)" \
SWTPM="$(SWTPM)" \
SWTPM_IOCTL="$(SWTPM_IOCTL)" \
GNUPG_BUILD_ROOT="$(abs_top_builddir)/tests" \
GNUPG_BUILD_ROOT="$(abs_top_builddir)" \
GNUPG_IN_TEST_SUITE=fact \
GPGSCM_PATH="$(abs_top_srcdir)/tests/gpgscm"

View File

@ -30,8 +30,9 @@
(make-environment-cache
(test::scm
#f
(path-join "tests" "openpgp" "setup.scm")
(in-srcdir "tests" "openpgp" "setup.scm"))))
#f
(path-join "tests" "tpm2dtests" "setup.scm")
(in-srcdir "tests" "tpm2dtests" "setup.scm"))))
(define (qualify path variant)
(string-append "<" variant ">" path))
@ -40,8 +41,9 @@
(make-environment-cache
(test::scm
#f
(qualify (path-join "tests" "openpgp" "setup.scm") variant)
(in-srcdir "tests" "openpgp" "setup.scm")
variant
(path-join "tests" "tpm2dtests" "setup.scm")
(in-srcdir "tests" "tpm2dtests" "setup.scm")
(string-append "--" variant))))
(define setup-use-keyring (setup* "use-keyring"))
@ -55,7 +57,8 @@
(define tests
(map (lambda (name)
(test::scm setup
(qualify (path-join "tests" "tpm2dtests" name) "standard")
"standards"
(path-join "tests" "tpm2dtests" name)
(in-srcdir "tests" "tpm2dtests" name))) all-tests))
(when *run-all-tests*
@ -65,15 +68,15 @@
;; The second pass uses the keyboxd
(map (lambda (name)
(test::scm setup-use-keyboxd
(qualify (path-join "tests" "tpm2dtests" name)
"keyboxd")
"keyboxd"
(path-join "tests" "tpm2dtests" name)
(in-srcdir "tests" "tpm2dtests" name)
"--use-keyboxd")) all-tests)
;; The third pass uses the legact pubring.gpg
(map (lambda (name)
(test::scm setup-use-keyring
(qualify (path-join "tests" "tpm2dtests" name)
"keyring")
"keyring"
(path-join "tests" "tpm2dtests" name)
(in-srcdir "tests" "tpm2dtests" name)
"--use-keyring")) all-tests)
)))

View File

@ -28,6 +28,7 @@
(define setup
(make-environment-cache (test::scm
#f
#f
(path-join "tests" "tpm2dtests" "setup.scm")
(in-srcdir "tests" "tpm2dtests" "setup.scm"))))
@ -38,6 +39,7 @@
(load-tests "tests" "tpm2dtests")
(map (lambda (name)
(test::scm setup
#f
(path-join "tests" "tpm2dtests" name)
(in-srcdir "tests" "tpm2dtests" name)
"--use-keyring")) tests)))