Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
diff -ru gnupg-2.1.15.orig/tests/inittests gnupg-2.1.15/tests/inittests
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
--- gnupg-2.1.15.orig/tests/inittests	2016-02-02 07:05:16.000000000 +0100
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
+++ gnupg-2.1.15/tests/inittests	2016-10-19 18:09:36.112010000 +0200
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
@@ -1,99 +1,3 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
 #!/bin/sh
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-#     	Copyright (C) 2002 Free Software Foundation, Inc.
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-#
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# This file is free software; as a special exception the author gives
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# unlimited permission to copy and/or distribute it, with or without
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# modifications, as long as this notice is preserved.
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-#
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# This file is distributed in the hope that it will be useful, but
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-set -e
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-sample_certs='
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-cert_g10code_test1.pem
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-cert_g10code_pete1.pem
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-cert_g10code_theo1.pem
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-'
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-private_keys='
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-32100C27173EF6E9C4E9A25D3D69F86D37A4F939
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-'
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-clean_files='
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-gpgsm.conf gpg-agent.conf trustlist.txt pubring.kbx
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-msg msg.sig msg.unsig
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-'
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-[ -z "$srcdir" ] && srcdir=.
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-[ -z "$GPGSM" ] && GPGSM=../sm/gpgsm
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-if [ -d $srcdir/samplekeys ] \
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-   && grep TESTS_ENVIRONMENT Makefile >/dev/null 2>&1; then
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
- :
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-else
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-   # During make distclean the Makefile has already been removed,
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-   # so we need this extra test.
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-   if ! grep gnupg-test-directory testdir.stamp >/dev/null 2>&1; then
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-      echo "inittests: please cd to the tests directory first" >&2
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-      exit 1
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-   fi
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-fi
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-if [ "$1" = "--clean" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-    if [ -d private-keys-v1.d ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-       rm private-keys-v1.d/* 2>/dev/null || true
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-       rmdir private-keys-v1.d
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-    fi
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-    rm ${clean_files} testdir.stamp 2>/dev/null || true
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-    exit 0
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-fi
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-if [ "$GNUPGHOME" != "`/bin/pwd`" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-    echo "inittests: please set GNUPGHOME to the test directory" >&2
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-    exit 1
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-fi
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-if [ -n "$GPG_AGENT_INFO" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-    echo "inittests: please unset GPG_AGENT_INFO" >&2
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-    exit 1
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-fi
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# A stamp file used with --clean
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-echo gnupg-test-directory > testdir.stamp
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# Create the private key directy if it does not exists and copy 
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# the sample keys.
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-[ -d private-keys-v1.d ] || mkdir private-keys-v1.d
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-for i in ${private_keys}; do 
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-    cat ${srcdir}/samplekeys/$i.key >private-keys-v1.d/$i.key
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-done
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# Create the configuration scripts
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# Note, die to an expired test certificate, we need to use
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# the faked system time option.
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-cat > gpgsm.conf <
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-no-secmem-warning
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-disable-crl-checks
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-agent-program ../agent/gpg-agent
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-faked-system-time 1038835799
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-EOF
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-cat > gpg-agent.conf <
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-no-grab
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-pinentry-program /home/wk/work/pinentry/gtk/pinentry-gtk
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-EOF
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-cat > trustlist.txt <
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=Düsseldorf,C=DE
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-3CF405464F66ED4A7DF45BBDD1E4282E33BDB76E S
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-EOF
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# Make sure that the sample certs are available but ignore errors here
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-# because we are not a test script.
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-for i in ${sample_certs}; do 
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-    $GPGSM --import ${srcdir}/samplekeys/$i || true
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
-done
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
+#testing cross compiled binaries, nope.
Lucio Andrés Illanes Albornoz (arab, vxp) 79884d
+exit 0