Tests: Check that dynamic module is not built when build is not dynamic

pull/55/head
Adrian Perez de Castro 2016-08-17 22:35:03 +03:00
parent 3c70b9f5c8
commit 8d47b33509
No known key found for this signature in database
GPG Key ID: 91C559DBE4C9123B
1 changed files with 10 additions and 4 deletions

View File

@ -2,10 +2,16 @@
readonly nginx_path="${PREFIX}/sbin/nginx"
readonly so_path="${PREFIX}/modules/ngx_http_fancyindex_module.so"
[[ -x ${nginx_path} ]] \
|| fail "executable binary not found at '%s'\n" "${nginx_path}"
if [[ ! -x ${nginx_path} ]] ; then
fail "executable binary not found at '%s'\n" "${nginx_path}"
fi
if ${DYNAMIC} ; then
[[ -r ${so_path} ]] \
|| fail "module not found at '%s'\n" "${so_path}"
if [[ ! -r ${so_path} ]] ; then
fail "module not found at '%s'\n" "${so_path}"
fi
else
if [[ -r ${so_path} ]] ; then
fail "module should not exist at '%s'\n" "${so_path}"
fi
fi