The package ships DEP-8 smoketesting.

In your test VM:

cd nginx-*/
apt install autopkgtest

adt-run -B ./ --- null
adt-run --testname light-module-deps -B ./ --- null
adt-run ../nginx_*_amd64.changes --- null

adt-run is easily confused by e.g. nginx-light conflicting with nginx-full, so you need to setup a local APT archive:

cd /usr/src/nginx/
apt-ftparchive release . > Release
apt-ftparchive packages . > Packages
echo 'deb [trusted=yes] file:///usr/src/nginx ./' >> /etc/apt/sources.list
apt update


ngx_lua is bundled in debian/modules/.

apt install nginx-extras
service nginx restart

# Test::Nginx
apt install libtext-diff-perl libtest-longstring-perl libtest-lwp-useragent-perl libwww-perl libtest-base-perl
git clone
cd test-nginx/
perl Makefile.PL 

## Recreate nginx-tap from openresty
## TODO: apparently this is specific to openresty/nginx-dtrace anyway
#apt install systemtap linux-headers-amd64
#cat <<'EOF' > /usr/local/bin/stap-nginx
#stap -d /usr/sbin/nginx "$@"
#chmod 755 /usr/local/bin/stap-nginx

# Install ngx_memc
git clone debian/modules/memc-nginx-module
# debian:rules: add to extras_configure_flags: --add-dynamic-module=$(MODULESDIR)/memc-nginx-module
cp -a ./debian/build-extras/objs/ /usr/lib/nginx/modules/
apt install memcached
# remember to remove the module from the packaging...

export TEST_NGINX_LOAD_MODULES=$(echo /usr/lib/nginx/modules/*)
prove -I /usr/src/test-nginx/lib -r t
prove -I /usr/src/test-nginx/lib t/020-subrequest.t 

See also: