summaryrefslogtreecommitdiff
path: root/tests/scripts/common.sh
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-09-05 17:22:22 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-09-05 17:38:37 +0200
commit33f9f61c5a22d90c6e7a5dfda870ea284ef63581 (patch)
treedb4361f24624b8db4b9fbadd2b5b2dbc4e6fd901 /tests/scripts/common.sh
parent2b3e621957f0296c3ae68a565fa5d896aa6a2b7c (diff)
downloadgnutls-33f9f61c5a22d90c6e7a5dfda870ea284ef63581.tar.gz
use random ports in tests, unless a port is provided
Diffstat (limited to 'tests/scripts/common.sh')
-rw-r--r--tests/scripts/common.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh
index de4cd85494..401d290621 100644
--- a/tests/scripts/common.sh
+++ b/tests/scripts/common.sh
@@ -18,6 +18,8 @@
# along with this file; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+RPORT="$((((RANDOM<<15)|RANDOM) % 63001 + 2000))"
+
fail() {
PID=$1
shift;