mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
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.
This commit is contained in:
parent
31c0aa2ff3
commit
a8209b001c
@ -2144,9 +2144,9 @@ doc/Makefile
|
|||||||
tests/Makefile
|
tests/Makefile
|
||||||
tests/gpgscm/Makefile
|
tests/gpgscm/Makefile
|
||||||
tests/openpgp/Makefile
|
tests/openpgp/Makefile
|
||||||
tests/tpm2dtests/Makefile
|
tests/cms/Makefile
|
||||||
tests/migrations/Makefile
|
tests/migrations/Makefile
|
||||||
tests/gpgsm/Makefile
|
tests/tpm2dtests/Makefile
|
||||||
tests/gpgme/Makefile
|
tests/gpgme/Makefile
|
||||||
tests/pkits/Makefile
|
tests/pkits/Makefile
|
||||||
g10/gpg.w32-manifest
|
g10/gpg.w32-manifest
|
||||||
|
@ -24,60 +24,23 @@ else
|
|||||||
tpm2dtests =
|
tpm2dtests =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS = gpgscm openpgp migrations gpgsm gpgme pkits $(tpm2dtests) .
|
SUBDIRS = gpgscm openpgp cms migrations gpgme pkits $(tpm2dtests) .
|
||||||
|
|
||||||
GPGSM = ../sm/gpgsm
|
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 = run-tests.scm \
|
||||||
|
|
||||||
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 \
|
|
||||||
fake-pinentries/README.txt \
|
fake-pinentries/README.txt \
|
||||||
fake-pinentries/fake-pinentry.php \
|
fake-pinentries/fake-pinentry.php \
|
||||||
fake-pinentries/fake-pinentry.pl \
|
fake-pinentries/fake-pinentry.pl \
|
||||||
fake-pinentries/fake-pinentry.py \
|
fake-pinentries/fake-pinentry.py \
|
||||||
fake-pinentries/fake-pinentry.sh \
|
fake-pinentries/fake-pinentry.sh \
|
||||||
samplekeys/steed-self-signing-nonthority.pem \
|
ChangeLog-2011
|
||||||
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
|
CLEANFILES = x y z out err
|
||||||
# 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 =
|
|
||||||
|
|
||||||
CLEANFILES = inittests.stamp x y y z out err \
|
|
||||||
*.lock .\#lk*
|
|
||||||
|
|
||||||
DISTCLEANFILES = pubring.kbx~ random_seed
|
|
||||||
|
|
||||||
if !HAVE_W32_SYSTEM
|
if !HAVE_W32_SYSTEM
|
||||||
noinst_PROGRAMS = asschk
|
noinst_PROGRAMS = asschk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
asschk_SOURCES = asschk.c
|
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
|
|
||||||
|
@ -28,6 +28,12 @@ include $(top_srcdir)/am/cmacros.am
|
|||||||
|
|
||||||
AM_CFLAGS =
|
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 \
|
TESTS_ENVIRONMENT = LC_ALL=C \
|
||||||
EXEEXT=$(EXEEXT) \
|
EXEEXT=$(EXEEXT) \
|
||||||
PATH="../gpgscm:$(PATH)" \
|
PATH="../gpgscm:$(PATH)" \
|
||||||
@ -65,11 +71,38 @@ TEST_FILES = plain-1.cms.asc \
|
|||||||
plain-3.cms.asc \
|
plain-3.cms.asc \
|
||||||
plain-large.cms.asc
|
plain-large.cms.asc
|
||||||
|
|
||||||
EXTRA_DIST = $(XTESTS) $(KEYS) $(CERTS) $(TEST_FILES) \
|
# We used to run $(testscripts) here but these asschk scripts are not
|
||||||
gpgsm-defs.scm run-tests.scm setup.scm all-tests.scm
|
# 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
|
||||||
|
|
||||||
CLEANFILES = *.log report.xml
|
EXTRA_DIST = $(XTESTS) $(KEYS) $(CERTS) $(TEST_FILES) \
|
||||||
|
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*
|
||||||
|
|
||||||
|
DISTCLEANFILES = pubring.kbx~ random_seed
|
||||||
|
|
||||||
# We need to depend on a couple of programs so that the tests don't
|
# We need to depend on a couple of programs so that the tests don't
|
||||||
# start before all programs are built.
|
# 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
|
@ -30,14 +30,14 @@
|
|||||||
(make-environment-cache
|
(make-environment-cache
|
||||||
(test::scm
|
(test::scm
|
||||||
#f
|
#f
|
||||||
(path-join "tests" "gpgsm" "setup.scm")
|
(path-join "tests" "cms" "setup.scm")
|
||||||
(in-srcdir "tests" "gpgsm" "setup.scm")
|
(in-srcdir "tests" "cms" "setup.scm")
|
||||||
"--" "tests" "gpg")))
|
"--" "tests" "gpg")))
|
||||||
|
|
||||||
(map (lambda (name)
|
(map (lambda (name)
|
||||||
(test::scm setup
|
(test::scm setup
|
||||||
(path-join "tests" "gpgsm" name)
|
(path-join "tests" "cms" name)
|
||||||
(in-srcdir "tests" "gpgsm" name)))
|
(in-srcdir "tests" "cms" name)))
|
||||||
(parse-makefile-expand (in-srcdir "tests" "gpgsm" "Makefile.am")
|
(parse-makefile-expand (in-srcdir "tests" "cms" "Makefile.am")
|
||||||
(lambda (filename port key) (parse-makefile port key))
|
(lambda (filename port key) (parse-makefile port key))
|
||||||
"XTESTS")))
|
"XTESTS")))
|
@ -17,14 +17,14 @@
|
|||||||
;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
|
;; 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)
|
(setup-gpgsm-environment)
|
||||||
|
|
||||||
(for-each-p
|
(for-each-p
|
||||||
"Checking decryption of supplied files."
|
"Checking decryption of supplied files."
|
||||||
(lambda (name)
|
(lambda (name)
|
||||||
(tr:do
|
(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:gpgsm "" '(--decrypt))
|
||||||
(tr:assert-identity name)))
|
(tr:assert-identity name)))
|
||||||
plain-files)
|
plain-files)
|
@ -17,7 +17,7 @@
|
|||||||
;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
|
;; 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)
|
(setup-gpgsm-environment)
|
||||||
|
|
||||||
(for-each-p
|
(for-each-p
|
@ -17,7 +17,7 @@
|
|||||||
;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
|
;; 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)
|
(setup-gpgsm-environment)
|
||||||
|
|
||||||
(for-each-p'
|
(for-each-p'
|
@ -78,13 +78,14 @@
|
|||||||
(log "Storing private keys")
|
(log "Storing private keys")
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (name)
|
(lambda (name)
|
||||||
(file-copy (in-srcdir "tests" "gpgsm" name)
|
(file-copy (in-srcdir "tests" "cms" name)
|
||||||
(path-join "private-keys-v1.d"
|
(path-join "private-keys-v1.d"
|
||||||
(string-append name ".key"))))
|
(string-append name ".key"))))
|
||||||
'("32100C27173EF6E9C4E9A25D3D69F86D37A4F939"))
|
'("32100C27173EF6E9C4E9A25D3D69F86D37A4F939"))
|
||||||
|
|
||||||
(log "Importing public demo and test keys")
|
(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)
|
(create-sample-files)
|
||||||
(stop-agent))
|
(stop-agent))
|
@ -17,7 +17,7 @@
|
|||||||
;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
|
;; 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)
|
(setup-gpgsm-environment)
|
||||||
|
|
||||||
(define certs-for-import
|
(define certs-for-import
|
||||||
@ -47,7 +47,7 @@
|
|||||||
"Checking certificate import."
|
"Checking certificate import."
|
||||||
(lambda (test)
|
(lambda (test)
|
||||||
(assert (not (sm-have-public-key? (:cert 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))))
|
(assert (sm-have-public-key? (:cert test))))
|
||||||
(lambda (test) (:name test))
|
(lambda (test) (:name test))
|
||||||
certs-for-import)
|
certs-for-import)
|
@ -28,10 +28,10 @@ msg msg.sig msg.unsig
|
|||||||
|
|
||||||
|
|
||||||
[ -z "$srcdir" ] && srcdir=.
|
[ -z "$srcdir" ] && srcdir=.
|
||||||
[ -z "$GPGSM" ] && GPGSM=../sm/gpgsm
|
[ -z "$GPGSM" ] && GPGSM=../../sm/gpgsm
|
||||||
|
|
||||||
if [ -d $srcdir/samplekeys ] \
|
if [ -d $srcdir/samplekeys ] \
|
||||||
&& grep TESTS_ENVIRONMENT Makefile >/dev/null 2>&1; then
|
&& grep OLD_TESTS_ENVIRONMENT Makefile >/dev/null 2>&1; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
# During make distclean the Makefile has already been removed,
|
# During make distclean the Makefile has already been removed,
|
@ -20,7 +20,7 @@
|
|||||||
(if (string=? "" (getenv "abs_top_srcdir"))
|
(if (string=? "" (getenv "abs_top_srcdir"))
|
||||||
(begin
|
(begin
|
||||||
(echo "Environment variable 'abs_top_srcdir' not set. Please point it to"
|
(echo "Environment variable 'abs_top_srcdir' not set. Please point it to"
|
||||||
"tests/gpgsm.")
|
"tests/cms.")
|
||||||
(exit 2)))
|
(exit 2)))
|
||||||
|
|
||||||
(define tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))
|
(define tests (filter (lambda (arg) (not (string-prefix? arg "--"))) *args*))
|
||||||
@ -28,12 +28,12 @@
|
|||||||
(define setup
|
(define setup
|
||||||
(make-environment-cache (test::scm
|
(make-environment-cache (test::scm
|
||||||
#f
|
#f
|
||||||
(path-join "tests" "gpgsm" "setup.scm")
|
(path-join "tests" "cms" "setup.scm")
|
||||||
(in-srcdir "tests" "gpgsm" "setup.scm"))))
|
(in-srcdir "tests" "cms" "setup.scm"))))
|
||||||
|
|
||||||
(run-tests (if (null? tests)
|
(run-tests (if (null? tests)
|
||||||
(load-tests "tests" "gpgsm")
|
(load-tests "tests" "cms")
|
||||||
(map (lambda (name)
|
(map (lambda (name)
|
||||||
(test::scm setup
|
(test::scm setup
|
||||||
(path-join "tests" "gpgsm" name)
|
(path-join "tests" "cms" name)
|
||||||
(in-srcdir "tests" "gpgsm" name))) tests)))
|
(in-srcdir "tests" "cms" name))) tests)))
|
@ -17,7 +17,7 @@
|
|||||||
;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
|
;; 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*))
|
(define tarball (flag "--create-tarball" *args*))
|
||||||
(unless (and tarball (not (null? tarball)))
|
(unless (and tarball (not (null? tarball)))
|
@ -17,7 +17,7 @@
|
|||||||
;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
|
;; 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)
|
(setup-gpgsm-environment)
|
||||||
|
|
||||||
;; This is not a test, but can be used to inspect the test
|
;; This is not a test, but can be used to inspect the test
|
@ -17,7 +17,7 @@
|
|||||||
;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
|
;; 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)
|
(setup-gpgsm-environment)
|
||||||
|
|
||||||
(for-each-p
|
(for-each-p
|
@ -17,7 +17,7 @@
|
|||||||
;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
|
;; 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)
|
(setup-gpgsm-environment)
|
||||||
|
|
||||||
;;
|
;;
|
@ -34,8 +34,8 @@
|
|||||||
(load-tests-with-log "g13")
|
(load-tests-with-log "g13")
|
||||||
(load-tests-with-log "agent")
|
(load-tests-with-log "agent")
|
||||||
(load-tests-with-log "tests" "openpgp")
|
(load-tests-with-log "tests" "openpgp")
|
||||||
|
(load-tests-with-log "tests" "cms")
|
||||||
(load-tests-with-log "tests" "migrations")
|
(load-tests-with-log "tests" "migrations")
|
||||||
(load-tests-with-log "tests" "gpgsm")
|
|
||||||
(load-tests-with-log "tests" "gpgme"))))
|
(load-tests-with-log "tests" "gpgme"))))
|
||||||
(run-tests (if prefix
|
(run-tests (if prefix
|
||||||
(filter
|
(filter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user