Browse Source

tests: Rename subdir gpgsm to cms and move sample dirs.

--

It does not make sense to have the cms stuff at the top level but the
openpgp at a dedicated directory.  This patch fixes that.
master
Werner Koch 3 weeks ago
parent
commit
a8209b001c
No known key found for this signature in database GPG Key ID: E3FDFF218E45B72B
  1. 4
      configure.ac
  2. 45
      tests/Makefile.am
  3. 0
      tests/cms/32100C27173EF6E9C4E9A25D3D69F86D37A4F939
  4. 0
      tests/cms/567064FE6D14A17B2D811ABB407728BC558AA455
  5. 39
      tests/cms/Makefile.am
  6. 10
      tests/cms/all-tests.scm
  7. 0
      tests/cms/cert_cci_sphinx_ca.pem
  8. 0
      tests/cms/cert_cci_test_wzs.pem
  9. 0
      tests/cms/cert_cci_test_zs.pem
  10. 0
      tests/cms/cert_cci_user02.pem
  11. 0
      tests/cms/cert_cci_user03.pem
  12. 0
      tests/cms/cert_cci_user04.pem
  13. 0
      tests/cms/cert_cci_user06.pem
  14. 0
      tests/cms/cert_cci_user07.pem
  15. 0
      tests/cms/cert_dfn_pca01.der
  16. 0
      tests/cms/cert_dfn_pca15.der
  17. 0
      tests/cms/cert_g10code_test1.der
  18. 0
      tests/cms/cert_testpki_testpca.pem
  19. 0
      tests/cms/crl_testpki_testpca.pem
  20. 4
      tests/cms/decrypt.scm
  21. 2
      tests/cms/encrypt.scm
  22. 2
      tests/cms/export.scm
  23. 5
      tests/cms/gpgsm-defs.scm
  24. 4
      tests/cms/import.scm
  25. 4
      tests/cms/inittests
  26. 0
      tests/cms/key_g10code_pete1.pem
  27. 0
      tests/cms/key_g10code_theo1.pem
  28. 0
      tests/cms/plain-1.cms.asc
  29. 0
      tests/cms/plain-2.cms.asc
  30. 0
      tests/cms/plain-3.cms.asc
  31. 0
      tests/cms/plain-large.cms.asc
  32. 12
      tests/cms/run-tests.scm
  33. 0
      tests/cms/runtest
  34. 0
      tests/cms/samplekeys/32100C27173EF6E9C4E9A25D3D69F86D37A4F939.key
  35. 0
      tests/cms/samplekeys/68A638998DFABAC510EA645CE34F9686B2EDF7EA.key
  36. 0
      tests/cms/samplekeys/8D6D17B4B94BBE8304926C016D2C5C7805EB6705.key
  37. 0
      tests/cms/samplekeys/README
  38. 0
      tests/cms/samplekeys/cert-with-117-akas.pem
  39. 0
      tests/cms/samplekeys/cert_g10code_enconly_1.pem
  40. 0
      tests/cms/samplekeys/cert_g10code_pete1.pem
  41. 0
      tests/cms/samplekeys/cert_g10code_test1.pem
  42. 0
      tests/cms/samplekeys/cert_g10code_test_ca.pem
  43. 0
      tests/cms/samplekeys/cert_g10code_theo1.pem
  44. 0
      tests/cms/samplekeys/cryptlib-key.p12
  45. 0
      tests/cms/samplekeys/gte.pem
  46. 0
      tests/cms/samplekeys/opensc-test.p12
  47. 0
      tests/cms/samplekeys/ossl-rentec-user.pem
  48. 0
      tests/cms/samplekeys/ov-server.p12
  49. 0
      tests/cms/samplekeys/ov-user.p12
  50. 0
      tests/cms/samplekeys/steed-self-signing-nonthority.pem
  51. 0
      tests/cms/samplekeys/webdeca.der
  52. 0
      tests/cms/samplekeys/webderoot.der
  53. 0
      tests/cms/samplemsgs/webde-buenemann-signed.cms
  54. 2
      tests/cms/setup.scm
  55. 2
      tests/cms/shell.scm
  56. 2
      tests/cms/sign.scm
  57. 0
      tests/cms/skey_g10code_test1.pem
  58. 0
      tests/cms/sm-sign+verify
  59. 0
      tests/cms/sm-verify
  60. 0
      tests/cms/text-1.dsig.pem
  61. 0
      tests/cms/text-1.osig-bad.pem
  62. 0
      tests/cms/text-1.osig-badusage.pem
  63. 0
      tests/cms/text-1.osig.pem
  64. 0
      tests/cms/text-1.txt
  65. 0
      tests/cms/text-2.osig-bad.pem
  66. 0
      tests/cms/text-2.osig.pem
  67. 0
      tests/cms/text-2.txt
  68. 0
      tests/cms/text-3.txt
  69. 2
      tests/cms/verify.scm
  70. 2
      tests/run-tests.scm

4
configure.ac

@ -2144,9 +2144,9 @@ doc/Makefile
tests/Makefile
tests/gpgscm/Makefile
tests/openpgp/Makefile
tests/tpm2dtests/Makefile
tests/cms/Makefile
tests/migrations/Makefile
tests/gpgsm/Makefile
tests/tpm2dtests/Makefile
tests/gpgme/Makefile
tests/pkits/Makefile
g10/gpg.w32-manifest

45
tests/Makefile.am

@ -24,60 +24,23 @@ else
tpm2dtests =
endif
SUBDIRS = gpgscm openpgp migrations gpgsm gpgme pkits $(tpm2dtests) .
SUBDIRS = gpgscm openpgp cms migrations gpgme pkits $(tpm2dtests) .
GPGSM = ../sm/gpgsm
# Note that we need to use /bin/pwd so that we don't get into trouble
# if the shell used for inittests would uses an internal version of
# pwd which handles symlinks differently.
TESTS_ENVIRONMENT = GNUPGHOME=`/bin/pwd` GPG_AGENT_INFO= LC_ALL=C \
GPGSM="$(GPGSM)" "$(srcdir)/runtest"
testscripts = sm-sign+verify sm-verify
EXTRA_DIST = runtest inittests $(testscripts) ChangeLog-2011 \
text-1.txt text-2.txt text-3.txt \
text-1.osig.pem text-1.dsig.pem text-1.osig-bad.pem \
text-2.osig.pem text-2.osig-bad.pem \
EXTRA_DIST = run-tests.scm \
fake-pinentries/README.txt \
fake-pinentries/fake-pinentry.php \
fake-pinentries/fake-pinentry.pl \
fake-pinentries/fake-pinentry.py \
fake-pinentries/fake-pinentry.sh \
samplekeys/steed-self-signing-nonthority.pem \
samplekeys/68A638998DFABAC510EA645CE34F9686B2EDF7EA.key \
samplekeys/32100C27173EF6E9C4E9A25D3D69F86D37A4F939.key \
samplekeys/cert_g10code_pete1.pem \
samplekeys/cert_g10code_test1.pem \
samplekeys/cert_g10code_theo1.pem \
run-tests.scm
# We used to run $(testscripts) here but these asschk scripts are not
# completely reliable in all environments and thus we better disable
# them. The tests are anyway way too minimal. We will eventually
# write new tests based on gpg-connect-agent which has a full fledged
# script language and thus makes it far easier to write tests than to
# use that low-level asschk stuff.
TESTS =
ChangeLog-2011
CLEANFILES = inittests.stamp x y y z out err \
*.lock .\#lk*
DISTCLEANFILES = pubring.kbx~ random_seed
CLEANFILES = x y z out err
if !HAVE_W32_SYSTEM
noinst_PROGRAMS = asschk
endif
asschk_SOURCES = asschk.c
all-local: inittests.stamp
clean-local:
srcdir=$(srcdir) $(TESTS_ENVIRONMENT) $(srcdir)/inittests --clean
inittests.stamp: inittests
srcdir=$(srcdir) $(TESTS_ENVIRONMENT) $(srcdir)/inittests
echo timestamp >./inittests.stamp

0
tests/gpgsm/32100C27173EF6E9C4E9A25D3D69F86D37A4F939 → tests/cms/32100C27173EF6E9C4E9A25D3D69F86D37A4F939

0
tests/567064FE6D14A17B2D811ABB407728BC558AA455 → tests/cms/567064FE6D14A17B2D811ABB407728BC558AA455

39
tests/gpgsm/Makefile.am → tests/cms/Makefile.am

@ -28,6 +28,12 @@ include $(top_srcdir)/am/cmacros.am
AM_CFLAGS =
# Note that we need to use /bin/pwd so that we don't get into trouble
# if the shell used for inittests would uses an internal version of
# pwd which handles symlinks differently.
OLD_TESTS_ENVIRONMENT = GNUPGHOME=`/bin/pwd` GPG_AGENT_INFO= LC_ALL=C \
GPGSM="$(GPGSM)" "$(srcdir)/runtest"
TESTS_ENVIRONMENT = LC_ALL=C \
EXEEXT=$(EXEEXT) \
PATH="../gpgscm:$(PATH)" \
@ -65,11 +71,38 @@ TEST_FILES = plain-1.cms.asc \
plain-3.cms.asc \
plain-large.cms.asc
# We used to run $(testscripts) here but these asschk scripts are not
# completely reliable in all environments and thus we better disable
# them. The tests are anyway way too minimal. We will eventually
# write new tests based on gpg-connect-agent which has a full fledged
# script language and thus makes it far easier to write tests than to
# use that low-level asschk stuff.
testscripts = sm-sign+verify sm-verify
EXTRA_DIST = $(XTESTS) $(KEYS) $(CERTS) $(TEST_FILES) \
gpgsm-defs.scm run-tests.scm setup.scm all-tests.scm
samplekeys/steed-self-signing-nonthority.pem \
samplekeys/68A638998DFABAC510EA645CE34F9686B2EDF7EA.key \
samplekeys/32100C27173EF6E9C4E9A25D3D69F86D37A4F939.key \
samplekeys/cert_g10code_pete1.pem \
samplekeys/cert_g10code_test1.pem \
samplekeys/cert_g10code_theo1.pem \
text-1.txt text-2.txt text-3.txt \
text-1.osig.pem text-1.dsig.pem text-1.osig-bad.pem \
text-2.osig.pem text-2.osig-bad.pem \
runtest inittests $(testscripts) \
gpgsm-defs.scm run-tests.scm setup.scm all-tests.scm
CLEANFILES = inittests.stamp *.lock *.log report.xml .\#lk*
CLEANFILES = *.log report.xml
DISTCLEANFILES = pubring.kbx~ random_seed
# We need to depend on a couple of programs so that the tests don't
# start before all programs are built.
all-local: $(required_pgms)
all-local: $(required_pgms) inittests.stamp
clean-local:
srcdir=$(srcdir) $(OLD_TESTS_ENVIRONMENT) $(srcdir)/inittests --clean
inittests.stamp: inittests
srcdir=$(srcdir) $(OLD_TESTS_ENVIRONMENT) $(srcdir)/inittests
echo timestamp >./inittests.stamp

10
tests/gpgsm/all-tests.scm → tests/cms/all-tests.scm

@ -30,14 +30,14 @@
(make-environment-cache
(test::scm
#f
(path-join "tests" "gpgsm" "setup.scm")
(in-srcdir "tests" "gpgsm" "setup.scm")
(path-join "tests" "cms" "setup.scm")
(in-srcdir "tests" "cms" "setup.scm")
"--" "tests" "gpg")))
(map (lambda (name)
(test::scm setup
(path-join "tests" "gpgsm" name)
(in-srcdir "tests" "gpgsm" name)))
(parse-makefile-expand (in-srcdir "tests" "gpgsm" "Makefile.am")
(path-join "tests" "cms" name)
(in-srcdir "tests" "cms" name)))
(parse-makefile-expand (in-srcdir "tests" "cms" "Makefile.am")
(lambda (filename port key) (parse-makefile port key))
"XTESTS")))

0
tests/cert_cci_sphinx_ca.pem → tests/cms/cert_cci_sphinx_ca.pem

0
tests/cert_cci_test_wzs.pem → tests/cms/cert_cci_test_wzs.pem

0
tests/cert_cci_test_zs.pem → tests/cms/cert_cci_test_zs.pem

0
tests/cert_cci_user02.pem → tests/cms/cert_cci_user02.pem

0
tests/cert_cci_user03.pem → tests/cms/cert_cci_user03.pem

0
tests/cert_cci_user04.pem → tests/cms/cert_cci_user04.pem

0
tests/cert_cci_user06.pem → tests/cms/cert_cci_user06.pem

0
tests/cert_cci_user07.pem → tests/cms/cert_cci_user07.pem

0
tests/gpgsm/cert_dfn_pca01.der → tests/cms/cert_dfn_pca01.der

0
tests/gpgsm/cert_dfn_pca15.der → tests/cms/cert_dfn_pca15.der

0
tests/gpgsm/cert_g10code_test1.der → tests/cms/cert_g10code_test1.der

0
tests/cert_testpki_testpca.pem → tests/cms/cert_testpki_testpca.pem

0
tests/crl_testpki_testpca.pem → tests/cms/crl_testpki_testpca.pem

4
tests/gpgsm/decrypt.scm → tests/cms/decrypt.scm

@ -17,14 +17,14 @@
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
(load (in-srcdir "tests" "cms" "gpgsm-defs.scm"))
(setup-gpgsm-environment)
(for-each-p
"Checking decryption of supplied files."
(lambda (name)
(tr:do
(tr:open (in-srcdir "tests" "gpgsm" (string-append name ".cms.asc")))
(tr:open (in-srcdir "tests" "cms" (string-append name ".cms.asc")))
(tr:gpgsm "" '(--decrypt))
(tr:assert-identity name)))
plain-files)

2
tests/gpgsm/encrypt.scm → tests/cms/encrypt.scm

@ -17,7 +17,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
(load (in-srcdir "tests" "cms" "gpgsm-defs.scm"))
(setup-gpgsm-environment)
(for-each-p

2
tests/gpgsm/export.scm → tests/cms/export.scm

@ -17,7 +17,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
(load (in-srcdir "tests" "cms" "gpgsm-defs.scm"))
(setup-gpgsm-environment)
(for-each-p'

5
tests/gpgsm/gpgsm-defs.scm → tests/cms/gpgsm-defs.scm

@ -78,13 +78,14 @@
(log "Storing private keys")
(for-each
(lambda (name)
(file-copy (in-srcdir "tests" "gpgsm" name)
(file-copy (in-srcdir "tests" "cms" name)
(path-join "private-keys-v1.d"
(string-append name ".key"))))
'("32100C27173EF6E9C4E9A25D3D69F86D37A4F939"))
(log "Importing public demo and test keys")
(call-check `(,@gpgsm --import ,(in-srcdir "tests" "gpgsm" "cert_g10code_test1.der")))
(call-check `(,@gpgsm --import ,(in-srcdir "tests" "cms"
"cert_g10code_test1.der")))
(create-sample-files)
(stop-agent))

4
tests/gpgsm/import.scm → tests/cms/import.scm

@ -17,7 +17,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
(load (in-srcdir "tests" "cms" "gpgsm-defs.scm"))
(setup-gpgsm-environment)
(define certs-for-import
@ -47,7 +47,7 @@
"Checking certificate import."
(lambda (test)
(assert (not (sm-have-public-key? (:cert test))))
(call-check `(,@gpgsm --import ,(in-srcdir "tests" "gpgsm" (:name test))))
(call-check `(,@gpgsm --import ,(in-srcdir "tests" "cms" (:name test))))
(assert (sm-have-public-key? (:cert test))))
(lambda (test) (:name test))
certs-for-import)

4
tests/inittests → tests/cms/inittests

@ -28,10 +28,10 @@ msg msg.sig msg.unsig
[ -z "$srcdir" ] && srcdir=.
[ -z "$GPGSM" ] && GPGSM=../sm/gpgsm
[ -z "$GPGSM" ] && GPGSM=../../sm/gpgsm
if [ -d $srcdir/samplekeys ] \
&& grep TESTS_ENVIRONMENT Makefile >/dev/null 2>&1; then
&& grep OLD_TESTS_ENVIRONMENT Makefile >/dev/null 2>&1; then
:
else
# During make distclean the Makefile has already been removed,

0
tests/key_g10code_pete1.pem → tests/cms/key_g10code_pete1.pem

0
tests/key_g10code_theo1.pem → tests/cms/key_g10code_theo1.pem

0
tests/gpgsm/plain-1.cms.asc → tests/cms/plain-1.cms.asc

0
tests/gpgsm/plain-2.cms.asc → tests/cms/plain-2.cms.asc

0
tests/gpgsm/plain-3.cms.asc → tests/cms/plain-3.cms.asc

0
tests/gpgsm/plain-large.cms.asc → tests/cms/plain-large.cms.asc

12
tests/gpgsm/run-tests.scm → tests/cms/run-tests.scm

@ -20,7 +20,7 @@
(if (string=? "" (getenv "abs_top_srcdir"))
(begin
(echo "Environment variable 'abs_top_srcdir' not set. Please point it to"
"tests/gpgsm.")
"tests/cms.")
(exit 2)))
(define tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))
@ -28,12 +28,12 @@
(define setup
(make-environment-cache (test::scm
#f
(path-join "tests" "gpgsm" "setup.scm")
(in-srcdir "tests" "gpgsm" "setup.scm"))))
(path-join "tests" "cms" "setup.scm")
(in-srcdir "tests" "cms" "setup.scm"))))
(run-tests (if (null? tests)
(load-tests "tests" "gpgsm")
(load-tests "tests" "cms")
(map (lambda (name)
(test::scm setup
(path-join "tests" "gpgsm" name)
(in-srcdir "tests" "gpgsm" name))) tests)))
(path-join "tests" "cms" name)
(in-srcdir "tests" "cms" name))) tests)))

0
tests/runtest → tests/cms/runtest

0
tests/samplekeys/32100C27173EF6E9C4E9A25D3D69F86D37A4F939.key → tests/cms/samplekeys/32100C27173EF6E9C4E9A25D3D69F86D37A4F939.key

0
tests/samplekeys/68A638998DFABAC510EA645CE34F9686B2EDF7EA.key → tests/cms/samplekeys/68A638998DFABAC510EA645CE34F9686B2EDF7EA.key

0
tests/samplekeys/8D6D17B4B94BBE8304926C016D2C5C7805EB6705.key → tests/cms/samplekeys/8D6D17B4B94BBE8304926C016D2C5C7805EB6705.key

0
tests/samplekeys/README → tests/cms/samplekeys/README

0
tests/samplekeys/cert-with-117-akas.pem → tests/cms/samplekeys/cert-with-117-akas.pem

0
tests/samplekeys/cert_g10code_enconly_1.pem → tests/cms/samplekeys/cert_g10code_enconly_1.pem

0
tests/samplekeys/cert_g10code_pete1.pem → tests/cms/samplekeys/cert_g10code_pete1.pem

0
tests/samplekeys/cert_g10code_test1.pem → tests/cms/samplekeys/cert_g10code_test1.pem

0
tests/samplekeys/cert_g10code_test_ca.pem → tests/cms/samplekeys/cert_g10code_test_ca.pem

0
tests/samplekeys/cert_g10code_theo1.pem → tests/cms/samplekeys/cert_g10code_theo1.pem

0
tests/samplekeys/cryptlib-key.p12 → tests/cms/samplekeys/cryptlib-key.p12

0
tests/samplekeys/gte.pem → tests/cms/samplekeys/gte.pem

0
tests/samplekeys/opensc-test.p12 → tests/cms/samplekeys/opensc-test.p12

0
tests/samplekeys/ossl-rentec-user.pem → tests/cms/samplekeys/ossl-rentec-user.pem

0
tests/samplekeys/ov-server.p12 → tests/cms/samplekeys/ov-server.p12

0
tests/samplekeys/ov-user.p12 → tests/cms/samplekeys/ov-user.p12

0
tests/samplekeys/steed-self-signing-nonthority.pem → tests/cms/samplekeys/steed-self-signing-nonthority.pem

0
tests/samplekeys/webdeca.der → tests/cms/samplekeys/webdeca.der

0
tests/samplekeys/webderoot.der → tests/cms/samplekeys/webderoot.der

0
tests/samplemsgs/webde-buenemann-signed.cms → tests/cms/samplemsgs/webde-buenemann-signed.cms

2
tests/gpgsm/setup.scm → tests/cms/setup.scm

@ -17,7 +17,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
(load (in-srcdir "tests" "cms" "gpgsm-defs.scm"))
(define tarball (flag "--create-tarball" *args*))
(unless (and tarball (not (null? tarball)))

2
tests/gpgsm/shell.scm → tests/cms/shell.scm

@ -17,7 +17,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
(load (in-srcdir "tests" "cms" "gpgsm-defs.scm"))
(setup-gpgsm-environment)
;; This is not a test, but can be used to inspect the test

2
tests/gpgsm/sign.scm → tests/cms/sign.scm

@ -17,7 +17,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
(load (in-srcdir "tests" "cms" "gpgsm-defs.scm"))
(setup-gpgsm-environment)
(for-each-p

0
tests/skey_g10code_test1.pem → tests/cms/skey_g10code_test1.pem

0
tests/sm-sign+verify → tests/cms/sm-sign+verify

0
tests/sm-verify → tests/cms/sm-verify

0
tests/text-1.dsig.pem → tests/cms/text-1.dsig.pem

0
tests/text-1.osig-bad.pem → tests/cms/text-1.osig-bad.pem

0
tests/text-1.osig-badusage.pem → tests/cms/text-1.osig-badusage.pem

0
tests/text-1.osig.pem → tests/cms/text-1.osig.pem

0
tests/text-1.txt → tests/cms/text-1.txt

0
tests/text-2.osig-bad.pem → tests/cms/text-2.osig-bad.pem

0
tests/text-2.osig.pem → tests/cms/text-2.osig.pem

0
tests/text-2.txt → tests/cms/text-2.txt

0
tests/text-3.txt → tests/cms/text-3.txt

2
tests/gpgsm/verify.scm → tests/cms/verify.scm

@ -17,7 +17,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
(load (in-srcdir "tests" "gpgsm" "gpgsm-defs.scm"))
(load (in-srcdir "tests" "cms" "gpgsm-defs.scm"))
(setup-gpgsm-environment)
;;

2
tests/run-tests.scm

@ -34,8 +34,8 @@
(load-tests-with-log "g13")
(load-tests-with-log "agent")
(load-tests-with-log "tests" "openpgp")
(load-tests-with-log "tests" "cms")
(load-tests-with-log "tests" "migrations")
(load-tests-with-log "tests" "gpgsm")
(load-tests-with-log "tests" "gpgme"))))
(run-tests (if prefix
(filter

Loading…
Cancel
Save