[gnutls] Randomize port in some tests.

Tomáš Mráz tmraz at fedoraproject.org
Tue Mar 26 15:09:51 UTC 2013


commit 7bd692144a81e9e05f14fa55e0e302f7456aeac3
Author: Tomas Mraz <tmraz at fedoraproject.org>
Date:   Tue Mar 26 16:09:33 2013 +0100

    Randomize port in some tests.

 gnutls-3.1.10-tests-rndport.patch |   24 ++++++++++++++++++++++++
 gnutls.spec                       |    3 +++
 2 files changed, 27 insertions(+), 0 deletions(-)
---
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
 


More information about the scm-commits mailing list