From 8d47b335099d131764cdc52260830798ebed7ccd Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Wed, 17 Aug 2016 22:35:03 +0300 Subject: [PATCH] Tests: Check that dynamic module is not built when build is not dynamic --- t/00-build-artifacts.test | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/t/00-build-artifacts.test b/t/00-build-artifacts.test index 2575550..03960fe 100644 --- a/t/00-build-artifacts.test +++ b/t/00-build-artifacts.test @@ -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