summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-11-12 15:03:10 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-11-12 15:24:45 +0100
commitca7e698318e7516b1a2de3a68d8b1e00bfb91cd3 (patch)
tree690b589b6d64bc459d74bf266b66e97ec176fbab
parent53ac61b831b2cfce9833f6c01fb65eb7362dc170 (diff)
downloadgnutls-ca7e698318e7516b1a2de3a68d8b1e00bfb91cd3.tar.gz
tests: suite: more shell scripts were given the .sh suffix and simplified makefile
-rw-r--r--tests/suite/Makefile.am24
-rwxr-xr-xtests/suite/eagain.sh (renamed from tests/suite/eagain)0
-rwxr-xr-xtests/suite/invalid-cert.sh (renamed from tests/suite/invalid-cert)0
-rwxr-xr-xtests/suite/testcompat-openssl.sh56
-rwxr-xr-xtests/suite/testcompat-polarssl.sh50
-rwxr-xr-xtests/suite/testdane.sh (renamed from tests/suite/testdane)0
-rwxr-xr-xtests/suite/testrandom.sh (renamed from tests/suite/testrandom)0
-rwxr-xr-xtests/suite/testrng.sh (renamed from tests/suite/testrng)0
-rwxr-xr-xtests/suite/testsrn.sh (renamed from tests/suite/testsrn)0
9 files changed, 117 insertions, 13 deletions
diff --git a/tests/suite/Makefile.am b/tests/suite/Makefile.am
index c6d60f43d2..b4b01c73db 100644
--- a/tests/suite/Makefile.am
+++ b/tests/suite/Makefile.am
@@ -83,18 +83,15 @@ nodist_libecore_la_SOURCES = ecore/src/lib/ecore_anim.c \
ecore/src/lib/eina_ustringshare.c ecore/src/lib/eina_value.c
-
-nodist_check_SCRIPTS = eagain testsrn chain.sh invalid-cert testrandom \
- testpkcs11.sh testpkcs11.pkcs15 testpkcs11.softhsm testpkcs11.sc-hsm \
- testrng testcompat-main-polarssl testcompat-main-openssl testcompat-common \
- testcompat-polarssl testcompat-openssl
-
-TESTS = test-ciphersuite-names.sh eagain testsrn chain.sh invalid-cert \
- testrng testcompat-openssl testcompat-polarssl
+EXTRA_DIST += testcompat-main-polarssl testcompat-main-openssl testcompat-common \
+ testpkcs11.pkcs15 testpkcs11.softhsm testpkcs11.sc-hsm
+nodist_check_SCRIPTS = testsrn.sh chain.sh invalid-cert.sh \
+ testpkcs11.sh testrng.sh testcompat-polarssl.sh testcompat-openssl.sh \
+ testrandom.sh
if ENABLE_PKCS11
check_PROGRAMS += pkcs11-chainverify pkcs11-get-issuer pkcs11-is-known pkcs11-combo pkcs11-privkey
-TESTS += testpkcs11.sh pkcs11-chainverify pkcs11-get-issuer crl-test pkcs11-is-known pkcs11-combo pkcs11-privkey
+nodist_check_SCRIPTS += testpkcs11.sh pkcs11-chainverify pkcs11-get-issuer crl-test pkcs11-is-known pkcs11-combo pkcs11-privkey
endif
TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \
@@ -104,7 +101,7 @@ TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \
srcdir="$(srcdir)"
if ENABLE_DANE
-TESTS += testdane
+nodist_check_SCRIPTS += testdane.sh
endif
if !MACOSX
@@ -117,14 +114,15 @@ nodist_eagain_cli_SOURCES = mini-eagain2.c
noinst_PROGRAMS = eagain-cli mini-record-timing
-TESTS += eagain
+nodist_check_SCRIPTS += eagain.sh
endif
endif
-#pkcs11-chainverify cannot run under valgrind (or hell breaks loose)
+TESTS = $(nodist_check_SCRIPTS)
-if WANT_TEST_SUITE
TEST_EXTENSIONS = .sh
+
+if WANT_TEST_SUITE
LOG_COMPILER = $(VALGRIND)
SH_LOG_COMPILER =
endif
diff --git a/tests/suite/eagain b/tests/suite/eagain.sh
index 42bb991bdd..42bb991bdd 100755
--- a/tests/suite/eagain
+++ b/tests/suite/eagain.sh
diff --git a/tests/suite/invalid-cert b/tests/suite/invalid-cert.sh
index 00bf1e4e3b..00bf1e4e3b 100755
--- a/tests/suite/invalid-cert
+++ b/tests/suite/invalid-cert.sh
diff --git a/tests/suite/testcompat-openssl.sh b/tests/suite/testcompat-openssl.sh
new file mode 100755
index 0000000000..d7f9cc0e02
--- /dev/null
+++ b/tests/suite/testcompat-openssl.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# Copyright (c) 2010-2015, Free Software Foundation, Inc.
+# Copyright (c) 2012-2015, Nikos Mavrogiannopoulos
+# All rights reserved.
+#
+# Author: Nikos Mavrogiannopoulos
+#
+# This file is part of GnuTLS.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation and/or
+# other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the names of its contributors may
+# be used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+srcdir="${srcdir:-.}"
+
+if ! test -x /usr/bin/openssl; then
+ echo "You need openssl to run this test"
+ exit 77
+fi
+
+/usr/bin/openssl version|grep fips >/dev/null 2>&1
+if test $? = 0; then
+ export FIPS=1
+else
+ export FIPS=0
+fi
+
+export TZ="UTC"
+
+# Check for datefudge
+TSTAMP=`datefudge "2006-09-23 00:00 UTC" date -u +%s 2>/dev/null`
+if test "${TSTAMP}" != "1158969600"; then
+ echo "You need datefudge to run this test"
+ exit 77
+fi
+
+datefudge "2012-09-2" "${srcdir}/testcompat-main-openssl"
diff --git a/tests/suite/testcompat-polarssl.sh b/tests/suite/testcompat-polarssl.sh
new file mode 100755
index 0000000000..c4dfb361e0
--- /dev/null
+++ b/tests/suite/testcompat-polarssl.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Copyright (c) 2010-2015, Free Software Foundation, Inc.
+# Copyright (c) 2012-2015, Nikos Mavrogiannopoulos
+# All rights reserved.
+#
+# Author: Nikos Mavrogiannopoulos
+#
+# This file is part of GnuTLS.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation and/or
+# other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the names of its contributors may
+# be used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+srcdir="${srcdir:-.}"
+
+export TZ="UTC"
+
+# Check for datefudge
+TSTAMP=`datefudge "2006-09-23 00:00 UTC" date -u +%s 2>/dev/null`
+if test "${TSTAMP}" != "1158969600"; then
+ echo "You need datefudge to run this test"
+ exit 77
+fi
+
+cat /proc/cpuinfo|grep "model name"|grep "VIA Esther" >/dev/null 2>&1
+if test $? = 0; then
+ echo "PolarSSL is broken on VIA processors"
+ exit 77
+fi
+
+datefudge "2012-09-2" "${srcdir}/testcompat-main-polarssl"
diff --git a/tests/suite/testdane b/tests/suite/testdane.sh
index c2408ec7ff..c2408ec7ff 100755
--- a/tests/suite/testdane
+++ b/tests/suite/testdane.sh
diff --git a/tests/suite/testrandom b/tests/suite/testrandom.sh
index 79b90d32c0..79b90d32c0 100755
--- a/tests/suite/testrandom
+++ b/tests/suite/testrandom.sh
diff --git a/tests/suite/testrng b/tests/suite/testrng.sh
index c45c9300eb..c45c9300eb 100755
--- a/tests/suite/testrng
+++ b/tests/suite/testrng.sh
diff --git a/tests/suite/testsrn b/tests/suite/testsrn.sh
index d43f214bef..d43f214bef 100755
--- a/tests/suite/testsrn
+++ b/tests/suite/testsrn.sh