| 1 |
#!/bin/sh |
| 2 |
set -e |
| 3 |
|
| 4 |
# debug print |
| 5 |
echo "uname -m: `uname -m`" |
| 6 |
echo |
| 7 |
|
| 8 |
if [ ! -f /usr/lib/nginx/modules/ngx_http_lua_module.so ]; then |
| 9 |
# Skip the test if ngx_http_lua_module.so doesn't exist |
| 10 |
exit 77 |
| 11 |
fi |
| 12 |
|
| 13 |
# Disable init-by-lua tests. |
| 14 |
# These tests works only against Openresty compiled nginx. |
| 15 |
# Fails against Debian nginx. |
| 16 |
mv -f t/003-init-by-lua.t t/003-init-by-lua.t.bk |
| 17 |
mv -f t/100-pureffi/003-init-by-lua.t t/100-pureffi/003-init-by-lua.t.bk |
| 18 |
cleanup() { |
| 19 |
mv -f t/003-init-by-lua.t.bk t/003-init-by-lua.t |
| 20 |
mv -f t/100-pureffi/003-init-by-lua.t.bk t/100-pureffi/003-init-by-lua.t |
| 21 |
} |
| 22 |
trap "cleanup" EXIT TERM INT |
| 23 |
|
| 24 |
TEST_NGINX_LOAD_MODULES="/usr/lib/nginx/modules/ndk_http_module.so /usr/lib/nginx/modules/ngx_http_lua_module.so" |
| 25 |
export TEST_NGINX_LOAD_MODULES |
| 26 |
|
| 27 |
TEST_NGINX_BINARY=/usr/sbin/nginx |
| 28 |
export TEST_NGINX_BINARY |
| 29 |
|
| 30 |
# run test |
| 31 |
prove -I./debian/tests/perl/Test-Nginx-0.30/lib -r t/ |