217
224
if [ ${MODULE_PATH:+set} ]; then
218
225
MOD_DAV_SVN="$MODULE_PATH/mod_dav_svn.so"
219
226
MOD_AUTHZ_SVN="$MODULE_PATH/mod_authz_svn.so"
227
MOD_DONTDOTHAT="$MODULE_PATH/mod_dontdothat.so"
221
229
MOD_DAV_SVN="$ABS_BUILDDIR/subversion/mod_dav_svn/.libs/mod_dav_svn.so"
222
230
MOD_AUTHZ_SVN="$ABS_BUILDDIR/subversion/mod_authz_svn/.libs/mod_authz_svn.so"
231
MOD_DONTDOTHAT="$ABS_BUILDDIR/tools/server-side/mod_dontdothat/.libs/mod_dontdothat.so"
225
234
[ -r "$MOD_DAV_SVN" ] \
226
|| fail "dav_svn_module not found, please use '--enable-shared --enable-dso --with-apxs' with your 'configure' script"
235
|| fail "dav_svn_module not found, please use '--enable-shared --with-apxs' with your 'configure' script"
227
236
[ -r "$MOD_AUTHZ_SVN" ] \
228
|| fail "authz_svn_module not found, please use '--enable-shared --enable-dso --with-apxs' with your 'configure' script"
237
|| fail "authz_svn_module not found, please use '--enable-shared --with-apxs' with your 'configure' script"
238
[ -r "$MOD_DONTDOTHAT" ] \
239
|| fail "dontdothat_module not found, please use '--enable-shared --with-apxs' with your 'configure' script"
230
241
for d in "$ABS_BUILDDIR"/subversion/*/.libs; do
231
242
if [ -z "$BUILDDIR_LIBRARY_PATH" ]; then
308
317
|| fail "SSL module not found"
312
if [ -n "$BASH_VERSION" ]; then
313
echo $(($RANDOM+1024))
315
$PYTHON -c 'import random; print random.randint(1024, 2**16-1)'
320
# Stop any previous instances, os we can re-use the port.
321
if [ -x $STOPSCRIPT ]; then $STOPSCRIPT ; sleep 1; fi
324
while netstat -an | grep $HTTPD_PORT | grep 'LISTEN' >/dev/null; do
325
HTTPD_PORT=$(( HTTPD_PORT + 1 ))
326
if [ $HTTPD_PORT -eq 65536 ]; then
327
# Most likely the loop condition is true regardless of $HTTPD_PORT
328
fail "netstat claims you have no free ports for httpd to listen on."
319
HTTPD_PORT=$(random_port)
320
while netstat -an | grep $HTTPD_PORT | grep 'LISTEN'; do
321
HTTPD_PORT=$(random_port)
323
331
HTTPD_ROOT="$ABS_BUILDDIR/subversion/tests/cmdline/httpd-$(date '+%Y%m%d-%H%M%S')"
324
332
HTTPD_CFG="$HTTPD_ROOT/cfg"
497
544
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
498
545
${SVN_PATH_AUTHZ_LINE}
547
<Location /authz-test-work/anon>
549
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
550
AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
551
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
552
SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
554
# This may seem unnecessary but granting access to everyone here is necessary
555
# to exercise a bug with httpd 2.3.x+. The "Require all granted" syntax is
556
# new to 2.3.x+ which we can detect with the mod_authz_core.c module
557
# signature. Use the "Allow from all" syntax with older versions for symmetry.
558
<IfModule mod_authz_core.c>
561
<IfModule !mod_authz_core.c>
564
${SVN_PATH_AUTHZ_LINE}
566
<Location /authz-test-work/mixed>
568
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
569
AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
570
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
571
SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
574
AuthName "Subversion Repository"
575
AuthUserFile $HTTPD_USERS
578
${SVN_PATH_AUTHZ_LINE}
580
<Location /authz-test-work/mixed-noauthwhenanon>
582
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
583
AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
584
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
585
SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
588
AuthName "Subversion Repository"
589
AuthUserFile $HTTPD_USERS
591
AuthzSVNNoAuthWhenAnonymousAllowed On
594
<Location /authz-test-work/authn>
596
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
597
AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
598
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
599
SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
602
AuthName "Subversion Repository"
603
AuthUserFile $HTTPD_USERS
605
${SVN_PATH_AUTHZ_LINE}
607
<Location /authz-test-work/authn-anonoff>
609
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
610
AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
611
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
612
SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
615
AuthName "Subversion Repository"
616
AuthUserFile $HTTPD_USERS
618
AuthzSVNAnonymous Off
621
<Location /authz-test-work/authn-lcuser>
623
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
624
AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
625
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
626
SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
629
AuthName "Subversion Repository"
630
AuthUserFile $HTTPD_USERS
632
AuthzForceUsernameCase Lower
633
${SVN_PATH_AUTHZ_LINE}
635
<Location /authz-test-work/authn-lcuser>
637
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
638
AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
639
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
640
SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
643
AuthName "Subversion Repository"
644
AuthUserFile $HTTPD_USERS
646
AuthzForceUsernameCase Lower
647
${SVN_PATH_AUTHZ_LINE}
649
<Location /authz-test-work/authn-group>
651
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
652
AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
653
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
654
SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
657
AuthName "Subversion Repository"
658
AuthUserFile $HTTPD_USERS
659
AuthGroupFile $HTTPD_GROUPS
661
AuthzSVNAuthoritative Off
664
<IfModule mod_authz_core.c>
665
<Location /authz-test-work/sallrany>
667
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
668
AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
669
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
670
SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
673
AuthName "Subversion Repository"
674
AuthUserFile $HTTPD_USERS
675
AuthzSendForbiddenOnFailure On
679
Require expr req('ALLOW') == '1'
681
${SVN_PATH_AUTHZ_LINE}
683
<Location /authz-test-work/sallrall>
685
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
686
AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
687
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
688
SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
691
AuthName "Subversion Repository"
692
AuthUserFile $HTTPD_USERS
693
AuthzSendForbiddenOnFailure On
697
Require expr req('ALLOW') == '1'
699
${SVN_PATH_AUTHZ_LINE}
500
702
RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)\$ /svn-test-work/repositories/\$1
501
703
RedirectMatch ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)\$ /svn-test-work/repositories/\$1
504
706
START="$HTTPD -f $HTTPD_CFG"
710
printf "Stopping previous HTTPD instance..."
712
# httpd had no output; echo a newline.
714
elif [ -s "%s" ]; then
715
# httpd would have printed an error terminated by a newline.
719
' >$STOPSCRIPT "$HTTPD_ROOT" "$START" "$HTTPD_PID" "$HTTPD_PID"
507
723
|| fail "Configuration file didn't pass the check, most likely modules couldn't be loaded"
551
776
say "starting the tests..."
553
778
CLIENT_CMD="$ABS_BUILDDIR/subversion/svn/svn"
554
$LDD "$CLIENT_CMD" | grep -q 'not found' \
555
&& fail "Subversion client couldn't be fully linked at run-time"
557
780
if [ "$HTTP_LIBRARY" = "" ]; then
558
781
say "Using default dav library"
559
"$CLIENT_CMD" --version | egrep -q '^[*] ra_(neon|serf)' \
782
"$CLIENT_CMD" --version | egrep '^[*] ra_(neon|serf)' >/dev/null \
560
783
|| fail "Subversion client couldn't find and/or load ra_dav library"
562
785
say "Requesting dav library '$HTTP_LIBRARY'"
563
"$CLIENT_CMD" --version | egrep -q "^[*] ra_$HTTP_LIBRARY" \
786
"$CLIENT_CMD" --version | egrep "^[*] ra_$HTTP_LIBRARY" >/dev/null \
564
787
|| fail "Subversion client couldn't find and/or load ra_dav library '$HTTP_LIBRARY'"
567
790
if [ $# = 0 ]; then
568
$TIME_CMD make check "BASE_URL=$BASE_URL" $SSL_MAKE_VAR
791
$TIME_CMD "$MAKE" check "BASE_URL=$BASE_URL" $SSL_MAKE_VAR
571
794
(cd "$ABS_BUILDDIR/subversion/tests/cmdline/"