summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alon.barlev@gmail.com>2017-01-05 10:35:29 +0200
committerAlon Bar-Lev <alon.barlev@gmail.com>2017-01-05 14:01:57 +0200
commit22da6ba5d5d719b125f28718861ad136fa7207af (patch)
tree7ba5a54f8e4ce4b91cb61f599a1be6125ee7e060
parent41da7be67e0e0f30ea274a6f2d5af700be064b61 (diff)
downloadgnutls-22da6ba5d5d719b125f28718861ad136fa7207af.tar.gz
tests: remove bash usage
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
-rwxr-xr-xtests/cert-tests/openpgp-certs2
-rwxr-xr-xtests/danetool.sh2
-rwxr-xr-xtests/fastopen.sh2
-rwxr-xr-xtests/key-tests/dsa2
-rwxr-xr-xtests/ocsp-tests/ocsp-must-staple-connection2
-rwxr-xr-xtests/ocsp-tests/ocsp-tls-connection2
-rw-r--r--tests/scripts/common.sh4
-rwxr-xr-xtests/starttls.sh2
-rwxr-xr-xtests/suite/certtool-pkcs11.sh2
-rwxr-xr-xtests/suite/eagain.sh2
-rwxr-xr-xtests/suite/testcompat-main-openssl2
-rwxr-xr-xtests/suite/testcompat-main-polarssl2
-rwxr-xr-xtests/suite/testdane.sh2
-rwxr-xr-xtests/suite/testpkcs11.sh2
-rwxr-xr-xtests/suite/testrng.sh2
-rwxr-xr-xtests/suite/testsrn.sh2
16 files changed, 16 insertions, 18 deletions
diff --git a/tests/cert-tests/openpgp-certs b/tests/cert-tests/openpgp-certs
index 69ecc1a4ff..979f0f5328 100755
--- a/tests/cert-tests/openpgp-certs
+++ b/tests/cert-tests/openpgp-certs
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2010-2012 Free Software Foundation, Inc.
#
diff --git a/tests/danetool.sh b/tests/danetool.sh
index 4b5f5b74cd..be4445d93e 100755
--- a/tests/danetool.sh
+++ b/tests/danetool.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2016 Red Hat, Inc.
#
diff --git a/tests/fastopen.sh b/tests/fastopen.sh
index fffc6493bc..5d58b35028 100755
--- a/tests/fastopen.sh
+++ b/tests/fastopen.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2010-2016 Free Software Foundation, Inc.
#
diff --git a/tests/key-tests/dsa b/tests/key-tests/dsa
index 9319b41a5f..f8901c8c3e 100755
--- a/tests/key-tests/dsa
+++ b/tests/key-tests/dsa
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2010-2012 Free Software Foundation, Inc.
#
diff --git a/tests/ocsp-tests/ocsp-must-staple-connection b/tests/ocsp-tests/ocsp-must-staple-connection
index 2c7aa1e322..bccf77c95d 100755
--- a/tests/ocsp-tests/ocsp-must-staple-connection
+++ b/tests/ocsp-tests/ocsp-must-staple-connection
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2016 Red Hat, Inc.
#
diff --git a/tests/ocsp-tests/ocsp-tls-connection b/tests/ocsp-tests/ocsp-tls-connection
index d01b0fe9c9..4002cd9cec 100755
--- a/tests/ocsp-tests/ocsp-tls-connection
+++ b/tests/ocsp-tests/ocsp-tls-connection
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Test case: Try to establish TLS connections with gnutls-cli and
# check the validity of the server certificate via OCSP
diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh
index 8e82660155..3cf841c25b 100644
--- a/tests/scripts/common.sh
+++ b/tests/scripts/common.sh
@@ -19,11 +19,9 @@
# along with this file; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# due to the use of $RANDOM, this script requires bash
-
export TZ="UTC"
-GETPORT='rc=0;while test $rc = 0;do PORT="$(((($$<<15)|RANDOM) % 63001 + 2000))";
+GETPORT='rc=0;myrandom=$(date +%N | sed 's/^0*//');while test $rc = 0;do PORT="$(((($$<<15)|$myrandom) % 63001 + 2000))";
netstat -anl|grep "[\:\.]$PORT" >/dev/null 2>&1;
rc=$?;done;'
diff --git a/tests/starttls.sh b/tests/starttls.sh
index 3742964f9c..522c6765b1 100755
--- a/tests/starttls.sh
+++ b/tests/starttls.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2010-2016 Free Software Foundation, Inc.
#
diff --git a/tests/suite/certtool-pkcs11.sh b/tests/suite/certtool-pkcs11.sh
index 6a083bced3..39933cd0c3 100755
--- a/tests/suite/certtool-pkcs11.sh
+++ b/tests/suite/certtool-pkcs11.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2016 Nikos Mavrogiannopoulos
#
diff --git a/tests/suite/eagain.sh b/tests/suite/eagain.sh
index afeb6e2fcb..235a5390ec 100755
--- a/tests/suite/eagain.sh
+++ b/tests/suite/eagain.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2006-2008, 2010, 2012 Free Software Foundation, Inc.
#
diff --git a/tests/suite/testcompat-main-openssl b/tests/suite/testcompat-main-openssl
index e38d7238e8..28461de569 100755
--- a/tests/suite/testcompat-main-openssl
+++ b/tests/suite/testcompat-main-openssl
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (c) 2010-2016, Free Software Foundation, Inc.
# Copyright (c) 2012-2016, Nikos Mavrogiannopoulos
diff --git a/tests/suite/testcompat-main-polarssl b/tests/suite/testcompat-main-polarssl
index 311b1ca5ef..e945fd5025 100755
--- a/tests/suite/testcompat-main-polarssl
+++ b/tests/suite/testcompat-main-polarssl
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (c) 2010-2015, Free Software Foundation, Inc.
# Copyright (c) 2012-2015, Nikos Mavrogiannopoulos
diff --git a/tests/suite/testdane.sh b/tests/suite/testdane.sh
index 5bef05dfa7..2f1cb6e7b9 100755
--- a/tests/suite/testdane.sh
+++ b/tests/suite/testdane.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2013 Nikos Mavrogiannopoulos
#
diff --git a/tests/suite/testpkcs11.sh b/tests/suite/testpkcs11.sh
index 414a5ae89b..d3985edc77 100755
--- a/tests/suite/testpkcs11.sh
+++ b/tests/suite/testpkcs11.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2013 Nikos Mavrogiannopoulos
#
diff --git a/tests/suite/testrng.sh b/tests/suite/testrng.sh
index fabd4eea2f..c45c9300eb 100755
--- a/tests/suite/testrng.sh
+++ b/tests/suite/testrng.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2014 Nikos Mavrogiannopoulos
#
diff --git a/tests/suite/testsrn.sh b/tests/suite/testsrn.sh
index b41dbb442f..aba3df589c 100755
--- a/tests/suite/testsrn.sh
+++ b/tests/suite/testsrn.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 2010-2012 Free Software Foundation, Inc.
#