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