From 7bd692144a81e9e05f14fa55e0e302f7456aeac3 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Tue, 26 Mar 2013 16:09:33 +0100 Subject: [PATCH] Randomize port in some tests. --- gnutls-3.1.10-tests-rndport.patch | 24 ++++++++++++++++++++++++ gnutls.spec | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 gnutls-3.1.10-tests-rndport.patch diff --git a/gnutls-3.1.10-tests-rndport.patch b/gnutls-3.1.10-tests-rndport.patch new file mode 100644 index 0000000..6fe2236 --- /dev/null +++ b/gnutls-3.1.10-tests-rndport.patch @@ -0,0 +1,24 @@ +diff -up gnutls-3.1.10/tests/dsa/testdsa.rndport gnutls-3.1.10/tests/dsa/testdsa +--- gnutls-3.1.10/tests/dsa/testdsa.rndport 2013-03-21 21:42:28.000000000 +0100 ++++ gnutls-3.1.10/tests/dsa/testdsa 2013-03-26 15:50:38.973561603 +0100 +@@ -23,7 +23,7 @@ + srcdir="${srcdir:-.}" + SERV="${SERV:-../../src/gnutls-serv} -q" + CLI="${CLI:-../../src/gnutls-cli}" +-PORT="${PORT:-5559}" ++PORT="${PORT:-$((RANDOM+5000))}" + DEBUG="" + unset RETCODE + +diff -up gnutls-3.1.10/tests/openpgp-certs/testcerts.rndport gnutls-3.1.10/tests/openpgp-certs/testcerts +--- gnutls-3.1.10/tests/openpgp-certs/testcerts.rndport 2013-03-21 21:42:28.000000000 +0100 ++++ gnutls-3.1.10/tests/openpgp-certs/testcerts 2013-03-26 15:52:33.207007952 +0100 +@@ -23,7 +23,7 @@ + srcdir="${srcdir:-.}" + SERV="${SERV:-../../src/gnutls-serv} -q" + CLI="${CLI:-../../src/gnutls-cli}" +-PORT="${PORT:-5557}" ++PORT="${PORT:-$((RANDOM+5000))}" + DEBUG="" + + if test "${WINDIR}" != "";then diff --git a/gnutls.spec b/gnutls.spec index 3bc162f..93a2f08 100644 --- a/gnutls.spec +++ b/gnutls.spec @@ -29,6 +29,8 @@ Patch1: gnutls-3.1.7-rpath.patch Patch7: gnutls-2.12.21-fips-algorithms.patch # Make ECC optional as it is now hobbled Patch8: gnutls-3.1.10-noecc.patch +# Use random port in some tests to avoid conflicts during simultaneous builds on the same machine +Patch9: gnutls-3.1.10-tests-rndport.patch Requires: libgcrypt >= 1.2.2 # Wildcard bundling exception https://fedorahosted.org/fpc/ticket/174 @@ -124,6 +126,7 @@ This package contains Guile bindings for the library. # later reused. #%patch7 -p1 -b .fips %patch8 -p1 -b .noecc +%patch9 -p1 -b .rndport %{SOURCE2} -e