Merge github.com:grpc/grpc into one-pass

pull/1369/head
Craig Tiller 10 years ago
commit 820b68069a
  1. 7
      .travis.yml
  2. 4
      src/core/iomgr/resolve_address_windows.c
  3. 2
      src/core/iomgr/tcp_server_windows.c
  4. 1
      src/core/surface/server.c
  5. 1
      src/core/tsi/ssl_transport_security.c
  6. 3
      test/cpp/qps/smoke_test.cc
  7. 32
      tools/gce_setup/grpc_docker.sh
  8. 14
      tools/run_tests/build_csharp.sh
  9. 17
      tools/run_tests/run_csharp.sh
  10. 11
      tools/run_tests/run_tests.py

@ -2,13 +2,19 @@ language: cpp
before_install:
- sudo add-apt-repository ppa:yjwong/gflags -y
- sudo add-apt-repository ppa:h-rayflood/llvm -y
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
- echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
- echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
- sudo apt-get update -qq
- sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv clang-3.5
- sudo pip install cpp-coveralls mako simplejson
- sudo apt-get install -qq mono-devel nunit
- wget www.nuget.org/NuGet.exe -O nuget.exe
env:
global:
- RUBY_VERSION=2.1
- COVERALLS_PARALLEL=true
- NUGET="mono nuget.exe"
matrix:
- CONFIG=opt TEST=sanity
- CONFIG=dbg TEST=c
@ -18,6 +24,7 @@ env:
- CONFIG=opt TEST=node
- CONFIG=opt TEST=ruby
- CONFIG=opt TEST=python
- CONFIG=opt TEST=csharp
- CONFIG=gcov TEST=c
- CONFIG=gcov TEST=c++
- USE_GCC=4.4 CONFIG=opt TEST=build

@ -65,7 +65,6 @@ grpc_resolved_addresses *grpc_blocking_resolve_address(
int s;
size_t i;
grpc_resolved_addresses *addrs = NULL;
const gpr_timespec start_time = gpr_now();
/* parse name, splitting it into host and port parts */
gpr_split_host_port(name, &host, &port);
@ -108,9 +107,6 @@ grpc_resolved_addresses *grpc_blocking_resolve_address(
}
{
const gpr_timespec delay = gpr_time_sub(gpr_now(), start_time);
const int delay_ms =
delay.tv_sec * GPR_MS_PER_SEC + delay.tv_nsec / GPR_NS_PER_MS;
for (i = 0; i < addrs->naddrs; i++) {
char *buf;
grpc_sockaddr_to_string(&buf, (struct sockaddr *)&addrs->addrs[i].addr,

@ -192,7 +192,7 @@ static void start_accept(server_port *port) {
}
/* TODO(jtattermusch): probably a race here, we regularly get use-after-free on server shutdown */
GPR_ASSERT(port->socket != 0xfeeefeee);
GPR_ASSERT(port->socket != (grpc_winsocket*)0xfeeefeee);
success = port->AcceptEx(port->socket->socket, sock, port->addresses, 0,
addrlen, addrlen, &bytes_received,
&port->socket->read_info.overlapped);

@ -1106,6 +1106,7 @@ static void begin_call(grpc_server *server, call_data *calld,
&rc->data.batch.details->host_capacity, calld->host);
cpstr(&rc->data.batch.details->method,
&rc->data.batch.details->method_capacity, calld->path);
rc->data.batch.details->deadline = calld->deadline;
grpc_call_set_completion_queue(calld->call, rc->data.batch.cq_bind);
*rc->data.batch.call = calld->call;
r->op = GRPC_IOREQ_RECV_INITIAL_METADATA;

@ -34,6 +34,7 @@
#include "src/core/tsi/ssl_transport_security.h"
#include <limits.h>
#include <string.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>

@ -33,6 +33,8 @@
#include <grpc/support/log.h>
#include <signal.h>
#include "test/cpp/qps/driver.h"
#include "test/cpp/qps/report.h"
@ -136,6 +138,7 @@ static void RunQPS() {
} // namespace grpc
int main(int argc, char** argv) {
signal(SIGPIPE, SIG_IGN);
using namespace grpc::testing;
RunSynchronousStreamingPingPong();
RunSynchronousUnaryPingPong();

@ -1401,6 +1401,38 @@ grpc_cloud_prod_gen_csharp_mono_cmd() {
echo $the_cmd
}
# constructs the full dockerized csharp-mono service_account auth interop test cmd.
#
# call-seq:
# flags= .... # generic flags to include the command
# cmd=$($grpc_gen_test_cmd $flags)
grpc_cloud_prod_auth_service_account_creds_gen_csharp_mono_cmd() {
local workdir_flag="-w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug"
local env_flag="-e SSL_CERT_FILE=/cacerts/roots.pem "
env_flag+="-e GOOGLE_APPLICATION_CREDENTIALS=/service_account/stubbyCloudTestingTest-7dd63462c60c.json "
local cmd_prefix="sudo docker run $workdir_flag $env_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
}
# constructs the full dockerized csharp-mono gce auth interop test cmd.
#
# call-seq:
# flags= .... # generic flags to include the command
# cmd=$($grpc_gen_test_cmd $flags)
grpc_cloud_prod_auth_compute_engine_creds_gen_csharp_mono_cmd() {
local workdir_flag="-w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug"
local env_flag="-e SSL_CERT_FILE=/cacerts/roots.pem "
local cmd_prefix="sudo docker run $workdir_flag $env_flag grpc/csharp_mono";
local test_script="mono Grpc.IntegrationTesting.Client.exe --use_tls=true";
local gfe_flags=$(_grpc_prod_gfe_flags)
local added_gfe_flags=$(_grpc_gce_test_flags)
local the_cmd="$cmd_prefix $test_script $gfe_flags $added_gfe_flags $@";
echo $the_cmd
}
# outputs the flags passed to gfe tests
_grpc_prod_gfe_flags() {
echo " --server_port=443 --server_host=grpc-test.sandbox.google.com --server_host_override=grpc-test.sandbox.google.com"

@ -30,9 +30,21 @@
set -ex
if [ "$CONFIG" = "dbg" ]
then
MSBUILD_CONFIG="Debug"
else
MSBUILD_CONFIG="Release"
fi
# change to gRPC repo root
cd $(dirname $0)/../..
root=`pwd`
xbuild src/csharp/Grpc.sln
if [ -n "$NUGET" ]
then
$NUGET restore src/csharp/Grpc.sln
fi
xbuild /p:Configuration=$MSBUILD_CONFIG src/csharp/Grpc.sln

@ -30,17 +30,22 @@
set -ex
CONFIG=${CONFIG:-opt}
if [ "$CONFIG" = "dbg" ]
then
MSBUILD_CONFIG="Debug"
else
MSBUILD_CONFIG="Release"
fi
# change to gRPC repo root
cd $(dirname $0)/../..
root=`pwd`
cd src/csharp
# TODO: All the tests run pretty fast. In the future, we might need to teach
# run_tests.py about separate tests to make them run in parallel.
for assembly_name in Grpc.Core.Tests Grpc.Examples.Tests Grpc.IntegrationTesting
do
LD_LIBRARY_PATH=$root/libs/dbg nunit-console -labels $assembly_name/bin/Debug/$assembly_name.dll
done
export LD_LIBRARY_PATH=$root/libs/$CONFIG
nunit-console -labels "$1/bin/$MSBUILD_CONFIG/$1.dll"

@ -61,7 +61,7 @@ class SimpleConfig(object):
self.environ = environ
self.environ['CONFIG'] = config
def job_spec(self, cmdline, hash_targets):
def job_spec(self, cmdline, hash_targets, shortname=None):
"""Construct a jobset.JobSpec for a test under this config
Args:
@ -74,6 +74,7 @@ class SimpleConfig(object):
be listed
"""
return jobset.JobSpec(cmdline=cmdline,
shortname=shortname,
environ=self.environ,
hash_targets=hash_targets
if self.allow_hashing else None)
@ -218,9 +219,13 @@ class RubyLanguage(object):
class CSharpLanguage(object):
def test_specs(self, config, travis):
return [config.job_spec('tools/run_tests/run_csharp.sh', None)]
assemblies = ['Grpc.Core.Tests',
'Grpc.Examples.Tests',
'Grpc.IntegrationTesting']
return [config.job_spec(['tools/run_tests/run_csharp.sh', assembly],
None, shortname=assembly)
for assembly in assemblies ]
def make_targets(self):
return ['grpc_csharp_ext']

Loading…
Cancel
Save