Skip to content

Commit

Permalink
Make git-svn tests behave better on OS X
Browse files Browse the repository at this point in the history
Give lib-git-svn.sh a few alternate paths to look for apache2.
Explicitly define the LockFile so httpd will actually start under OS X

Signed-off-by: Kevin Ballard <kevin@sb.org>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Kevin Ballard authored and Junio C Hamano committed Mar 23, 2008
1 parent bf7c902 commit 3644da7
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions t/lib-git-svn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,28 @@ poke() {
test-chmtime +1 "$1"
}

SVN_HTTPD_MODULE_PATH=${SVN_HTTPD_MODULE_PATH-'/usr/lib/apache2/modules'}
SVN_HTTPD_PATH=${SVN_HTTPD_PATH-'/usr/sbin/apache2'}
for d in \
"$SVN_HTTPD_PATH" \
/usr/sbin/apache2 \
/usr/sbin/httpd \
; do
if test -f "$d"
then
SVN_HTTPD_PATH="$d"
break
fi
done
for d in \
"$SVN_HTTPD_MODULE_PATH" \
/usr/lib/apache2/modules \
/usr/libexec/apache2 \
; do
if test -d "$d"
then
SVN_HTTPD_MODULE_PATH="$d"
break
fi
done

start_httpd () {
if test -z "$SVN_HTTPD_PORT"
Expand All @@ -66,6 +86,7 @@ ServerName "git-svn test"
ServerRoot "$GIT_DIR"
DocumentRoot "$GIT_DIR"
PidFile "$GIT_DIR/httpd.pid"
LockFile logs/accept.lock
Listen 127.0.0.1:$SVN_HTTPD_PORT
LoadModule dav_module $SVN_HTTPD_MODULE_PATH/mod_dav.so
LoadModule dav_svn_module $SVN_HTTPD_MODULE_PATH/mod_dav_svn.so
Expand Down

0 comments on commit 3644da7

Please sign in to comment.