summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2008-02-19 13:58:34 +0100
committerWerner Koch <wk@gnupg.org>2008-02-19 13:58:34 +0100
commit898a341f50bd4106f9cbd4d8209681d998bf0d6f (patch)
tree67d290872ed0e85d7d9ad8c0732fb4b9708dc0b0 /tests
parentImprove certificate chain construction. (diff)
downloadgnupg2-898a341f50bd4106f9cbd4d8209681d998bf0d6f.tar.xz
gnupg2-898a341f50bd4106f9cbd4d8209681d998bf0d6f.zip
Fixed release creation.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/Makefile.am10
-rw-r--r--tests/pkits/ChangeLog11
-rw-r--r--tests/pkits/Makefile.am3
-rw-r--r--tests/pkits/common.sh7
-rwxr-xr-xtests/pkits/inittests29
6 files changed, 36 insertions, 28 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 273257aba..c06cfdca6 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-19 Werner Koch <wk@g10code.com>
+
+ * Makefile.am: Always run pkits tests.
+
2008-01-17 Werner Koch <wk@g10code.com>
* asschk.c (read_assuan): Use __func__ instead of __FUNCTION__.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 60f83cd7b..2dc94f3c1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -19,21 +19,13 @@
## Process this file with automake to produce Makefile.in
-#if RUN_PKITS_TESTS
-#pkits = pkits
-#else
-#pkits =
-#endif
-#
-#SUBDIRS = . ${pkits}
-
if RUN_GPG_TESTS
openpgp = openpgp
else
openpgp =
endif
-SUBDIRS = ${openpgp}
+SUBDIRS = ${openpgp} . pkits
GPGSM = ../sm/gpgsm
diff --git a/tests/pkits/ChangeLog b/tests/pkits/ChangeLog
index 34ddfbfa7..a4f35010c 100644
--- a/tests/pkits/ChangeLog
+++ b/tests/pkits/ChangeLog
@@ -1,5 +1,10 @@
2008-02-19 Werner Koch <wk@g10code.com>
+ * inittests: Unpack test data onlyu if available.
+ * common.sh: Skip tests if PKITS test data is not available.
+ * Makefile.am: Do not distribute test data. This allows to
+ include the test suite in the distribution.
+
* signature-verification: New.
* validity-periods: New.
* verifying-name-chaining: New.
@@ -29,15 +34,15 @@
2006-05-02 Werner Koch <wk@g10code.com>
- * PKITS_data.tar.bz2: Repackaged new copy becuase the old one got
- corrupted by the conversion fromCVS to SVN.
+ * PKITS_data.tar.bz2: Repackaged new copy because the old one got
+ corrupted by the conversion from CVS to SVN.
2004-08-16 Werner Koch <wk@g10code.de>
Started implementing PKITS based tests.
- Copyright 2004 Free Software Foundation, Inc.
+ Copyright 2004, 2008 Free Software Foundation, Inc.
This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
diff --git a/tests/pkits/Makefile.am b/tests/pkits/Makefile.am
index 268ad47a3..c78d78617 100644
--- a/tests/pkits/Makefile.am
+++ b/tests/pkits/Makefile.am
@@ -43,7 +43,7 @@ testscripts = import-all-certs validate-all-certs \
private-certificate-extensions
-EXTRA_DIST = PKITS_data.tar.bz2 inittests runtest $(testscripts)
+EXTRA_DIST = inittests runtest common.sh $(testscripts)
import-all-certs.data
TESTS = $(testscripts)
@@ -69,3 +69,4 @@ run-all-tests:
for test in $(testscripts); do \
./$${test} && true; \
done
+
diff --git a/tests/pkits/common.sh b/tests/pkits/common.sh
index 241a0faf7..ecf484419 100644
--- a/tests/pkits/common.sh
+++ b/tests/pkits/common.sh
@@ -1,4 +1,3 @@
-#!/bin/sh
# common.sh - common defs for all tests -*- sh -*-
# Copyright (C) 2004, 2008 Free Software Foundation, Inc.
#
@@ -39,6 +38,12 @@ if [ -n "$GPG_AGENT_INFO" ]; then
exit 1
fi
+if [ -f PKITS_data.tar.bz2 ]; then
+ :
+else
+ # Exit code 77 is used by the makefile for skipping a tests.
+ exit 77
+fi
#--------------------------------
#------ utility functions -------
diff --git a/tests/pkits/inittests b/tests/pkits/inittests
index d9b47bc6d..71041c06b 100755
--- a/tests/pkits/inittests
+++ b/tests/pkits/inittests
@@ -21,17 +21,17 @@ msg msg.sig msg.unsig
[ -z "$srcdir" ] && srcdir=.
[ -z "$GPGSM" ] && GPGSM=../../sm/gpgsm
-if [ -f $srcdir/README ] \
- && grep tests/pkits/README README >/dev/null 2>&1; then
- :
-else
- # During make distclean the Makefile has already been removed,
- # so we need this extra test.
- if ! grep gnupg-test-pkits-directory testdir.stamp >/dev/null 2>&1; then
- echo "inittests: please cd to the tests/pkits directory first" >&2
- exit 1
- fi
-fi
+#if [ -f $srcdir/README ] \
+# && grep tests/pkits/README README >/dev/null 2>&1; then
+# :
+#else
+# # During make distclean the Makefile has already been removed,
+# # so we need this extra test.
+# if ! grep gnupg-test-pkits-directory testdir.stamp >/dev/null 2>&1; then
+# echo "inittests: please cd to the tests/pkits directory first" >&2
+# exit 1
+# fi
+#fi
if [ "$1" = "--clean" ]; then
if [ -d private-keys-v1.d ]; then
@@ -58,11 +58,12 @@ if [ -n "$GPG_AGENT_INFO" ]; then
exit 1
fi
-if ! bunzip2 -c PKITS_data.tar.bz2 | tar xf - ; then
+if test -f PKITS_data.tar.bz2; then
+ if ! bunzip2 -c PKITS_data.tar.bz2 | tar xf - ; then
echo "inittests: failed to untar the test data" >&2
exit 1
-fi
-
+ fi
+fi
# A stamp file used with --clean
echo gnupg-test-pkits-directory > testdir.stamp