From 5f5b97ee73ba4151b4d707dcdd6859edd2e18c1f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 19 Dec 2011 12:42:48 +0000 Subject: [PATCH] - randomize test port on builders on same hardware Changed files: lighttpd.spec -> 1.353 test-port-setup.patch -> 1.1 --- lighttpd.spec | 7 +++++-- test-port-setup.patch | 11 +++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 test-port-setup.patch diff --git a/lighttpd.spec b/lighttpd.spec index d911196..598d398 100644 --- a/lighttpd.spec +++ b/lighttpd.spec @@ -96,9 +96,10 @@ Patch0: %{name}-use_bin_sh.patch Patch1: %{name}-mod_evasive-status_code.patch Patch2: %{name}-mod_h264_streaming.patch Patch3: %{name}-branding.patch -#Patch4: %{name}-modinit-before-fork.patch Patch5: %{name}-mod_deflate.patch -#Patch8: %{name}-errorlog-before-fork.patch +Patch6: test-port-setup.patch +#Patch: %{name}-modinit-before-fork.patch +#Patch: %{name}-errorlog-before-fork.patch URL: http://www.lighttpd.net/ %{?with_xattr:BuildRequires: attr-devel} BuildRequires: autoconf >= 2.57 @@ -826,6 +827,7 @@ Plik monitrc do monitorowania serwera www lighttpd. %patch2 -p1 %patch3 -p1 %{?with_deflate:%patch5 -p1} +%patch6 -p1 rm -f src/mod_ssi_exprparser.h # bad patching: should be removed by is emptied instead @@ -866,6 +868,7 @@ fi %{__make} -j1 %if %{with tests} +export LIGHTTPD_TEST_PORT=$((2048 + RANDOM % 10)) %{__make} check %endif diff --git a/test-port-setup.patch b/test-port-setup.patch new file mode 100644 index 0000000..16c3b5d --- /dev/null +++ b/test-port-setup.patch @@ -0,0 +1,11 @@ +--- lighttpd-1.4.30/tests/LightyTest.pm~ 2010-02-02 01:28:20.000000000 +0200 ++++ lighttpd-1.4.30/tests/LightyTest.pm 2011-12-19 14:37:44.255526606 +0200 +@@ -43,7 +43,7 @@ + $self->{MODULES_PATH} = $self->{BASEDIR}.'/build'; + } + $self->{LIGHTTPD_PATH} = $self->{BINDIR}.'/lighttpd'; +- $self->{PORT} = 2048; ++ $self->{PORT} = $ENV{LIGHTTPD_TEST_PORT} ? int($ENV{LIGHTTPD_TEST_PORT}) : 2048; + + my ($name, $aliases, $addrtype, $net) = gethostbyaddr(inet_aton("127.0.0.1"), AF_INET); + -- 2.44.0