diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-01-17 16:00:13 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-17 16:00:13 -0800 |
commit | f287c65b265e8c676e65ade4ecb2d3a0243411fa (patch) | |
tree | 76401b97d7210d1104789c20ab7b0be2c965c755 /t | |
parent | f8eb50f60b5c8efda3529fcf89517080c686ce0b (diff) | |
parent | 0d344738dc55a75bddbcd9a08ea9a7b401f1aa63 (diff) | |
download | git-f287c65b265e8c676e65ade4ecb2d3a0243411fa.tar.gz |
Merge branch 'tc/test-locate-httpd'
* tc/test-locate-httpd:
t/lib-http.sh: Restructure finding of default httpd location
Diffstat (limited to 't')
-rw-r--r-- | t/lib-httpd.sh | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh index 6765b08065..28aff887b5 100644 --- a/t/lib-httpd.sh +++ b/t/lib-httpd.sh @@ -12,16 +12,29 @@ fi HTTPD_PARA="" +for DEFAULT_HTTPD_PATH in '/usr/sbin/httpd' '/usr/sbin/apache2' +do + if test -x "$DEFAULT_HTTPD_PATH" + then + break + fi +done + +for DEFAULT_HTTPD_MODULE_PATH in '/usr/libexec/apache2' \ + '/usr/lib/apache2/modules' \ + '/usr/lib64/httpd/modules' \ + '/usr/lib/httpd/modules' +do + if test -d "$DEFAULT_HTTPD_MODULE_PATH" + then + break + fi +done + case $(uname) in Darwin) - DEFAULT_HTTPD_PATH='/usr/sbin/httpd' - DEFAULT_HTTPD_MODULE_PATH='/usr/libexec/apache2' HTTPD_PARA="$HTTPD_PARA -DDarwin" ;; - *) - DEFAULT_HTTPD_PATH='/usr/sbin/apache2' - DEFAULT_HTTPD_MODULE_PATH='/usr/lib/apache2/modules' - ;; esac LIB_HTTPD_PATH=${LIB_HTTPD_PATH-"$DEFAULT_HTTPD_PATH"} @@ -49,6 +62,11 @@ then say "skipping test, at least Apache version 2 is required" test_done fi + if ! test -d "$DEFAULT_HTTPD_MODULE_PATH" + then + say "Apache module directory not found. Skipping tests." + test_done + fi LIB_HTTPD_MODULE_PATH="$DEFAULT_HTTPD_MODULE_PATH" fi |