aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-04-24 15:36:17 +0300
committerSergey Poznyakoff <gray@gnu.org>2020-04-24 15:36:17 +0300
commit58650b2c5be04a59a5725c683ca5a6f8a0e44243 (patch)
treeeca1bb165e2b679f1cc6129598cee0e15e3d6d21
parent28cc55100c42c214a1af09756ad45626646f3054 (diff)
downloadwydawca-58650b2c5be04a59a5725c683ca5a6f8a0e44243.tar.gz
wydawca-58650b2c5be04a59a5725c683ca5a6f8a0e44243.tar.bz2
Fix the gpg2 version requirement. Document changes to the testsuite
-rw-r--r--NEWS8
-rw-r--r--configure.ac35
-rw-r--r--tests/atlocal.in5
-rw-r--r--tests/testsuite.at3
4 files changed, 39 insertions, 12 deletions
diff --git a/NEWS b/NEWS
index eaa80ba..efbf23d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-Wydawca NEWS -- history of user-visible changes. 2020-04-23
+Wydawca NEWS -- history of user-visible changes. 2020-04-24
See the end of file for copying conditions.
Please send Wydawca bug reports to <bug-wydawca@gnu.org.ua>.
@@ -84,6 +84,12 @@ where TAG is the spool tag and TM is one of "user", "real", "system".
E.g.: ${timer:spool:release:system} expands to the system time spent
while processing the "release" spool.
+* Testsuite completely rewritten
+
+Hopefully it provides a better coverage.
+Testsuite requires GNU Privacy Guard 2.1 or later. If it is not
+available, most tests will be disabled.
+
Version 3.1, 2020-03-13
diff --git a/configure.ac b/configure.ac
index 865d206..5db6876 100644
--- a/configure.ac
+++ b/configure.ac
@@ -176,23 +176,40 @@ AM_MISSING_PROG([AUTOM4TE], [autom4te])
# Initialize documentation helpers.
IMPRIMATUR_INIT(, [frenchspacing])
-# **********************
+# *********************************************************************
# GPG v2 (for the testsuite)
-# **********************
+# The testsuite needs to create GPG keys, which would be prohibitively
+# slow without the %transient-key statement, which appeared in GPG 2.1
+# *********************************************************************
AC_ARG_VAR([GPG],[Name of the gpg version 2 binary])
AC_MSG_CHECKING([for the GPG v2 binary])
uGPG=$GPG
unset GPG
+gpgver() {
+ GPG_VERSION_STRING=$($1 --version|head -n 1|sed -e 's/.* //')
+ oIFS=$IFS
+ IFS="."
+ set -- $GPG_VERSION_STRING
+ GPG_VERSION_MAJOR=$1
+ GPG_VERSION_MINOR=$2
+ IFS=$oIFS
+}
for prog in $uGPG gpg2 gpg
do
- ver=$($prog --version 2>/dev/null | head -n 1)
- case $ver in
- "gpg (GnuPG) 2."*)
- GPG=$prog
- break;;
- esac
+ gpgver $prog
+ if test -n "$GPG_VERSION_MAJOR" -a -n "$GPG_VERSION_MINOR"; then
+ if test $GPG_VERSION_MAJOR -eq 2; then
+ if test $GPG_VERSION_MINOR -ge 1; then
+ GPG=$prog
+ break
+ fi
+ elif test $GPG_VERSION_MAJOR -gt 2; then
+ GPG=$prog
+ break
+ fi
+ fi
done
-AC_MSG_RESULT([${GPG:-none}${GPG:+, $ver}])
+AC_MSG_RESULT([${GPG:-none}${GPG:+, $GPG_VERSION_STRING}])
AM_CONDITIONAL([COND_GPG2],[test -n "$GPG"])
AC_CONFIG_FILES([Makefile
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 0d7c732..f1307f4 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -16,7 +16,10 @@ WY_MAILUTILS=@WY_MAILUTILS@
WY_INOTIFY=@WY_INOTIFY@
WY_MODDIR=@abs_top_builddir@/modules/mailutils
-GPG="@GPG@ --quiet --no-permission-warning --batch "
+GPG="@GPG@"
+if [ -n "$GPG" ]; then
+ GPG="$GPG --quiet --no-permission-warning --batch "
+fi
GNUPGHOME=$WY_CONFDST/gnupg
export GNUPGHOME
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 2cbf991..b11e790 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -42,7 +42,8 @@ m4_shift2($@))])
# AT_WYDAWCA_DAEMON([PREREQ],[CONFIG],[INI],[SHELL-COMMANDS],[POST],[CODE],[STDOUT],[STDERR])
m4_define([AT_WYDAWCA_DAEMON],
-[AT_CHECK([$1
+[AT_CHECK([AT_GPG_PREREQ
+$1
cat > helper.sh <<EOT
#!/bin/sh
. $WY_TESTDIR/atlocal

Return to:

Send suggestions and report system problems to the System administrator.