From d30b005198f639d8b3d4855e62aabee449083c55 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 3 Mar 2015 04:30:00 +0100 Subject: [PATCH 1/5] Adding coverage report. --- .travis.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index de320b59a3a..e43a89e453a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,11 @@ before_install: - sudo add-apt-repository ppa:h-rayflood/llvm -y - sudo apt-get update -qq - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv clang-3.5 + - sudo pip install cpp-coveralls env: global: - RUBY_VERSION=2.1 + - COVERALLS_PARALLEL=true matrix: - CONFIG=dbg TEST=c - CONFIG=dbg TEST=c++ @@ -15,9 +17,15 @@ env: - CONFIG=opt TEST=node - CONFIG=opt TEST=ruby - CONFIG=opt TEST=python + - CONFIG=gcov TEST=c + - CONFIG=gcov TEST=c++ script: - rvm use $RUBY_VERSION - gem install bundler - ./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 notifications: - email: false \ No newline at end of file + email: false + webhooks: + - https://coveralls.io/webhook?repo_token=54IxAHPjJNdQJzJAhPU0MFpCtg7KvcydQ From 38bf129a3e64bcb2c3d99e699e80cbf4cd989b61 Mon Sep 17 00:00:00 2001 From: Donna Dionne Date: Tue, 3 Mar 2015 18:07:11 -0800 Subject: [PATCH 2/5] Just a few more changes to include csharp into build and test --- tools/gce_setup/grpc_docker.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh index 886385679bb..fbb7eeebf74 100755 --- a/tools/gce_setup/grpc_docker.sh +++ b/tools/gce_setup/grpc_docker.sh @@ -674,7 +674,7 @@ _grpc_launch_servers_args() { [[ -n $1 ]] && { servers="$@" } || { - servers="cxx java go node ruby python" + servers="cxx java go node ruby python csharp_mono" echo "$FUNCNAME: no servers specified, will launch defaults '$servers'" } } @@ -710,6 +710,7 @@ grpc_launch_servers() { node) grpc_port=8040 ;; python) grpc_port=8050 ;; ruby) grpc_port=8060 ;; + csharp_mono) grpc_port=8070 ;; *) echo "bad server_type: $1" 1>&2; return 1 ;; esac local docker_label="grpc/$server" From ee7ab3db2f49a25e097b0c75959f1b980e3f6f3c Mon Sep 17 00:00:00 2001 From: Yang Gao Date: Wed, 4 Mar 2015 09:08:28 -0800 Subject: [PATCH 3/5] Remove include google/protobuf/message.h as it should be covered in config.h --- include/grpc++/impl/rpc_service_method.h | 2 +- include/grpc++/server_context.h | 2 +- src/cpp/client/channel.cc | 1 - src/cpp/common/call.cc | 1 - src/cpp/proto/proto_utils.cc | 1 - src/cpp/server/async_server_context.cc | 2 +- 6 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/grpc++/impl/rpc_service_method.h b/include/grpc++/impl/rpc_service_method.h index 325c8812caf..097667827a1 100644 --- a/include/grpc++/impl/rpc_service_method.h +++ b/include/grpc++/impl/rpc_service_method.h @@ -39,10 +39,10 @@ #include #include +#include #include #include #include -#include namespace grpc { class ServerContext; diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h index 9387f4a7e26..a986fff46bf 100644 --- a/include/grpc++/server_context.h +++ b/include/grpc++/server_context.h @@ -37,7 +37,7 @@ #include #include -#include "config.h" +#include struct gpr_timespec; struct grpc_metadata; diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc index ca69d66cbbf..450cf67ac8b 100644 --- a/src/cpp/client/channel.cc +++ b/src/cpp/client/channel.cc @@ -50,7 +50,6 @@ #include #include #include -#include namespace grpc { diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc index b2b6c627857..6ce1e8a7d58 100644 --- a/src/cpp/common/call.cc +++ b/src/cpp/common/call.cc @@ -31,7 +31,6 @@ * */ -#include #include #include #include diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/proto/proto_utils.cc index e6badd5d6e7..72f1bf74417 100644 --- a/src/cpp/proto/proto_utils.cc +++ b/src/cpp/proto/proto_utils.cc @@ -36,7 +36,6 @@ #include #include -#include namespace grpc { diff --git a/src/cpp/server/async_server_context.cc b/src/cpp/server/async_server_context.cc index bee75497b8c..f21efcfb19a 100644 --- a/src/cpp/server/async_server_context.cc +++ b/src/cpp/server/async_server_context.cc @@ -36,7 +36,7 @@ #include #include #include "src/cpp/proto/proto_utils.h" -#include +#include #include namespace grpc { From cfc7864fb30687c99ad35af09a9c33a37d9b42af Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 Mar 2015 10:37:13 -0800 Subject: [PATCH 4/5] fix gce script for cloud to cloud C# client --- tools/gce_setup/grpc_docker.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh index fbb7eeebf74..619eff56d62 100755 --- a/tools/gce_setup/grpc_docker.sh +++ b/tools/gce_setup/grpc_docker.sh @@ -1170,8 +1170,9 @@ grpc_cloud_prod_auth_compute_engine_creds_gen_cxx_cmd() { # flags= .... # generic flags to include the command # cmd=$($grpc_gen_test_cmd $flags) grpc_interop_gen_csharp_mono_cmd() { - local cmd_prefix="sudo docker run grpc/csharp_mono"; - local test_script="mono /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/Grpc.IntegrationTesting.Client.exe --use_tls=true --use_test_ca=true"; + local workdir_flag="-w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug" + local cmd_prefix="sudo docker run $workdir_flag grpc/csharp_mono"; + local test_script="mono Grpc.IntegrationTesting.Client.exe --use_tls=true --use_test_ca=true"; local the_cmd="$cmd_prefix $test_script $@"; echo $the_cmd } @@ -1183,8 +1184,9 @@ grpc_interop_gen_csharp_mono_cmd() { # cmd=$($grpc_gen_test_cmd $flags) grpc_cloud_prod_gen_csharp_mono_cmd() { local env_flag="-e SSL_CERT_FILE=/cacerts/roots.pem " - local cmd_prefix="sudo docker run $env_flag grpc/csharp_mono"; - local test_script="mono /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/Grpc.IntegrationTesting.Client.exe --use_tls=true"; + local workdir_flag="-w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug" + local cmd_prefix="sudo docker run $env_flag $workdir_flag grpc/csharp_mono"; + local test_script="mono Grpc.IntegrationTesting.Client.exe --use_tls=true"; local gfe_flags=$(_grpc_prod_gfe_flags); local the_cmd="$cmd_prefix $test_script $gfe_flags $@"; echo $the_cmd From f7e32a669ef253679d61e3ba56497343c3170738 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 Mar 2015 11:29:09 -0800 Subject: [PATCH 5/5] C# interop client support for external CA file --- src/csharp/Grpc.IntegrationTesting/InteropClient.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index e560112a899..30301f165ba 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -103,8 +103,16 @@ namespace Grpc.IntegrationTesting Credentials credentials = null; if (options.useTls) { - // TODO: use also Env variable for location of the ca file. - credentials = new SslCredentials(File.ReadAllText("data/ca.pem")); + string caPath = "data/ca.pem"; // Default testing CA + if (!options.useTestCa) + { + caPath = Environment.GetEnvironmentVariable("SSL_CERT_FILE"); + if (string.IsNullOrEmpty(caPath)) + { + throw new ArgumentException("CA path environment variable is not set."); + } + } + credentials = new SslCredentials(File.ReadAllText(caPath)); } ChannelArgs channelArgs = null;