Hello community,

here is the log from the commit of package subversion for openSUSE:Factory 
checked in at 2012-12-10 17:20:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/subversion (Old)
 and      /work/SRC/openSUSE:Factory/.subversion.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "subversion", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/subversion/subversion.changes    2012-10-11 
11:31:02.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.subversion.new/subversion.changes       
2012-12-10 17:20:03.000000000 +0100
@@ -1,0 +2,7 @@
+Sat Dec  8 12:11:19 UTC 2012 - [email protected]
+
+- for package maintainers, add support to run regression tests 
+  over ra_neon and ra_serf (http://) via Apache / mod_dav_svn
+  when built --with=regression_tests
+
+-------------------------------------------------------------------

New:
----
  subversion-tests-httpd-users
  subversion-tests-httpd.conf.tmpl

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ subversion.spec ++++++
--- /var/tmp/diff_new_pack.jYde09/_old  2012-12-10 17:20:05.000000000 +0100
+++ /var/tmp/diff_new_pack.jYde09/_new  2012-12-10 17:20:05.000000000 +0100
@@ -154,6 +154,8 @@
 %requires_ge    libsqlite3-0
 %endif # with_intree_sqlite
 Source92:       %{name}.rpmlintrc
+Source93:       subversion-tests-httpd.conf.tmpl
+Source94:       subversion-tests-httpd-users
 #
 Patch11:        subversion.libtool-verbose.patch
 # build fixes
@@ -626,38 +628,93 @@
 # During "make check", auth-test loads DSOs at runtime and can't find
 # them if we don't set up LD_LIBRARY_PATH as below.
 export 
LD_LIBRARY_PATH="$PWD/subversion/libsvn_auth_kwallet/.libs:$PWD/subversion/libsvn_auth_gnome_keyring/.libs:$LD_LIBRARY_PATH"
-# run test over ra_local (file://)
 CHECK_FS_TYPE=fsfs
+
+# run tests over ra_local (file://)
 %__make check LOG_TO_STDOUT=true CLEANUP=true FS_TYPE="$CHECK_FS_TYPE"
 
 SVNSERVE_PIDFILE="$PWD/svnserve.pid"
+HTTPD_PIDFILE="$PWD/httpd.pid"
 # hook up cleanup routine
 function on_exit {
     if [ -e "$SVNSERVE_PIDFILE" ]; then
         pid=`cat "$SVNSERVE_PIDFILE" 2>/dev/null || :`
         test -n "$pid" && kill -9 "$pid" || :
     fi
+    if [ -e "$HTTPD_PIDFILE" ]; then
+        pid=`cat "$HTTPD_PIDFILE" 2>/dev/null || :`
+        test -n "$pid" && kill -9 "$pid" || :
+    fi
 }
 trap on_exit EXIT
-# find free port
-free_port=""
-for p in `/usr/sbin/ss -nat|tail +2|awk '{ split($4, a, ":"); if (a[2] > 1024) 
{ print a[2]; }}'`; do used_port[$p]="$p"; done
-for p in `seq 1025 65535`; do
+
+# find next free port
+function find_next_free_port {
+    if [ -z "$free_port" ]; then                # on first invocation
+        local start_port=1025                   # start with user port range
+    else                                        # on subsequent invocations
+        local start_port=$free_port;            # look for ports above the last
+        let start_port++;                       # as the daemon might still 
use it
+    fi
+    free_port=""
+    # in the OBS build VMs, the call to ss actually fails, resulting in all 
port to be returned as unused,
+    # subsequent calls to the function will use a sequence from 1025, which 
are always available in VM.
+    # For local builds this takes into account locally used ports. Either way 
works to get a usable port.
+    for p in `/usr/sbin/ss -nat|tail +2|awk '{ split($4, a, ":"); if (a[2] > 
1024) { print a[2]; }}'`; do used_port[$p]="$p"; done
+    for p in `seq $start_port 65535`; do
     if [ -z "${used_port[$p]}" ]; then
         free_port="$p"
         break
     fi
-done
-if [ -z "$free_port" ]; then
+    done
+    if [ -z "$free_port" ]; then
     echo "ERROR: failed to find a free port" >&2
     echo "Used TCP ports: ${used_port[*]}" >&2
     exit 1
-fi
+    fi
+}
+find_next_free_port
+
 # run tests over ra_svn (svn://)
 "$PWD/subversion/svnserve/svnserve" --listen-host 127.0.0.1 --listen-port 
"$free_port" --pid-file "$SVNSERVE_PIDFILE" -d -r 
"$PWD/subversion/tests/cmdline"
 %__make check LOG_TO_STDOUT=true CLEANUP=true FS_TYPE="$CHECK_FS_TYPE" 
BASE_URL="svn://127.0.0.1:$free_port" || cat $RPM_SOURCE_DIR/%name*/tests.log
 kill -9 `cat "$SVNSERVE_PIDFILE" 2>/dev/null`
 %__rm "$SVNSERVE_PIDFILE"
+
+# run tests over ra_neon (http://)
+%if %{with neon}
+find_next_free_port
+# create apache configuration
+%__cp "%{SOURCE94}" users
+APACHE_LIBEXECDIR="%{apache_libexecdir}"
+< "%{SOURCE93}" \
+       sed "s/REPLACE_PORT/$free_port/g" | \
+       sed "s/REPLACE_BUILDROOT/${RPM_BUILD_ROOT//\//\\/}/g" | \
+       sed "s/REPLACE_BUILDDIR/${PWD//\//\\/}/g" | \
+       sed "s/REPLACE_APACHE_LIBEXECDIR/${APACHE_LIBEXECDIR//\//\\/}/g" > 
httpd.conf
+LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" /usr/sbin/httpd2 -d 
"$PWD" -f httpd.conf
+%__make check LOG_TO_STDOUT=true CLEANUP=true FS_TYPE="$CHECK_FS_TYPE" 
BASE_URL=http://127.0.0.1:$free_port HTTP_LIBRARY=neon || cat 
$RPM_SOURCE_DIR/%name*/tests.log
+kill -9 `cat "$HTTPD_PIDFILE" 2>/dev/null`
+%__rm "$HTTPD_PIDFILE"
+%endif # neon
+
+# run tests over ra_serf (http://)
+%if %{with serf}
+find_next_free_port
+# create apache configuration
+%__cp "%{SOURCE94}" users
+APACHE_LIBEXECDIR="%{apache_libexecdir}"
+< "%{SOURCE93}" \
+       sed "s/REPLACE_PORT/$free_port/g" | \
+       sed "s/REPLACE_BUILDROOT/${RPM_BUILD_ROOT//\//\\/}/g" | \
+       sed "s/REPLACE_BUILDDIR/${PWD//\//\\/}/g" | \
+       sed "s/REPLACE_APACHE_LIBEXECDIR/${APACHE_LIBEXECDIR//\//\\/}/g" > 
httpd.conf
+LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" /usr/sbin/httpd2 -d 
"$PWD" -f httpd.conf
+%__make check LOG_TO_STDOUT=true CLEANUP=true FS_TYPE="$CHECK_FS_TYPE" 
BASE_URL=http://127.0.0.1:$free_port HTTP_LIBRARY=serf || cat 
$RPM_SOURCE_DIR/%name*/tests.log
+kill -9 `cat "$HTTPD_PIDFILE" 2>/dev/null`
+%__rm "$HTTPD_PIDFILE"
+%endif # serf
+
 %if %with_java
 %__make check-javahl
 %endif # with_java

++++++ subversion-tests-httpd-users ++++++
jrandom:xCGl35kV9oWCY
jconstant:xCGl35kV9oWCY
++++++ subversion-tests-httpd.conf.tmpl ++++++
Listen 127.0.0.1:REPLACE_PORT
ServerName tests.example.com
ErrorLog ./error_log
PidFile ./httpd.pid
LoadModule auth_basic_module REPLACE_APACHE_LIBEXECDIR/mod_auth_basic.so
LoadModule authn_file_module REPLACE_APACHE_LIBEXECDIR/mod_authn_file.so
LoadModule alias_module REPLACE_APACHE_LIBEXECDIR/mod_alias.so
LoadModule dav_module REPLACE_APACHE_LIBEXECDIR/mod_dav.so
LoadModule dav_svn_module 
REPLACE_BUILDROOTREPLACE_APACHE_LIBEXECDIR/mod_dav_svn.so
LoadModule authz_svn_module 
REPLACE_BUILDROOTREPLACE_APACHE_LIBEXECDIR/mod_authz_svn.so 

<Location /svn-test-work/repositories>
  DAV svn
  SVNParentPath 
REPLACE_BUILDDIR/subversion/tests/cmdline/svn-test-work/repositories
  AuthzSVNAccessFile 
REPLACE_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile REPLACE_BUILDDIR/users
  Require valid-user
</Location>

<Location /svn-test-work/local_tmp/repos>
  DAV svn
  SVNPath 
REPLACE_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp/repos
  AuthzSVNAccessFile 
REPLACE_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile REPLACE_BUILDDIR/users
  Require valid-user
 </Location>

RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)$ 
/svn-test-work/repositories/$1
RedirectMatch           ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$ 
/svn-test-work/repositories/$1
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to