Permalink
Browse files

updated the link to NDK.

  • Loading branch information...
1 parent 2f9b18d commit 556f6ae3376264c3aa272e729778a2406ae333e9 @agentzh agentzh committed Jan 11, 2011
Showing with 90 additions and 4 deletions.
  1. +2 −2 README
  2. +28 −1 test/lib/Test/Nginx/Util.pm
  3. +1 −1 test/t/sanity.t
  4. +59 −0 util/build.sh
View
4 README
@@ -41,7 +41,7 @@ Installation
example, the version 0.8.41 (see nginx compatibility),
2. Grab the NDK module from GitHub:
- http://github.com/simpl-it/ngx_devel_kit
+ http://github.com/simpl/ngx_devel_kit
3. and then build the source with this module:
@@ -165,5 +165,5 @@ Copyright & License
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
See Also
- NDK: http://github.com/simpl-it/ngx_devel_kit
+ NDK: http://github.com/simpl/ngx_devel_kit
@@ -51,6 +51,7 @@ our $ServerPort = $ENV{TEST_NGINX_SERVER_PORT} || $ENV{TEST_NGINX_PO
our $ServerPortForClient = $ENV{TEST_NGINX_CLIENT_PORT} || $ENV{TEST_NGINX_PORT} || 1984;
our $NoRootLocation = 0;
our $TestNginxSleep = $ENV{TEST_NGINX_SLEEP} || 0;
+our $BuildSlaveName = $ENV{TEST_NGINX_BUILDSLAVE};
sub server_port (@) {
if (@_) {
@@ -438,7 +439,10 @@ sub check_if_missing_directives () {
while (<$in>) {
#warn $_;
if (/\[emerg\] \S+?: unknown directive "([^"]+)"/) {
- #warn "MATCHED!!! $1";
+ return $1;
+ }
+ if (/\[error\] .*? [dD]irective "(\S+)" not found/) {
+ warn "MATCHED!!! $1";
return $1;
}
}
@@ -468,6 +472,7 @@ sub run_test ($) {
my $skip_nginx = $block->skip_nginx;
my $skip_nginx2 = $block->skip_nginx2;
+ my $skip_slave = $block->skip_slave;
my ($tests_to_skip, $should_skip, $skip_reason);
if (defined $skip_nginx) {
if ($skip_nginx =~ m{
@@ -519,6 +524,28 @@ sub run_test ($) {
$skip_nginx2);
die;
}
+ } elsif (defined $skip_slave and defined $BuildSlaveName) {
+ if ($skip_slave =~ m{
+ ^ \s* (\d+) \s* : \s*
+ (\w+) \s* (?: (\w+) \s* )? (?: (\w+) \s* )?
+ (?: \s* : \s* (.*) )? \s*$}x)
+ {
+ $tests_to_skip = $1;
+ my ($slave1, $slave2, $slave3) = ($2, $3, $4);
+ $skip_reason = $5;
+ if ((defined $slave1 and $slave1 eq "all")
+ or (defined $slave1 and $slave1 eq $BuildSlaveName)
+ or (defined $slave2 and $slave2 eq $BuildSlaveName)
+ or (defined $slave3 and $slave3 eq $BuildSlaveName)
+ )
+ {
+ $should_skip = 1;
+ }
+ } else {
+ bail_out("$name - Invalid --- skip_slave spec: " .
+ $skip_slave);
+ die;
+ }
}
if (!defined $skip_reason) {
View
@@ -294,7 +294,7 @@ bob-marry-nomas
GET /foo?names=bob,marry,nomas
--- response_body
'bob'+'marry'+'nomas'
-
+--- ONLY
=== TEST 20: map op (copy)
View
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+# this file is mostly meant to be used by the author himself.
+
+rm ~/work/nginx-0.8.41/objs/addon/ndk/ndk.o ~/work/nginx-0.8.41/objs/addon/ndk-nginx-module/ndk.o
+
+root=`pwd`
+home=~
+
+cd ~/work
+version=$1
+opts=$2
+
+if [ ! -s "nginx-$version.tar.gz" ]; then
+ wget "http://sysoev.ru/nginx/nginx-$version.tar.gz" -O nginx-$version.tar.gz
+ if [ "$?" != 0 ]; then
+ echo Abort.
+ exit 1;
+ fi
+ tar -xzvf nginx-$version.tar.gz
+ if [ "$?" != 0 ]; then
+ echo Abort.
+ exit 1;
+ fi
+ if [ "$version" = "0.8.41" ]; then
+ cp $root/../no-pool-nginx/nginx-0.8.41-no_pool.patch ./
+ patch -p0 < nginx-0.8.41-no_pool.patch
+ if [ "$?" != 0 ]; then
+ echo Abort.
+ exit 1
+ fi
+ fi
+fi
+
+#tar -xzvf nginx-$version.tar.gz || exit 1
+#cp $root/../no-pool-nginx/nginx-0.8.41-no_pool.patch ./
+#patch -p0 < nginx-0.8.41-no_pool.patch
+
+cd nginx-$version/
+if [[ "$BUILD_CLEAN" -eq 1 || ! -f Makefile || "$root/config" -nt Makefile || "$root/util/build.sh" -nt Makefile ]]; then
+ ./configure --prefix=/opt/nginx \
+ --add-module=$root/../echo-nginx-module \
+ --add-module=$root/../ndk-nginx-module \
+ --add-module=$root $opts \
+ --with-debug
+ #--add-module=$root/../set-misc-nginx-module \
+ #--add-module=$home/work/ndk \
+ #--without-http_ssi_module # we cannot disable ssi because echo_location_async depends on it (i dunno why?!)
+
+fi
+if [ -f /opt/nginx/sbin/nginx ]; then
+ rm -f /opt/nginx/sbin/nginx
+fi
+if [ -f /opt/nginx/logs/nginx.pid ]; then
+ kill `cat /opt/nginx/logs/nginx.pid`
+fi
+make -j3
+make install
+

0 comments on commit 556f6ae

Please sign in to comment.