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