minor fixes in dist-check.

This commit is contained in:
Yichun Zhang (agentzh) 2017-06-26 22:14:20 -07:00
parent bc2068420c
commit b1400169a7
1 changed files with 9 additions and 9 deletions

View File

@ -77,7 +77,7 @@ sh "sudo $prefix/nginx/sbin/nginx";
sh "curl -si localhost/lua|grep $lua"; sh "curl -si localhost/lua|grep $lua";
sh "curl -si localhost/lua|grep $ver"; sh "curl -si localhost/lua|grep $ver";
sh "curl -si localhost/cjson|grep 'json.safe: '"; sh "curl -si localhost/cjson|grep 'json.safe: '";
sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'}; #sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'};
sh "sudo $prefix/nginx/sbin/nginx -sstop"; sh "sudo $prefix/nginx/sbin/nginx -sstop";
warn "\n=== --with-stream ===\n"; warn "\n=== --with-stream ===\n";
@ -137,7 +137,7 @@ sh "sudo $prefix/nginx/sbin/nginx";
sh "curl -si localhost/lua|grep $lua"; sh "curl -si localhost/lua|grep $lua";
sh "curl -si localhost/lua|grep $ver"; sh "curl -si localhost/lua|grep $ver";
sh "curl -si localhost/cjson|grep 'json.safe: '"; sh "curl -si localhost/cjson|grep 'json.safe: '";
sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'}; #sh qq{$prefix/bin/resty -e 'ngx.say("Hello World!")'|grep 'Hello World'};
sh "sudo $prefix/nginx/sbin/nginx -sstop"; sh "sudo $prefix/nginx/sbin/nginx -sstop";
$cfg_opts .= " --with-http_iconv_module"; $cfg_opts .= " --with-http_iconv_module";
@ -263,7 +263,7 @@ sub cleanup () {
__DATA__ __DATA__
user nobody; user nobody;
worker_processes 1; worker_processes 2;
error_log logs/error.log; error_log logs/error.log;
pid logs/nginx.pid; pid logs/nginx.pid;
@ -276,11 +276,11 @@ http {
include mime.types; include mime.types;
default_type application/octet-stream; default_type application/octet-stream;
init_by_lua ' init_by_lua_block {
if jit then if jit then
require "resty.core" require "resty.core"
end end
'; }
upstream backend { upstream backend {
server 0.0.0.1; server 0.0.0.1;
@ -294,21 +294,21 @@ http {
server_name localhost; server_name localhost;
location = /lua { location = /lua {
content_by_lua ' content_by_lua_block {
local upstream = require "ngx.upstream" local upstream = require "ngx.upstream"
if jit then if jit then
ngx.say(jit.version) ngx.say(jit.version)
else else
ngx.say(_VERSION) ngx.say(_VERSION)
end end
'; }
} }
location = /cjson { location = /cjson {
content_by_lua ' content_by_lua_block {
local json = require "cjson.safe" local json = require "cjson.safe"
ngx.say("cjson.safe: ", json.encode{foo = 123}) ngx.say("cjson.safe: ", json.encode{foo = 123})
'; }
} }
} }
} }