try harder to avoid svnserve bind failures in ruby binding tests

- enable verbose output for ruby binding tests
Resolves: rhbz#960127
This commit is contained in:
Joe Orton 2013-05-09 12:25:30 +01:00
parent eaa8715820
commit bf858c512b
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,24 @@
Try a little harder to avoid svnserve() bind failures.
--- subversion-1.7.9/subversion/bindings/swig/ruby/test/util.rb.rubybind
+++ subversion-1.7.9/subversion/bindings/swig/ruby/test/util.rb
@@ -41,7 +41,8 @@ module SvnTestUtil
@full_repos_path = File.expand_path(@repos_path)
@repos_uri = "file://#{@full_repos_path.sub(/^\/?/, '/')}"
@svnserve_host = "127.0.0.1"
- @svnserve_ports = (64152..64282).collect{|x| x.to_s}
+ sport = (50000 + rand(100) * 100)
+ @svnserve_ports = (sport..sport + 99).collect{|x| x.to_s}
@wc_base_dir = File.join(Dir.tmpdir, "wc-tmp")
@wc_path = File.join(@wc_base_dir, "wc")
@full_wc_path = File.expand_path(@wc_path)
@@ -249,6 +250,8 @@ realm = #{@realm}
"--listen-port", port,
"-d", "--foreground")
}
+ # wait a while for svnserve to attempt a bind() and possibly fail
+ sleep(1)
pid, status = Process.waitpid2(@svnserve_pid, Process::WNOHANG)
if status and status.exited?
if $DEBUG

View File

@ -26,7 +26,7 @@
Summary: A Modern Concurrent Version Control System
Name: subversion
Version: 1.7.9
Release: 1%{?dist}
Release: 2%{?dist}
License: ASL 2.0
Group: Development/Tools
URL: http://subversion.apache.org/
@ -44,6 +44,7 @@ Patch3: subversion-1.7.0-kwallet.patch
Patch4: subversion-1.7.2-ruby19.patch
Patch7: subversion-1.7.4-kwallet2.patch
Patch8: subversion-1.7.4-sqlitever.patch
Patch9: subversion-1.7.9-rubybind.patch
BuildRequires: autoconf, libtool, python, python-devel, texinfo, which
BuildRequires: %{dbdevel} >= 4.1.25, swig >= 1.3.24, gettext
BuildRequires: apr-devel >= 1.3.0, apr-util-devel >= 1.3.0
@ -181,6 +182,7 @@ This package includes supplementary tools for use with Subversion.
%patch4 -p1 -b .ruby
%patch7 -p1 -b .kwallet2
%patch8 -p1 -b .sqlitever
%patch9 -p1 -b .rubybind
%build
# Regenerate the buildsystem, so that:
@ -207,6 +209,7 @@ export CC=gcc CXX=g++ JAVA_HOME=%{jdk_path} CFLAGS="$RPM_OPT_FLAGS"
%configure --with-apr=%{_prefix} --with-apr-util=%{_prefix} \
--with-swig --with-neon=%{_prefix} \
--with-ruby-sitedir=%{ruby_vendorarchdir} \
--with-ruby-test-verbose=verbose \
--with-apxs=%{_httpd_apxs} --disable-mod-activation \
--disable-static --with-sasl=%{_prefix} \
--disable-neon-version-check \
@ -466,6 +469,10 @@ rm -rf ${RPM_BUILD_ROOT}
%endif
%changelog
* Thu May 9 2013 Joe Orton <jorton@redhat.com> - 1.7.9-2
- try harder to avoid svnserve bind failures in ruby binding tests
- enable verbose output for ruby binding tests
* Tue Apr 9 2013 Joe Orton <jorton@redhat.com> - 1.7.9-1
- update to 1.7.9