From 882d7a7eec148046a90e1d111b93e353e3df0c31 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 24 Mar 2015 23:26:32 +0100 Subject: [PATCH 1/6] Adding pre-built packages for OpenSSL and protobuf for Travis. --- .travis.yml | 4 ++++ tools/run_tests/prepare_travis.sh | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100755 tools/run_tests/prepare_travis.sh diff --git a/.travis.yml b/.travis.yml index e43a89e453a..d6d67d415cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,9 @@ env: global: - RUBY_VERSION=2.1 - COVERALLS_PARALLEL=true + - CPPFLAGS=-I/tmp/prebuilt/include + - LDFLAGS=-L/tmp/prebuilt/lib + - PATH=/tmp/prebuilt/bin:$PATH matrix: - CONFIG=dbg TEST=c - CONFIG=dbg TEST=c++ @@ -22,6 +25,7 @@ env: script: - rvm use $RUBY_VERSION - gem install bundler + - ./tools/run_tests/prepare_travis.sh - ./tools/run_tests/run_tests.py -l $TEST -t -j 16 -c $CONFIG -s 4.0 after_success: - if [ "$CONFIG" = "gcov" ] ; then coveralls --exclude third_party --exclude gens -b. --gcov-options '\-p' ; fi diff --git a/tools/run_tests/prepare_travis.sh b/tools/run_tests/prepare_travis.sh new file mode 100755 index 00000000000..2be86270ddc --- /dev/null +++ b/tools/run_tests/prepare_travis.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +cd `dirname $0`/../.. +grpc_dir=`pwd` + +distrib=`md5sum /etc/issue | cut -f1 -d\ ` +git submodule | while read sha path extra ; do + cd /tmp + name=`basename $path` + file=$name-$sha-$CONFIG-prebuilt-$distrib.tar.gz + echo $file + url=http://storage.googleapis.com/grpc-prebuilt-packages/$file + wget -q $url && tar xfz $file || true +done From b8776398c5bdba2083ba2f31364327ae2bc4eb13 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 29 Apr 2015 13:07:12 -0700 Subject: [PATCH 2/6] Exposed server address string in stub --- src/node/src/client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node/src/client.js b/src/node/src/client.js index fad369c2f80..b2b79e8b706 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -488,6 +488,7 @@ function makeClientConstructor(methods) { callback(null, metadata); }; } + this.server_address = address; this.channel = new grpc.Channel(address, options); } From 9adbf489707ce7eee4307d3540a61950aa633fad Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 30 Apr 2015 02:26:51 +0200 Subject: [PATCH 3/6] Adjusting scripts to fake-install. --- .travis.yml | 4 +--- tools/run_tests/prepare_travis.sh | 31 ++++++++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 23cb0a09b25..0f6acbf003d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,6 @@ env: - RUBY_VERSION=2.1 - COVERALLS_PARALLEL=true - CPPFLAGS=-I/tmp/prebuilt/include - - LDFLAGS=-L/tmp/prebuilt/lib - - PATH=/tmp/prebuilt/bin:$PATH - NUGET="mono nuget.exe" matrix: - CONFIG=opt TEST=sanity @@ -35,7 +33,7 @@ env: script: - rvm use $RUBY_VERSION - gem install bundler - - ./tools/run_tests/prepare_travis.sh + - if [ -z "$USE_GCC" ] ; then ./tools/run_tests/prepare_travis.sh ; fi - if [ ! -z "$USE_GCC" ] ; then export CC=gcc-$USE_GCC ; export CXX=g++-$USE_GCC ; fi - ./tools/run_tests/run_tests.py -l $TEST -t -j 16 -c $CONFIG -s 4.0 after_success: diff --git a/tools/run_tests/prepare_travis.sh b/tools/run_tests/prepare_travis.sh index 2be86270ddc..a8ddc578d5f 100755 --- a/tools/run_tests/prepare_travis.sh +++ b/tools/run_tests/prepare_travis.sh @@ -1,14 +1,39 @@ -#!/bin/sh +#!/bin/bash cd `dirname $0`/../.. grpc_dir=`pwd` distrib=`md5sum /etc/issue | cut -f1 -d\ ` +echo "Configuring for disbribution $distrib" git submodule | while read sha path extra ; do cd /tmp name=`basename $path` file=$name-$sha-$CONFIG-prebuilt-$distrib.tar.gz - echo $file + echo -n "$file ..." url=http://storage.googleapis.com/grpc-prebuilt-packages/$file - wget -q $url && tar xfz $file || true + wget -q $url && ( + echo " Found." + tar xfz $file + ) || true done + +mkdir -p bins/$CONFIG/protobuf +mkdir -p libs/$CONFIG/protobuf +mkdir -p libs/$CONFIG/openssl + +function cpt { + cp /tmp/prebuilt/$1 $2/$CONFIG/$3 + touch $2/$CONFIG/$3/`basename $1` +} + +if [ -e /tmp/prebuilt/bin/protoc ] ; then + touch third_party/protobuf/configure + cpt bin/protoc bins protobuf + cpt lib/libprotoc.a libs protobuf + cpt lib/libprotobuf.a libs protobuf +fi + +if [ -e /tmp/prebuilt/lib/libssl.a ] ; then + cpt lib/libcrypto.a libs openssl + cpt lib/libssl.a libs openssl +fi From 7d9df1b23a456ad4e7b9d665d8acd2ab81f8e4cd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 29 Apr 2015 21:50:17 -0700 Subject: [PATCH 4/6] Merge C/C++ build steps on Travis --- .travis.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d8634506c3..11adf0442e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,15 +11,12 @@ env: - COVERALLS_PARALLEL=true matrix: - CONFIG=opt TEST=sanity - - CONFIG=dbg TEST=c - - CONFIG=dbg TEST=c++ - - CONFIG=opt TEST=c - - CONFIG=opt TEST=c++ + - CONFIG=dbg TEST="c c++" + - CONFIG=opt TEST="c c++" - CONFIG=opt TEST=node - CONFIG=opt TEST=ruby - CONFIG=opt TEST=python - - CONFIG=gcov TEST=c - - CONFIG=gcov TEST=c++ + - CONFIG=gcov TEST="c c++" - USE_GCC=4.4 CONFIG=opt TEST=build - USE_GCC=4.5 CONFIG=opt TEST=build script: From f0668c83bbdfb6b942d1ae7b7f650c07930e3c68 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 30 Apr 2015 07:01:31 +0200 Subject: [PATCH 5/6] Alright, fine Travis. You can try and build for another version of gcc. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0f6acbf003d..dfe0441abc3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ env: script: - rvm use $RUBY_VERSION - gem install bundler - - if [ -z "$USE_GCC" ] ; then ./tools/run_tests/prepare_travis.sh ; fi + - ./tools/run_tests/prepare_travis.sh - if [ ! -z "$USE_GCC" ] ; then export CC=gcc-$USE_GCC ; export CXX=g++-$USE_GCC ; fi - ./tools/run_tests/run_tests.py -l $TEST -t -j 16 -c $CONFIG -s 4.0 after_success: From 3874ad0833d670d73db88a7afd65145ff2c0f2ae Mon Sep 17 00:00:00 2001 From: zeliard Date: Thu, 30 Apr 2015 16:05:45 +0900 Subject: [PATCH 6/6] make initializing overlapped-struct obvious for preventing a ciritical bug --- src/core/iomgr/tcp_windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/iomgr/tcp_windows.c b/src/core/iomgr/tcp_windows.c index 71534eaa3df..940cd5bcde1 100644 --- a/src/core/iomgr/tcp_windows.c +++ b/src/core/iomgr/tcp_windows.c @@ -289,7 +289,7 @@ static grpc_endpoint_write_status win_write(grpc_endpoint *ep, return ret; } - memset(&socket->write_info, 0, sizeof(OVERLAPPED)); + memset(&socket->write_info.overlapped, 0, sizeof(OVERLAPPED)); status = WSASend(socket->socket, buffers, tcp->write_slices.count, &bytes_sent, 0, &socket->write_info.overlapped, NULL); if (allocated) gpr_free(allocated);