From e9c8fb30f2cbf2b87fbfeed92c0abe06bbc2988a Mon Sep 17 00:00:00 2001 From: "Yichun Zhang (agentzh)" Date: Thu, 16 Jun 2016 12:34:58 -0700 Subject: [PATCH] dist-check: added a test build disabling lua ffi in ngx_lua. --- util/dist-check | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/util/dist-check b/util/dist-check index e543cc0..ed2d22c 100755 --- a/util/dist-check +++ b/util/dist-check @@ -67,6 +67,24 @@ sub write_config_file ($) { write_config_file "/tmp/nginx.conf"; +warn "=== Without FFI ===\n"; +$prefix = "/usr/local/openresty-noffi"; +sh "sudo rm -rf $prefix/lualib $prefix/luajit $prefix/bin $prefix/lua $prefix/nginx/sbin $prefix/nginx/html"; +unless ($opts{f}) { + sh "./configure $cfg_opts --with-cc-opt='-DNGX_LUA_NO_FFI_API' --prefix=$prefix -j$jobs > /dev/null"; +} +sh "$make -j$jobs > /dev/null"; +sh "sudo $make install > /dev/null"; +sh "sudo cp /tmp/nginx.conf $prefix/nginx/conf/nginx.conf"; +sh "$prefix/nginx/sbin/nginx -V 2>&1 |grep $ver"; +system "sudo killall nginx > /dev/null 2>&1"; +sh "sudo $prefix/nginx/sbin/nginx"; +sh "curl -si localhost/lua|grep $lua"; +sh "curl -si localhost/lua|grep $ver"; +sh "curl -si localhost/cjson|grep 'json.safe: '"; +sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'}; +sh "sudo $prefix/nginx/sbin/nginx -sstop"; + warn "=== --with-stream ===\n"; $prefix = "/usr/local/openresty-stream"; sh "sudo rm -rf $prefix/lualib $prefix/luajit $prefix/bin $prefix/lua $prefix/nginx/sbin $prefix/nginx/html";