aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--PYTHON-MANIFEST.in3
-rw-r--r--build.yaml23
-rw-r--r--config.m481
-rw-r--r--examples/csharp/helloworld/.nuget/packages.config2
-rw-r--r--examples/csharp/helloworld/Greeter/Greeter.csproj25
-rw-r--r--examples/csharp/helloworld/Greeter/Helloworld.cs36
-rw-r--r--examples/csharp/helloworld/Greeter/HelloworldGrpc.cs2
-rw-r--r--examples/csharp/helloworld/Greeter/packages.config12
-rw-r--r--examples/csharp/helloworld/GreeterClient/GreeterClient.csproj25
-rw-r--r--examples/csharp/helloworld/GreeterClient/packages.config12
-rw-r--r--examples/csharp/helloworld/GreeterServer/GreeterServer.csproj25
-rw-r--r--examples/csharp/helloworld/GreeterServer/packages.config12
-rw-r--r--examples/csharp/helloworld/README.md29
-rw-r--r--examples/csharp/helloworld/generate_protos.bat2
-rw-r--r--examples/csharp/route_guide/.nuget/packages.config2
-rw-r--r--examples/csharp/route_guide/RouteGuide/RouteGuide.cs168
-rw-r--r--examples/csharp/route_guide/RouteGuide/RouteGuide.csproj20
-rw-r--r--examples/csharp/route_guide/RouteGuide/RouteGuideGrpc.cs2
-rw-r--r--examples/csharp/route_guide/RouteGuide/packages.config10
-rw-r--r--examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj20
-rw-r--r--examples/csharp/route_guide/RouteGuideClient/packages.config10
-rw-r--r--examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj20
-rw-r--r--examples/csharp/route_guide/RouteGuideServer/packages.config10
-rw-r--r--examples/csharp/route_guide/generate_protos.bat2
-rw-r--r--examples/python/README.md26
-rwxr-xr-xexamples/python/helloworld/run_client.sh36
-rwxr-xr-xexamples/python/helloworld/run_server.sh37
-rwxr-xr-xexamples/python/route_guide/run_client.sh36
-rwxr-xr-xexamples/python/route_guide/run_server.sh36
-rw-r--r--package.xml26
-rw-r--r--setup.py1
-rw-r--r--src/core/httpcli/httpcli.c1
-rw-r--r--src/core/iomgr/ev_posix.h10
-rw-r--r--src/core/iomgr/pollset.h2
-rw-r--r--src/core/iomgr/pollset_windows.c7
-rw-r--r--src/core/iomgr/pollset_windows.h2
-rw-r--r--src/core/security/google_default_credentials.c26
-rw-r--r--src/core/surface/completion_queue.c47
-rw-r--r--src/csharp/Grpc.Core/Internal/PlatformApis.cs6
-rw-r--r--src/csharp/README.md116
-rw-r--r--src/python/grpcio/precompiled.py2
-rw-r--r--src/ruby/ext/grpc/rb_grpc.c37
-rw-r--r--src/ruby/lib/grpc/core/time_consts.rb4
-rw-r--r--src/ruby/lib/grpc/errors.rb4
-rw-r--r--templates/config.m4.template14
-rw-r--r--templates/package.xml.template4
-rw-r--r--templates/tools/run_tests/tests.json.template3
-rw-r--r--test/core/end2end/fixtures/h2_uchannel.c12
-rw-r--r--test/core/httpcli/httpcli_test.c24
-rw-r--r--test/core/httpcli/httpscli_test.c23
-rw-r--r--test/core/iomgr/endpoint_pair_test.c6
-rw-r--r--test/core/iomgr/fd_posix_test.c56
-rw-r--r--test/core/iomgr/tcp_client_posix_test.c44
-rw-r--r--test/core/iomgr/tcp_posix_test.c56
-rw-r--r--test/core/iomgr/tcp_server_posix_test.c16
-rw-r--r--test/core/iomgr/workqueue_test.c16
-rw-r--r--test/core/security/oauth2_utils.c10
-rw-r--r--test/core/security/print_google_default_creds_token.c20
-rw-r--r--test/core/security/secure_endpoint_test.c6
-rw-r--r--test/core/security/verify_jwt.c16
-rw-r--r--test/core/util/port_posix.c25
-rw-r--r--test/core/util/port_windows.c27
-rw-r--r--test/core/util/test_tcp_server.c6
-rw-r--r--test/core/util/test_tcp_server.h2
-rwxr-xr-xtools/buildgen/build-cleaner.py2
-rwxr-xr-xtools/buildgen/plugins/expand_bin_attrs.py1
-rw-r--r--tools/run_tests/artifact_targets.py12
-rwxr-xr-xtools/run_tests/build_artifact_python.sh13
-rw-r--r--tools/run_tests/distribtest_targets.py21
-rwxr-xr-xtools/run_tests/run_tests.py38
-rw-r--r--tools/run_tests/tests.json130
71 files changed, 839 insertions, 779 deletions
diff --git a/PYTHON-MANIFEST.in b/PYTHON-MANIFEST.in
index 072089ac51..25aba87c18 100644
--- a/PYTHON-MANIFEST.in
+++ b/PYTHON-MANIFEST.in
@@ -1,4 +1,5 @@
-graft src/python/grpcio/grpc
+recursive-include src/python/grpcio/grpc *.c *.h *.py *.pyx *.pxd *.pxi *.python *.pem
+recursive-exclude src/python/grpcio/grpc/_cython *.so *.pyd
graft src/python/grpcio/tests
graft src/core
graft include/grpc
diff --git a/build.yaml b/build.yaml
index e7afc03db4..58240fa8b3 100644
--- a/build.yaml
+++ b/build.yaml
@@ -1950,6 +1950,7 @@ targets:
- linux
- posix
- name: alarm_cpp_test
+ gtest: true
build: test
language: c++
src:
@@ -1962,6 +1963,7 @@ targets:
- gpr_test_util
- gpr
- name: async_end2end_test
+ gtest: true
build: test
language: c++
src:
@@ -2008,6 +2010,7 @@ targets:
- linux
- posix
- name: auth_property_iterator_test
+ gtest: true
build: test
language: c++
src:
@@ -2020,6 +2023,7 @@ targets:
- gpr_test_util
- gpr
- name: channel_arguments_test
+ gtest: true
build: test
language: c++
src:
@@ -2029,6 +2033,7 @@ targets:
- grpc
- gpr
- name: cli_call_test
+ gtest: true
build: test
language: c++
src:
@@ -2041,6 +2046,7 @@ targets:
- gpr_test_util
- gpr
- name: client_crash_test
+ gtest: true
cpu_cost: 0.1
build: test
language: c++
@@ -2071,6 +2077,7 @@ targets:
- gpr_test_util
- gpr
- name: credentials_test
+ gtest: true
build: test
language: c++
src:
@@ -2080,6 +2087,7 @@ targets:
- grpc
- gpr
- name: cxx_byte_buffer_test
+ gtest: true
build: test
language: c++
src:
@@ -2091,6 +2099,7 @@ targets:
- gpr_test_util
- gpr
- name: cxx_slice_test
+ gtest: true
build: test
language: c++
src:
@@ -2102,6 +2111,7 @@ targets:
- gpr_test_util
- gpr
- name: cxx_string_ref_test
+ gtest: true
build: test
language: c++
src:
@@ -2109,6 +2119,7 @@ targets:
deps:
- grpc++
- name: cxx_time_test
+ gtest: true
build: test
language: c++
src:
@@ -2120,6 +2131,7 @@ targets:
- gpr_test_util
- gpr
- name: end2end_test
+ gtest: true
cpu_cost: 0.5
build: test
language: c++
@@ -2150,6 +2162,7 @@ targets:
- linux
- posix
- name: generic_end2end_test
+ gtest: true
build: test
language: c++
src:
@@ -2226,6 +2239,7 @@ targets:
vs_config_type: Application
vs_project_guid: '{069E9D05-B78B-4751-9252-D21EBAE7DE8E}'
- name: grpclb_api_test
+ gtest: true
build: test
language: c++
src:
@@ -2237,6 +2251,7 @@ targets:
- grpc++
- grpc
- name: hybrid_end2end_test
+ gtest: true
build: test
language: c++
src:
@@ -2316,6 +2331,7 @@ targets:
- gpr
- grpc++_test_config
- name: mock_test
+ gtest: true
build: test
language: c++
src:
@@ -2451,6 +2467,7 @@ targets:
- gpr
- grpc++_test_config
- name: secure_auth_context_test
+ gtest: true
build: test
language: c++
src:
@@ -2480,6 +2497,7 @@ targets:
- linux
- posix
- name: server_crash_test
+ gtest: true
cpu_cost: 0.1
build: test
language: c++
@@ -2510,6 +2528,7 @@ targets:
- gpr_test_util
- gpr
- name: shutdown_test
+ gtest: true
build: test
language: c++
src:
@@ -2533,6 +2552,7 @@ targets:
- gpr_test_util
- gpr
- name: streaming_throughput_test
+ gtest: true
build: test
language: c++
src:
@@ -2609,6 +2629,7 @@ targets:
- linux
- posix
- name: thread_stress_test
+ gtest: true
cpu_cost: 100
build: test
language: c++
@@ -2622,6 +2643,7 @@ targets:
- gpr_test_util
- gpr
- name: zookeeper_test
+ gtest: true
build: test
run: false
language: c++
@@ -2821,7 +2843,6 @@ php_config_m4:
- grpc
- gpr
- boringssl
- - z
headers:
- src/php/ext/grpc/byte_buffer.h
- src/php/ext/grpc/call.h
diff --git a/config.m4 b/config.m4
index ac2c2cb1ab..09ed02c971 100644
--- a/config.m4
+++ b/config.m4
@@ -530,22 +530,73 @@ if test "$PHP_GRPC" != "no"; then
third_party/boringssl/ssl/t1_enc.c \
third_party/boringssl/ssl/t1_lib.c \
third_party/boringssl/ssl/tls_record.c \
- third_party/zlib/adler32.c \
- third_party/zlib/compress.c \
- third_party/zlib/crc32.c \
- third_party/zlib/deflate.c \
- third_party/zlib/gzclose.c \
- third_party/zlib/gzlib.c \
- third_party/zlib/gzread.c \
- third_party/zlib/gzwrite.c \
- third_party/zlib/infback.c \
- third_party/zlib/inffast.c \
- third_party/zlib/inflate.c \
- third_party/zlib/inftrees.c \
- third_party/zlib/trees.c \
- third_party/zlib/uncompr.c \
- third_party/zlib/zutil.c \
, $ext_shared, , -Wall -Werror -std=c11 \
-fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN \
-D_HAS_EXCEPTIONS=0 -DNOMINMAX)
+
+ PHP_ADD_BUILD_DIR($ext_builddir/src/php/ext/grpc)
+
+ PHP_ADD_BUILD_DIR($ext_builddir/src/boringssl)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/census)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/channel)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_config)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_config/lb_policies)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_config/resolvers)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/compression)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/debug)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/httpcli)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/iomgr)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/json)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/profiling)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/proto/grpc/lb/v0)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/security)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/support)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/surface)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/transport)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/transport/chttp2)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/aes)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/asn1)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/base64)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bio)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bn)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bn/asm)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/buf)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bytestring)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/chacha)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/cipher)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/cmac)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/conf)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/curve25519)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/des)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/dh)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/digest)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/dsa)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/ec)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/ecdh)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/ecdsa)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/engine)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/err)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/evp)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/hkdf)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/hmac)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/lhash)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/md4)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/md5)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/modes)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/obj)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/pem)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/pkcs8)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/poly1305)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/rand)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/rc4)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/rsa)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/sha)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/stack)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/x509)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/x509v3)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/ssl)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/ssl/pqueue)
+ PHP_ADD_BUILD_DIR($ext_builddir/third_party/nanopb)
fi
diff --git a/examples/csharp/helloworld/.nuget/packages.config b/examples/csharp/helloworld/.nuget/packages.config
index 1cbe7e1d65..fb778311d1 100644
--- a/examples/csharp/helloworld/.nuget/packages.config
+++ b/examples/csharp/helloworld/.nuget/packages.config
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Grpc.Tools" version="0.12.0" />
+ <package id="Grpc.Tools" version="0.13.0" />
</packages> \ No newline at end of file
diff --git a/examples/csharp/helloworld/Greeter/Greeter.csproj b/examples/csharp/helloworld/Greeter/Greeter.csproj
index fa1c20f5ff..a25ad5f791 100644
--- a/examples/csharp/helloworld/Greeter/Greeter.csproj
+++ b/examples/csharp/helloworld/Greeter/Greeter.csproj
@@ -10,7 +10,7 @@
<RootNamespace>Greeter</RootNamespace>
<AssemblyName>Greeter</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <NuGetPackageImportStamp>4eea1d1c</NuGetPackageImportStamp>
+ <NuGetPackageImportStamp>39f4a691</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -31,15 +31,18 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Google.Protobuf">
- <HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
- <Reference Include="Grpc.Core">
- <HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
+ <Reference Include="Grpc.Core, Version=0.13.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
- <Reference Include="System.Interactive.Async">
- <HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath>
+ <Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -53,15 +56,11 @@
<None Include="protos\helloworld.proto" />
</ItemGroup>
<ItemGroup />
- <Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
+ <Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
+ <Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
- <Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
- <Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
</Project> \ No newline at end of file
diff --git a/examples/csharp/helloworld/Greeter/Helloworld.cs b/examples/csharp/helloworld/Greeter/Helloworld.cs
index 668165a6ce..63969b7514 100644
--- a/examples/csharp/helloworld/Greeter/Helloworld.cs
+++ b/examples/csharp/helloworld/Greeter/Helloworld.cs
@@ -9,41 +9,46 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Helloworld {
+ /// <summary>Holder for reflection information generated from helloworld.proto</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class Helloworld {
+ public static partial class HelloworldReflection {
#region Descriptor
+ /// <summary>File descriptor for helloworld.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
- static Helloworld() {
+ static HelloworldReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "ChBoZWxsb3dvcmxkLnByb3RvEgpoZWxsb3dvcmxkIhwKDEhlbGxvUmVxdWVz",
- "dBIMCgRuYW1lGAEgASgJIh0KCkhlbGxvUmVwbHkSDwoHbWVzc2FnZRgBIAEo",
- "CTJJCgdHcmVldGVyEj4KCFNheUhlbGxvEhguaGVsbG93b3JsZC5IZWxsb1Jl",
- "cXVlc3QaFi5oZWxsb3dvcmxkLkhlbGxvUmVwbHkiAEIYChBpby5ncnBjLmV4",
+ "ChBoZWxsb3dvcmxkLnByb3RvEgpoZWxsb3dvcmxkIhwKDEhlbGxvUmVxdWVz",
+ "dBIMCgRuYW1lGAEgASgJIh0KCkhlbGxvUmVwbHkSDwoHbWVzc2FnZRgBIAEo",
+ "CTJJCgdHcmVldGVyEj4KCFNheUhlbGxvEhguaGVsbG93b3JsZC5IZWxsb1Jl",
+ "cXVlc3QaFi5oZWxsb3dvcmxkLkhlbGxvUmVwbHkiAEIYChBpby5ncnBjLmV4",
"YW1wbGVzogIDSExXYgZwcm90bzM="));
- descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
- new pbr::GeneratedCodeInfo(typeof(global::Helloworld.HelloRequest), new[]{ "Name" }, null, null, null),
- new pbr::GeneratedCodeInfo(typeof(global::Helloworld.HelloReply), new[]{ "Message" }, null, null, null)
+ new pbr::GeneratedCodeInfo(typeof(global::Helloworld.HelloRequest), global::Helloworld.HelloRequest.Parser, new[]{ "Name" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Helloworld.HelloReply), global::Helloworld.HelloReply.Parser, new[]{ "Message" }, null, null, null)
}));
}
#endregion
}
#region Messages
+ /// <summary>
+ /// The request message containing the user's name.
+ /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class HelloRequest : pb::IMessage<HelloRequest> {
private static readonly pb::MessageParser<HelloRequest> _parser = new pb::MessageParser<HelloRequest>(() => new HelloRequest());
public static pb::MessageParser<HelloRequest> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Helloworld.Helloworld.Descriptor.MessageTypes[0]; }
+ get { return global::Helloworld.HelloworldReflection.Descriptor.MessageTypes[0]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -64,6 +69,7 @@ namespace Helloworld {
return new HelloRequest(this);
}
+ /// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
public string Name {
@@ -95,7 +101,7 @@ namespace Helloworld {
}
public override string ToString() {
- return pb::JsonFormatter.Default.Format(this);
+ return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
@@ -139,13 +145,16 @@ namespace Helloworld {
}
+ /// <summary>
+ /// The response message containing the greetings
+ /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class HelloReply : pb::IMessage<HelloReply> {
private static readonly pb::MessageParser<HelloReply> _parser = new pb::MessageParser<HelloReply>(() => new HelloReply());
public static pb::MessageParser<HelloReply> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Helloworld.Helloworld.Descriptor.MessageTypes[1]; }
+ get { return global::Helloworld.HelloworldReflection.Descriptor.MessageTypes[1]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -166,6 +175,7 @@ namespace Helloworld {
return new HelloReply(this);
}
+ /// <summary>Field number for the "message" field.</summary>
public const int MessageFieldNumber = 1;
private string message_ = "";
public string Message {
@@ -197,7 +207,7 @@ namespace Helloworld {
}
public override string ToString() {
- return pb::JsonFormatter.Default.Format(this);
+ return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
diff --git a/examples/csharp/helloworld/Greeter/HelloworldGrpc.cs b/examples/csharp/helloworld/Greeter/HelloworldGrpc.cs
index edfe4d2257..4014bc21e3 100644
--- a/examples/csharp/helloworld/Greeter/HelloworldGrpc.cs
+++ b/examples/csharp/helloworld/Greeter/HelloworldGrpc.cs
@@ -25,7 +25,7 @@ namespace Helloworld {
// service descriptor
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
- get { return global::Helloworld.Helloworld.Descriptor.Services[0]; }
+ get { return global::Helloworld.HelloworldReflection.Descriptor.Services[0]; }
}
// client interface
diff --git a/examples/csharp/helloworld/Greeter/packages.config b/examples/csharp/helloworld/Greeter/packages.config
index cabcadc78f..abe9ad0850 100644
--- a/examples/csharp/helloworld/Greeter/packages.config
+++ b/examples/csharp/helloworld/Greeter/packages.config
@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
- <package id="Grpc" version="0.12.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
- <package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
- <package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
- <package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
- <package id="Ix-Async" version="1.2.3" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
+ <package id="Grpc" version="0.13.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
+ <package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
+ <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj b/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj
index 164a6165ef..a71cfeeef3 100644
--- a/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj
+++ b/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj
@@ -10,7 +10,7 @@
<RootNamespace>GreeterClient</RootNamespace>
<AssemblyName>GreeterClient</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <NuGetPackageImportStamp>29206d49</NuGetPackageImportStamp>
+ <NuGetPackageImportStamp>dcebbc77</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -31,15 +31,18 @@
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Google.Protobuf">
- <HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
- <Reference Include="Grpc.Core">
- <HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
+ <Reference Include="Grpc.Core, Version=0.13.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
- <Reference Include="System.Interactive.Async">
- <HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath>
+ <Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -56,15 +59,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
- <Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
+ <Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
+ <Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
- <Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
- <Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
</Project> \ No newline at end of file
diff --git a/examples/csharp/helloworld/GreeterClient/packages.config b/examples/csharp/helloworld/GreeterClient/packages.config
index cabcadc78f..abe9ad0850 100644
--- a/examples/csharp/helloworld/GreeterClient/packages.config
+++ b/examples/csharp/helloworld/GreeterClient/packages.config
@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
- <package id="Grpc" version="0.12.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
- <package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
- <package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
- <package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
- <package id="Ix-Async" version="1.2.3" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
+ <package id="Grpc" version="0.13.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
+ <package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
+ <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj b/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj
index 56436d3834..34eea8c246 100644
--- a/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj
+++ b/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj
@@ -10,7 +10,7 @@
<RootNamespace>GreeterServer</RootNamespace>
<AssemblyName>GreeterServer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <NuGetPackageImportStamp>8a2cae0f</NuGetPackageImportStamp>
+ <NuGetPackageImportStamp>2ea5dfd0</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -31,15 +31,18 @@
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Google.Protobuf">
- <HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
- <Reference Include="Grpc.Core">
- <HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
+ <Reference Include="Grpc.Core, Version=0.13.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
- <Reference Include="System.Interactive.Async">
- <HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath>
+ <Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -56,15 +59,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
- <Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
+ <Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
+ <Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
- <Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
- <Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
</Project> \ No newline at end of file
diff --git a/examples/csharp/helloworld/GreeterServer/packages.config b/examples/csharp/helloworld/GreeterServer/packages.config
index cabcadc78f..abe9ad0850 100644
--- a/examples/csharp/helloworld/GreeterServer/packages.config
+++ b/examples/csharp/helloworld/GreeterServer/packages.config
@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
- <package id="Grpc" version="0.12.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
- <package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
- <package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
- <package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
- <package id="Ix-Async" version="1.2.3" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
+ <package id="Grpc" version="0.13.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
+ <package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
+ <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/examples/csharp/helloworld/README.md b/examples/csharp/helloworld/README.md
index f1af1f6793..63131ed98c 100644
--- a/examples/csharp/helloworld/README.md
+++ b/examples/csharp/helloworld/README.md
@@ -16,35 +16,17 @@ PREREQUISITES
- Visual Studio 2013 or 2015
**Linux**
-- Mono
-- Monodevelop 5.9 with NuGet Add-in installed
+- Mono 4.0+
+- Monodevelop 5.9+ (with NuGet plugin installed)
**Mac OS X**
-- Xamarin Studio (with NuGet plugin installed)
+- Xamarin Studio 5.9+
- [homebrew][]
BUILD
-------
-**Windows**
-
-- Open solution `Greeter.sln` with Visual Studio
-
-- Build the solution (this will automatically download NuGet dependencies)
-
-**Linux (Debian)**
-
-- Install gRPC C core and C# native extension using [How to use gRPC C#][] instructions
-
-- Open solution `Greeter.sln` in MonoDevelop.
-
-- Build the solution (you need to manually restore dependencies by using `mono nuget.exe restore` if you don't have NuGet add-in)
-
-**Mac OS X**
-
-- Install gRPC C core and C# native extension using [How to use gRPC C#][] instructions
-
-- Open solution `Greeter.sln` with Xamarin Studio
+- Open solution `Greeter.sln` with Visual Studio, Monodevelop (on Linux) or Xamarin Studio (on Mac OS X)
- Build the solution (this will automatically download NuGet dependencies)
@@ -65,7 +47,7 @@ Try it!
> GreeterClient.exe
```
-You can also run the server and client directly from Visual Studio.
+You can also run the server and client directly from the IDE.
On Linux or Mac, use `mono GreeterServer.exe` and `mono GreeterClient.exe` to run the server and client.
@@ -76,5 +58,4 @@ You can find a more detailed tutorial in [gRPC Basics: C#][]
[homebrew]:http://brew.sh
[helloworld.proto]:../../protos/helloworld.proto
-[How to use gRPC C#]:../../../src/csharp#how-to-use
[gRPC Basics: C#]:http://www.grpc.io/docs/tutorials/basic/csharp.html
diff --git a/examples/csharp/helloworld/generate_protos.bat b/examples/csharp/helloworld/generate_protos.bat
index 8ba2c2e936..7f3654c8da 100644
--- a/examples/csharp/helloworld/generate_protos.bat
+++ b/examples/csharp/helloworld/generate_protos.bat
@@ -5,6 +5,6 @@ setlocal
@rem enter this directory
cd /d %~dp0
-packages\Google.Protobuf.3.0.0-alpha4\tools\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=packages\Grpc.Tools.0.12.0\tools\grpc_csharp_plugin.exe
+packages\Google.Protobuf.3.0.0-beta2\tools\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=packages\Grpc.Tools.0.13.0\tools\grpc_csharp_plugin.exe
endlocal \ No newline at end of file
diff --git a/examples/csharp/route_guide/.nuget/packages.config b/examples/csharp/route_guide/.nuget/packages.config
index 1cbe7e1d65..fb778311d1 100644
--- a/examples/csharp/route_guide/.nuget/packages.config
+++ b/examples/csharp/route_guide/.nuget/packages.config
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Grpc.Tools" version="0.12.0" />
+ <package id="Grpc.Tools" version="0.13.0" />
</packages> \ No newline at end of file
diff --git a/examples/csharp/route_guide/RouteGuide/RouteGuide.cs b/examples/csharp/route_guide/RouteGuide/RouteGuide.cs
index deb97e1b2d..3bd79df418 100644
--- a/examples/csharp/route_guide/RouteGuide/RouteGuide.cs
+++ b/examples/csharp/route_guide/RouteGuide/RouteGuide.cs
@@ -9,57 +9,62 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Routeguide {
- namespace Proto {
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class RouteGuide {
-
- #region Descriptor
- public static pbr::FileDescriptor Descriptor {
- get { return descriptor; }
- }
- private static pbr::FileDescriptor descriptor;
-
- static RouteGuide() {
- byte[] descriptorData = global::System.Convert.FromBase64String(
- string.Concat(
- "ChFyb3V0ZV9ndWlkZS5wcm90bxIKcm91dGVndWlkZSIsCgVQb2ludBIQCghs",
- "YXRpdHVkZRgBIAEoBRIRCglsb25naXR1ZGUYAiABKAUiSQoJUmVjdGFuZ2xl",
- "Eh0KAmxvGAEgASgLMhEucm91dGVndWlkZS5Qb2ludBIdCgJoaRgCIAEoCzIR",
- "LnJvdXRlZ3VpZGUuUG9pbnQiPAoHRmVhdHVyZRIMCgRuYW1lGAEgASgJEiMK",
- "CGxvY2F0aW9uGAIgASgLMhEucm91dGVndWlkZS5Qb2ludCJBCglSb3V0ZU5v",
- "dGUSIwoIbG9jYXRpb24YASABKAsyES5yb3V0ZWd1aWRlLlBvaW50Eg8KB21l",
- "c3NhZ2UYAiABKAkiYgoMUm91dGVTdW1tYXJ5EhMKC3BvaW50X2NvdW50GAEg",
- "ASgFEhUKDWZlYXR1cmVfY291bnQYAiABKAUSEAoIZGlzdGFuY2UYAyABKAUS",
- "FAoMZWxhcHNlZF90aW1lGAQgASgFMoUCCgpSb3V0ZUd1aWRlEjYKCkdldEZl",
- "YXR1cmUSES5yb3V0ZWd1aWRlLlBvaW50GhMucm91dGVndWlkZS5GZWF0dXJl",
- "IgASPgoMTGlzdEZlYXR1cmVzEhUucm91dGVndWlkZS5SZWN0YW5nbGUaEy5y",
- "b3V0ZWd1aWRlLkZlYXR1cmUiADABEj4KC1JlY29yZFJvdXRlEhEucm91dGVn",
- "dWlkZS5Qb2ludBoYLnJvdXRlZ3VpZGUuUm91dGVTdW1tYXJ5IgAoARI/CglS",
- "b3V0ZUNoYXQSFS5yb3V0ZWd1aWRlLlJvdXRlTm90ZRoVLnJvdXRlZ3VpZGUu",
- "Um91dGVOb3RlIgAoATABQg8KB2V4LmdycGOiAgNSVEdiBnByb3RvMw=="));
- descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
- new pbr::FileDescriptor[] { },
- new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
- new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Point), new[]{ "Latitude", "Longitude" }, null, null, null),
- new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Rectangle), new[]{ "Lo", "Hi" }, null, null, null),
- new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Feature), new[]{ "Name", "Location" }, null, null, null),
- new pbr::GeneratedCodeInfo(typeof(global::Routeguide.RouteNote), new[]{ "Location", "Message" }, null, null, null),
- new pbr::GeneratedCodeInfo(typeof(global::Routeguide.RouteSummary), new[]{ "PointCount", "FeatureCount", "Distance", "ElapsedTime" }, null, null, null)
- }));
- }
- #endregion
+ /// <summary>Holder for reflection information generated from route_guide.proto</summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class RouteGuideReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for route_guide.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static RouteGuideReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChFyb3V0ZV9ndWlkZS5wcm90bxIKcm91dGVndWlkZSIsCgVQb2ludBIQCghs",
+ "YXRpdHVkZRgBIAEoBRIRCglsb25naXR1ZGUYAiABKAUiSQoJUmVjdGFuZ2xl",
+ "Eh0KAmxvGAEgASgLMhEucm91dGVndWlkZS5Qb2ludBIdCgJoaRgCIAEoCzIR",
+ "LnJvdXRlZ3VpZGUuUG9pbnQiPAoHRmVhdHVyZRIMCgRuYW1lGAEgASgJEiMK",
+ "CGxvY2F0aW9uGAIgASgLMhEucm91dGVndWlkZS5Qb2ludCJBCglSb3V0ZU5v",
+ "dGUSIwoIbG9jYXRpb24YASABKAsyES5yb3V0ZWd1aWRlLlBvaW50Eg8KB21l",
+ "c3NhZ2UYAiABKAkiYgoMUm91dGVTdW1tYXJ5EhMKC3BvaW50X2NvdW50GAEg",
+ "ASgFEhUKDWZlYXR1cmVfY291bnQYAiABKAUSEAoIZGlzdGFuY2UYAyABKAUS",
+ "FAoMZWxhcHNlZF90aW1lGAQgASgFMoUCCgpSb3V0ZUd1aWRlEjYKCkdldEZl",
+ "YXR1cmUSES5yb3V0ZWd1aWRlLlBvaW50GhMucm91dGVndWlkZS5GZWF0dXJl",
+ "IgASPgoMTGlzdEZlYXR1cmVzEhUucm91dGVndWlkZS5SZWN0YW5nbGUaEy5y",
+ "b3V0ZWd1aWRlLkZlYXR1cmUiADABEj4KC1JlY29yZFJvdXRlEhEucm91dGVn",
+ "dWlkZS5Qb2ludBoYLnJvdXRlZ3VpZGUuUm91dGVTdW1tYXJ5IgAoARI/CglS",
+ "b3V0ZUNoYXQSFS5yb3V0ZWd1aWRlLlJvdXRlTm90ZRoVLnJvdXRlZ3VpZGUu",
+ "Um91dGVOb3RlIgAoATABQg8KB2V4LmdycGOiAgNSVEdiBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
+ new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Point), global::Routeguide.Point.Parser, new[]{ "Latitude", "Longitude" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Rectangle), global::Routeguide.Rectangle.Parser, new[]{ "Lo", "Hi" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Feature), global::Routeguide.Feature.Parser, new[]{ "Name", "Location" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Routeguide.RouteNote), global::Routeguide.RouteNote.Parser, new[]{ "Location", "Message" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Routeguide.RouteSummary), global::Routeguide.RouteSummary.Parser, new[]{ "PointCount", "FeatureCount", "Distance", "ElapsedTime" }, null, null, null)
+ }));
+ }
+ #endregion
- }
}
#region Messages
+ /// <summary>
+ /// Points are represented as latitude-longitude pairs in the E7 representation
+ /// (degrees multiplied by 10**7 and rounded to the nearest integer).
+ /// Latitudes should be in the range +/- 90 degrees and longitude should be in
+ /// the range +/- 180 degrees (inclusive).
+ /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Point : pb::IMessage<Point> {
private static readonly pb::MessageParser<Point> _parser = new pb::MessageParser<Point>(() => new Point());
public static pb::MessageParser<Point> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Routeguide.Proto.RouteGuide.Descriptor.MessageTypes[0]; }
+ get { return global::Routeguide.RouteGuideReflection.Descriptor.MessageTypes[0]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -81,6 +86,7 @@ namespace Routeguide {
return new Point(this);
}
+ /// <summary>Field number for the "latitude" field.</summary>
public const int LatitudeFieldNumber = 1;
private int latitude_;
public int Latitude {
@@ -90,6 +96,7 @@ namespace Routeguide {
}
}
+ /// <summary>Field number for the "longitude" field.</summary>
public const int LongitudeFieldNumber = 2;
private int longitude_;
public int Longitude {
@@ -123,7 +130,7 @@ namespace Routeguide {
}
public override string ToString() {
- return pb::JsonFormatter.Default.Format(this);
+ return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
@@ -181,13 +188,17 @@ namespace Routeguide {
}
+ /// <summary>
+ /// A latitude-longitude rectangle, represented as two diagonally opposite
+ /// points "lo" and "hi".
+ /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Rectangle : pb::IMessage<Rectangle> {
private static readonly pb::MessageParser<Rectangle> _parser = new pb::MessageParser<Rectangle>(() => new Rectangle());
public static pb::MessageParser<Rectangle> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Routeguide.Proto.RouteGuide.Descriptor.MessageTypes[1]; }
+ get { return global::Routeguide.RouteGuideReflection.Descriptor.MessageTypes[1]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -209,8 +220,12 @@ namespace Routeguide {
return new Rectangle(this);
}
+ /// <summary>Field number for the "lo" field.</summary>
public const int LoFieldNumber = 1;
private global::Routeguide.Point lo_;
+ /// <summary>
+ /// One corner of the rectangle.
+ /// </summary>
public global::Routeguide.Point Lo {
get { return lo_; }
set {
@@ -218,8 +233,12 @@ namespace Routeguide {
}
}
+ /// <summary>Field number for the "hi" field.</summary>
public const int HiFieldNumber = 2;
private global::Routeguide.Point hi_;
+ /// <summary>
+ /// The other corner of the rectangle.
+ /// </summary>
public global::Routeguide.Point Hi {
get { return hi_; }
set {
@@ -251,7 +270,7 @@ namespace Routeguide {
}
public override string ToString() {
- return pb::JsonFormatter.Default.Format(this);
+ return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
@@ -321,13 +340,18 @@ namespace Routeguide {
}
+ /// <summary>
+ /// A feature names something at a given point.
+ ///
+ /// If a feature could not be named, the name is empty.
+ /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Feature : pb::IMessage<Feature> {
private static readonly pb::MessageParser<Feature> _parser = new pb::MessageParser<Feature>(() => new Feature());
public static pb::MessageParser<Feature> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Routeguide.Proto.RouteGuide.Descriptor.MessageTypes[2]; }
+ get { return global::Routeguide.RouteGuideReflection.Descriptor.MessageTypes[2]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -349,8 +373,12 @@ namespace Routeguide {
return new Feature(this);
}
+ /// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
+ /// <summary>
+ /// The name of the feature.
+ /// </summary>
public string Name {
get { return name_; }
set {
@@ -358,8 +386,12 @@ namespace Routeguide {
}
}
+ /// <summary>Field number for the "location" field.</summary>
public const int LocationFieldNumber = 2;
private global::Routeguide.Point location_;
+ /// <summary>
+ /// The point where the feature is detected.
+ /// </summary>
public global::Routeguide.Point Location {
get { return location_; }
set {
@@ -391,7 +423,7 @@ namespace Routeguide {
}
public override string ToString() {
- return pb::JsonFormatter.Default.Format(this);
+ return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
@@ -455,13 +487,16 @@ namespace Routeguide {
}
+ /// <summary>
+ /// A RouteNote is a message sent while at a given point.
+ /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class RouteNote : pb::IMessage<RouteNote> {
private static readonly pb::MessageParser<RouteNote> _parser = new pb::MessageParser<RouteNote>(() => new RouteNote());
public static pb::MessageParser<RouteNote> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Routeguide.Proto.RouteGuide.Descriptor.MessageTypes[3]; }
+ get { return global::Routeguide.RouteGuideReflection.Descriptor.MessageTypes[3]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -483,8 +518,12 @@ namespace Routeguide {
return new RouteNote(this);
}
+ /// <summary>Field number for the "location" field.</summary>
public const int LocationFieldNumber = 1;
private global::Routeguide.Point location_;
+ /// <summary>
+ /// The location from which the message is sent.
+ /// </summary>
public global::Routeguide.Point Location {
get { return location_; }
set {
@@ -492,8 +531,12 @@ namespace Routeguide {
}
}
+ /// <summary>Field number for the "message" field.</summary>
public const int MessageFieldNumber = 2;
private string message_ = "";
+ /// <summary>
+ /// The message to be sent.
+ /// </summary>
public string Message {
get { return message_; }
set {
@@ -525,7 +568,7 @@ namespace Routeguide {
}
public override string ToString() {
- return pb::JsonFormatter.Default.Format(this);
+ return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
@@ -589,13 +632,20 @@ namespace Routeguide {
}
+ /// <summary>
+ /// A RouteSummary is received in response to a RecordRoute rpc.
+ ///
+ /// It contains the number of individual points received, the number of
+ /// detected features, and the total distance covered as the cumulative sum of
+ /// the distance between each point.
+ /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class RouteSummary : pb::IMessage<RouteSummary> {
private static readonly pb::MessageParser<RouteSummary> _parser = new pb::MessageParser<RouteSummary>(() => new RouteSummary());
public static pb::MessageParser<RouteSummary> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Routeguide.Proto.RouteGuide.Descriptor.MessageTypes[4]; }
+ get { return global::Routeguide.RouteGuideReflection.Descriptor.MessageTypes[4]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -619,8 +669,12 @@ namespace Routeguide {
return new RouteSummary(this);
}
+ /// <summary>Field number for the "point_count" field.</summary>
public const int PointCountFieldNumber = 1;
private int pointCount_;
+ /// <summary>
+ /// The number of points received.
+ /// </summary>
public int PointCount {
get { return pointCount_; }
set {
@@ -628,8 +682,12 @@ namespace Routeguide {
}
}
+ /// <summary>Field number for the "feature_count" field.</summary>
public const int FeatureCountFieldNumber = 2;
private int featureCount_;
+ /// <summary>
+ /// The number of known features passed while traversing the route.
+ /// </summary>
public int FeatureCount {
get { return featureCount_; }
set {
@@ -637,8 +695,12 @@ namespace Routeguide {
}
}
+ /// <summary>Field number for the "distance" field.</summary>
public const int DistanceFieldNumber = 3;
private int distance_;
+ /// <summary>
+ /// The distance covered in metres.
+ /// </summary>
public int Distance {
get { return distance_; }
set {
@@ -646,8 +708,12 @@ namespace Routeguide {
}
}
+ /// <summary>Field number for the "elapsed_time" field.</summary>
public const int ElapsedTimeFieldNumber = 4;
private int elapsedTime_;
+ /// <summary>
+ /// The duration of the traversal in seconds.
+ /// </summary>
public int ElapsedTime {
get { return elapsedTime_; }
set {
@@ -683,7 +749,7 @@ namespace Routeguide {
}
public override string ToString() {
- return pb::JsonFormatter.Default.Format(this);
+ return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
diff --git a/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj b/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj
index 3a2a29cfac..1fbf1ce183 100644
--- a/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj
+++ b/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj
@@ -11,7 +11,7 @@
<AssemblyName>RouteGuide</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
- <NuGetPackageImportStamp>68b3dd23</NuGetPackageImportStamp>
+ <NuGetPackageImportStamp>5b6d924a</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -31,11 +31,13 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Google.Protobuf">
- <HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
- <Reference Include="Grpc.Core">
- <HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
+ <Reference Include="Grpc.Core, Version=0.12.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -65,17 +67,13 @@
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
+ <Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
+ <Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
- <Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
- <Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/examples/csharp/route_guide/RouteGuide/RouteGuideGrpc.cs b/examples/csharp/route_guide/RouteGuide/RouteGuideGrpc.cs
index d60256fff6..66d1c07978 100644
--- a/examples/csharp/route_guide/RouteGuide/RouteGuideGrpc.cs
+++ b/examples/csharp/route_guide/RouteGuide/RouteGuideGrpc.cs
@@ -49,7 +49,7 @@ namespace Routeguide {
// service descriptor
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
- get { return global::Routeguide.Proto.RouteGuide.Descriptor.Services[0]; }
+ get { return global::Routeguide.RouteGuideReflection.Descriptor.Services[0]; }
}
// client interface
diff --git a/examples/csharp/route_guide/RouteGuide/packages.config b/examples/csharp/route_guide/RouteGuide/packages.config
index 8717315102..e4e2109949 100644
--- a/examples/csharp/route_guide/RouteGuide/packages.config
+++ b/examples/csharp/route_guide/RouteGuide/packages.config
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
- <package id="Grpc" version="0.12.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
- <package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
- <package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
- <package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
+ <package id="Grpc" version="0.13.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
+ <package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj b/examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj
index 89e5025df8..f55627ed5c 100644
--- a/examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj
+++ b/examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj
@@ -11,7 +11,7 @@
<AssemblyName>RouteGuideClient</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
- <NuGetPackageImportStamp>f5579f73</NuGetPackageImportStamp>
+ <NuGetPackageImportStamp>69015b00</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -33,11 +33,13 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Google.Protobuf">
- <HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
- <Reference Include="Grpc.Core">
- <HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
+ <Reference Include="Grpc.Core, Version=0.12.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -68,17 +70,13 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
+ <Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
+ <Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
- <Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
- <Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/examples/csharp/route_guide/RouteGuideClient/packages.config b/examples/csharp/route_guide/RouteGuideClient/packages.config
index 8717315102..e4e2109949 100644
--- a/examples/csharp/route_guide/RouteGuideClient/packages.config
+++ b/examples/csharp/route_guide/RouteGuideClient/packages.config
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
- <package id="Grpc" version="0.12.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
- <package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
- <package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
- <package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
+ <package id="Grpc" version="0.13.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
+ <package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj b/examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj
index 2e930625c4..873556d65c 100644
--- a/examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj
+++ b/examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj
@@ -11,7 +11,7 @@
<AssemblyName>RouteGuideServer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
- <NuGetPackageImportStamp>89e15444</NuGetPackageImportStamp>
+ <NuGetPackageImportStamp>656158d8</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -33,11 +33,13 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Google.Protobuf">
- <HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
- <Reference Include="Grpc.Core">
- <HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
+ <Reference Include="Grpc.Core, Version=0.12.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -69,17 +71,13 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
+ <Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
- <Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
+ <Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
- <Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
- <Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/examples/csharp/route_guide/RouteGuideServer/packages.config b/examples/csharp/route_guide/RouteGuideServer/packages.config
index 8717315102..e4e2109949 100644
--- a/examples/csharp/route_guide/RouteGuideServer/packages.config
+++ b/examples/csharp/route_guide/RouteGuideServer/packages.config
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
- <package id="Grpc" version="0.12.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
- <package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
- <package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
- <package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
+ <package id="Grpc" version="0.13.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
+ <package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/examples/csharp/route_guide/generate_protos.bat b/examples/csharp/route_guide/generate_protos.bat
index fad63ef0ae..d9cd021a91 100644
--- a/examples/csharp/route_guide/generate_protos.bat
+++ b/examples/csharp/route_guide/generate_protos.bat
@@ -5,6 +5,6 @@ setlocal
@rem enter this directory
cd /d %~dp0
-packages\Google.Protobuf.3.0.0-alpha4\tools\protoc.exe -I../../protos --csharp_out RouteGuide ../../protos/route_guide.proto --grpc_out RouteGuide --plugin=protoc-gen-grpc=packages\Grpc.Tools.0.12.0\tools\grpc_csharp_plugin.exe
+packages\Google.Protobuf.3.0.0-beta2\tools\protoc.exe -I../../protos --csharp_out RouteGuide ../../protos/route_guide.proto --grpc_out RouteGuide --plugin=protoc-gen-grpc=packages\Grpc.Tools.0.13.0\tools\grpc_csharp_plugin.exe
endlocal \ No newline at end of file
diff --git a/examples/python/README.md b/examples/python/README.md
index 7b48c824ba..b57da8f642 100644
--- a/examples/python/README.md
+++ b/examples/python/README.md
@@ -6,24 +6,18 @@ Background
For this sample, we've already generated the server and client stubs from
[helloworld.proto][] and we'll be using a specific reference platform.
-Prerequisites
--------------
-
-- Debian 8.2 "Jessie" platform with `root` access
-- `git`
-- `python2.7`
-- `pip`
-- Python development headers
-Set-up
--------
+Install gRPC:
```sh
- $ # install the gRPC Core:
- $ sudo apt-get install libgrpc-dev
- $ # install gRPC Python:
- $ sudo pip install -U grpcio==0.11.0b1
- $ # Since this "hello, world" example uses protocol buffers:
- $ sudo pip install -U protobuf==3.0.0a3
+ $ pip install grpcio
+```
+Or, to install it system wide:
+```sh
+ $ sudo pip install grpcio
+```
+
+Download the example
+```sh
$ # Clone the repository to get the example code:
$ git clone https://github.com/grpc/grpc
$ # Navigate to the "hello, world" Python example:
diff --git a/examples/python/helloworld/run_client.sh b/examples/python/helloworld/run_client.sh
deleted file mode 100755
index 1c0ce020ee..0000000000
--- a/examples/python/helloworld/run_client.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# This is where you have cloned out the https://github.com/grpc/grpc repository
-# And built gRPC Python.
-# ADJUST THIS PATH TO WHERE YOUR ACTUAL LOCATION IS
-GRPC_ROOT=~/github/grpc
-
-$GRPC_ROOT/python2.7_virtual_environment/bin/python greeter_client.py
diff --git a/examples/python/helloworld/run_server.sh b/examples/python/helloworld/run_server.sh
deleted file mode 100755
index 82ebb1f868..0000000000
--- a/examples/python/helloworld/run_server.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# This is where you have cloned out the https://github.com/grpc/grpc repository
-# And built gRPC Python.
-# ADJUST THIS PATH TO WHERE YOUR ACTUAL LOCATION IS
-GRPC_ROOT=~/github/grpc
-
-$GRPC_ROOT/python2.7_virtual_environment/bin/python greeter_server.py
-
diff --git a/examples/python/route_guide/run_client.sh b/examples/python/route_guide/run_client.sh
deleted file mode 100755
index e5fd383859..0000000000
--- a/examples/python/route_guide/run_client.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# This is where you have cloned out the https://github.com/grpc/grpc repository
-# And built gRPC Python.
-# ADJUST THIS PATH TO WHERE YOUR ACTUAL LOCATION IS
-GRPC_ROOT=~/github/grpc
-
-$GRPC_ROOT/python2.7_virtual_environment/bin/python -B route_guide_client.py
diff --git a/examples/python/route_guide/run_server.sh b/examples/python/route_guide/run_server.sh
deleted file mode 100755
index 7b1a764c06..0000000000
--- a/examples/python/route_guide/run_server.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# This is where you have cloned out the https://github.com/grpc/grpc repository
-# And built gRPC Python.
-# ADJUST THIS PATH TO WHERE YOUR ACTUAL LOCATION IS
-GRPC_ROOT=~/github/grpc
-
-$GRPC_ROOT/python2.7_virtual_environment/bin/python -B route_guide_server.py
diff --git a/package.xml b/package.xml
index 316cc34519..9d1b0444b6 100644
--- a/package.xml
+++ b/package.xml
@@ -852,32 +852,6 @@
<file baseinstalldir="/" name="third_party/boringssl/ssl/t1_enc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/t1_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls_record.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/crc32.h" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/deflate.h" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/gzguts.h" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/inffast.h" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/inffixed.h" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/inflate.h" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/inftrees.h" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/trees.h" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/zconf.h" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/zlib.h" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/zutil.h" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/adler32.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/compress.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/crc32.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/deflate.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/gzclose.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/gzlib.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/gzread.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/gzwrite.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/infback.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/inffast.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/inflate.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/inftrees.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/trees.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/uncompr.c" role="src" />
- <file baseinstalldir="/" name="third_party/zlib/zutil.c" role="src" />
</dir>
</contents>
<dependencies>
diff --git a/setup.py b/setup.py
index 5b9f9b6c66..cfb578e215 100644
--- a/setup.py
+++ b/setup.py
@@ -208,7 +208,6 @@ PACKAGE_DATA = {
'_credentials/roots.pem',
'_windows/grpc_c.32.python',
'_windows/grpc_c.64.python',
- 'cygrpc.so',
],
}
if INSTALL_TESTS:
diff --git a/src/core/httpcli/httpcli.c b/src/core/httpcli/httpcli.c
index 63f3725219..1219c444c7 100644
--- a/src/core/httpcli/httpcli.c
+++ b/src/core/httpcli/httpcli.c
@@ -39,6 +39,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
+
#include "src/core/httpcli/format_request.h"
#include "src/core/httpcli/parser.h"
#include "src/core/iomgr/endpoint.h"
diff --git a/src/core/iomgr/ev_posix.h b/src/core/iomgr/ev_posix.h
index bfd216d3f3..ad881a188c 100644
--- a/src/core/iomgr/ev_posix.h
+++ b/src/core/iomgr/ev_posix.h
@@ -34,9 +34,12 @@
#ifndef GRPC_INTERNAL_CORE_IOMGR_EV_POSIX_H
#define GRPC_INTERNAL_CORE_IOMGR_EV_POSIX_H
+#include <poll.h>
+
#include "src/core/iomgr/exec_ctx.h"
#include "src/core/iomgr/pollset.h"
#include "src/core/iomgr/pollset_set.h"
+#include "src/core/iomgr/wakeup_fd_posix.h"
typedef struct grpc_fd grpc_fd;
@@ -53,7 +56,7 @@ typedef struct grpc_event_engine_vtable {
void (*fd_notify_on_write)(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
grpc_closure *closure);
- void (*pollset_init)(grpc_pollset *pollset, gpr_mu *mu);
+ void (*pollset_init)(grpc_pollset *pollset, gpr_mu **mu);
void (*pollset_shutdown)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_closure *closure);
void (*pollset_reset)(grpc_pollset *pollset);
@@ -147,4 +150,9 @@ void grpc_pollset_set_add_fd(grpc_exec_ctx *exec_ctx,
void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx,
grpc_pollset_set *pollset_set, grpc_fd *fd);
+/* override to allow tests to hook poll() usage */
+typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int);
+extern grpc_poll_function_type grpc_poll_function;
+extern grpc_wakeup_fd grpc_global_wakeup_fd;
+
#endif // GRPC_INTERNAL_CORE_IOMGR_EV_POSIX_H
diff --git a/src/core/iomgr/pollset.h b/src/core/iomgr/pollset.h
index 39e4ff2440..92a0374ddd 100644
--- a/src/core/iomgr/pollset.h
+++ b/src/core/iomgr/pollset.h
@@ -53,7 +53,7 @@ typedef struct grpc_pollset grpc_pollset;
typedef struct grpc_pollset_worker grpc_pollset_worker;
size_t grpc_pollset_size(void);
-void grpc_pollset_init(grpc_pollset *pollset, gpr_mu *mu);
+void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu);
/* Begin shutting down the pollset, and call closure when done.
* GRPC_POLLSET_MU(pollset) must be held */
void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
diff --git a/src/core/iomgr/pollset_windows.c b/src/core/iomgr/pollset_windows.c
index bbce23b46a..651f8e7334 100644
--- a/src/core/iomgr/pollset_windows.c
+++ b/src/core/iomgr/pollset_windows.c
@@ -89,12 +89,17 @@ static void push_front_worker(grpc_pollset_worker *root,
worker->links[type].next->links[type].prev = worker;
}
+size_t grpc_pollset_size(void) {
+ return sizeof(grpc_pollset);
+}
+
/* There isn't really any such thing as a pollset under Windows, due to the
nature of the IO completion ports. We're still going to provide a minimal
set of features for the sake of the rest of grpc. But grpc_pollset_work
won't actually do any polling, and return as quickly as possible. */
-void grpc_pollset_init(grpc_pollset *pollset) {
+void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu) {
+ *mu = &grpc_polling_mu;
memset(pollset, 0, sizeof(*pollset));
pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].next =
pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].prev =
diff --git a/src/core/iomgr/pollset_windows.h b/src/core/iomgr/pollset_windows.h
index c2f13fdfa8..dc0b7a4104 100644
--- a/src/core/iomgr/pollset_windows.h
+++ b/src/core/iomgr/pollset_windows.h
@@ -72,6 +72,4 @@ struct grpc_pollset {
grpc_closure *on_shutdown;
};
-extern gpr_mu grpc_polling_mu;
-
#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H */
diff --git a/src/core/security/google_default_credentials.c b/src/core/security/google_default_credentials.c
index 3b3e38882a..1f4f3e4aa5 100644
--- a/src/core/security/google_default_credentials.c
+++ b/src/core/security/google_default_credentials.c
@@ -52,10 +52,11 @@
static grpc_channel_credentials *default_credentials = NULL;
static int compute_engine_detection_done = 0;
-static gpr_mu g_mu;
+static gpr_mu g_state_mu;
+static gpr_mu *g_polling_mu;
static gpr_once g_once = GPR_ONCE_INIT;
-static void init_default_credentials(void) { gpr_mu_init(&g_mu); }
+static void init_default_credentials(void) { gpr_mu_init(&g_state_mu); }
typedef struct {
grpc_pollset *pollset;
@@ -80,10 +81,10 @@ static void on_compute_engine_detection_http_response(
}
}
}
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_polling_mu);
detector->is_done = 1;
grpc_pollset_kick(detector->pollset, NULL);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_polling_mu);
}
static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool s) {
@@ -102,7 +103,7 @@ static int is_stack_running_on_compute_engine(void) {
gpr_timespec max_detection_delay = gpr_time_from_seconds(1, GPR_TIMESPAN);
detector.pollset = gpr_malloc(grpc_pollset_size());
- grpc_pollset_init(detector.pollset, &g_mu);
+ grpc_pollset_init(detector.pollset, &g_polling_mu);
detector.is_done = 0;
detector.success = 0;
@@ -121,19 +122,20 @@ static int is_stack_running_on_compute_engine(void) {
/* Block until we get the response. This is not ideal but this should only be
called once for the lifetime of the process by the default credentials. */
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_polling_mu);
while (!detector.is_done) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, detector.pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC));
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_polling_mu);
grpc_httpcli_context_destroy(&context);
- grpc_closure_init(&destroy_closure, destroy_pollset, &detector.pollset);
+ grpc_closure_init(&destroy_closure, destroy_pollset, detector.pollset);
grpc_pollset_shutdown(&exec_ctx, detector.pollset, &destroy_closure);
grpc_exec_ctx_finish(&exec_ctx);
+ g_polling_mu = NULL;
gpr_free(detector.pollset);
@@ -187,7 +189,7 @@ grpc_channel_credentials *grpc_google_default_credentials_create(void) {
gpr_once_init(&g_once, init_default_credentials);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(&g_state_mu);
if (default_credentials != NULL) {
result = grpc_channel_credentials_ref(default_credentials);
@@ -233,19 +235,19 @@ end:
gpr_log(GPR_ERROR, "Could not create google default credentials.");
}
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(&g_state_mu);
return result;
}
void grpc_flush_cached_google_default_credentials(void) {
gpr_once_init(&g_once, init_default_credentials);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(&g_state_mu);
if (default_credentials != NULL) {
grpc_channel_credentials_unref(default_credentials);
default_credentials = NULL;
}
compute_engine_detection_done = 0;
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(&g_state_mu);
}
/* -- Well known credentials path. -- */
diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c
index 41449fb4a6..8a9bbace08 100644
--- a/src/core/surface/completion_queue.c
+++ b/src/core/surface/completion_queue.c
@@ -57,7 +57,8 @@ typedef struct {
/* Completion queue structure */
struct grpc_completion_queue {
- gpr_mu mu;
+ /** owned by pollset */
+ gpr_mu *mu;
/** completed events */
grpc_cq_completion completed_head;
grpc_cq_completion *completed_tail;
@@ -97,7 +98,6 @@ void grpc_cq_global_shutdown(void) {
while (g_freelist) {
grpc_completion_queue *next = g_freelist->next_free;
grpc_pollset_destroy(POLLSET_FROM_CQ(g_freelist));
- gpr_mu_destroy(&g_freelist->mu);
#ifndef NDEBUG
gpr_free(g_freelist->outstanding_tags);
#endif
@@ -128,7 +128,6 @@ grpc_completion_queue *grpc_completion_queue_create(void *reserved) {
gpr_mu_unlock(&g_freelist_mu);
cc = gpr_malloc(sizeof(grpc_completion_queue) + grpc_pollset_size());
- gpr_mu_init(&cc->mu);
grpc_pollset_init(POLLSET_FROM_CQ(cc), &cc->mu);
#ifndef NDEBUG
cc->outstanding_tags = NULL;
@@ -198,7 +197,7 @@ void grpc_cq_internal_unref(grpc_completion_queue *cc) {
void grpc_cq_begin_op(grpc_completion_queue *cc, void *tag) {
#ifndef NDEBUG
- gpr_mu_lock(&cc->mu);
+ gpr_mu_lock(cc->mu);
GPR_ASSERT(!cc->shutdown_called);
if (cc->outstanding_tag_count == cc->outstanding_tag_capacity) {
cc->outstanding_tag_capacity = GPR_MAX(4, 2 * cc->outstanding_tag_capacity);
@@ -207,7 +206,7 @@ void grpc_cq_begin_op(grpc_completion_queue *cc, void *tag) {
cc->outstanding_tag_capacity);
}
cc->outstanding_tags[cc->outstanding_tag_count++] = tag;
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
#endif
gpr_ref(&cc->pending_events);
}
@@ -235,7 +234,7 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc,
storage->next =
((uintptr_t)&cc->completed_head) | ((uintptr_t)(success != 0));
- gpr_mu_lock(&cc->mu);
+ gpr_mu_lock(cc->mu);
#ifndef NDEBUG
for (i = 0; i < (int)cc->outstanding_tag_count; i++) {
if (cc->outstanding_tags[i] == tag) {
@@ -261,7 +260,7 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc,
}
}
grpc_pollset_kick(POLLSET_FROM_CQ(cc), pluck_worker);
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
} else {
cc->completed_tail->next =
((uintptr_t)storage) | (1u & (uintptr_t)cc->completed_tail->next);
@@ -271,7 +270,7 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc,
cc->shutdown = 1;
grpc_pollset_shutdown(exec_ctx, POLLSET_FROM_CQ(cc),
&cc->pollset_shutdown_done);
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
}
GPR_TIMER_END("grpc_cq_end_op", 0);
@@ -299,7 +298,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc,
deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC);
GRPC_CQ_INTERNAL_REF(cc, "next");
- gpr_mu_lock(&cc->mu);
+ gpr_mu_lock(cc->mu);
for (;;) {
if (cc->completed_tail != &cc->completed_head) {
grpc_cq_completion *c = (grpc_cq_completion *)cc->completed_head.next;
@@ -307,7 +306,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc,
if (c == cc->completed_tail) {
cc->completed_tail = &cc->completed_head;
}
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
ret.type = GRPC_OP_COMPLETE;
ret.success = c->next & 1u;
ret.tag = c->tag;
@@ -315,14 +314,14 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc,
break;
}
if (cc->shutdown) {
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
memset(&ret, 0, sizeof(ret));
ret.type = GRPC_QUEUE_SHUTDOWN;
break;
}
now = gpr_now(GPR_CLOCK_MONOTONIC);
if (!first_loop && gpr_time_cmp(now, deadline) >= 0) {
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
memset(&ret, 0, sizeof(ret));
ret.type = GRPC_QUEUE_TIMEOUT;
break;
@@ -335,9 +334,9 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc,
gpr_timespec iteration_deadline = deadline;
if (grpc_timer_check(&exec_ctx, now, &iteration_deadline)) {
GPR_TIMER_MARK("alarm_triggered", 0);
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
grpc_exec_ctx_flush(&exec_ctx);
- gpr_mu_lock(&cc->mu);
+ gpr_mu_lock(cc->mu);
continue;
} else {
grpc_pollset_work(&exec_ctx, POLLSET_FROM_CQ(cc), &worker, now,
@@ -401,7 +400,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag,
deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC);
GRPC_CQ_INTERNAL_REF(cc, "pluck");
- gpr_mu_lock(&cc->mu);
+ gpr_mu_lock(cc->mu);
for (;;) {
prev = &cc->completed_head;
while ((c = (grpc_cq_completion *)(prev->next & ~(uintptr_t)1)) !=
@@ -411,7 +410,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag,
if (c == cc->completed_tail) {
cc->completed_tail = prev;
}
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
ret.type = GRPC_OP_COMPLETE;
ret.success = c->next & 1u;
ret.tag = c->tag;
@@ -421,7 +420,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag,
prev = c;
}
if (cc->shutdown) {
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
memset(&ret, 0, sizeof(ret));
ret.type = GRPC_QUEUE_SHUTDOWN;
break;
@@ -431,7 +430,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag,
"Too many outstanding grpc_completion_queue_pluck calls: maximum "
"is %d",
GRPC_MAX_COMPLETION_QUEUE_PLUCKERS);
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
memset(&ret, 0, sizeof(ret));
/* TODO(ctiller): should we use a different result here */
ret.type = GRPC_QUEUE_TIMEOUT;
@@ -440,7 +439,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag,
now = gpr_now(GPR_CLOCK_MONOTONIC);
if (!first_loop && gpr_time_cmp(now, deadline) >= 0) {
del_plucker(cc, tag, &worker);
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
memset(&ret, 0, sizeof(ret));
ret.type = GRPC_QUEUE_TIMEOUT;
break;
@@ -453,9 +452,9 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag,
gpr_timespec iteration_deadline = deadline;
if (grpc_timer_check(&exec_ctx, now, &iteration_deadline)) {
GPR_TIMER_MARK("alarm_triggered", 0);
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
grpc_exec_ctx_flush(&exec_ctx);
- gpr_mu_lock(&cc->mu);
+ gpr_mu_lock(cc->mu);
continue;
} else {
grpc_pollset_work(&exec_ctx, POLLSET_FROM_CQ(cc), &worker, now,
@@ -479,9 +478,9 @@ void grpc_completion_queue_shutdown(grpc_completion_queue *cc) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
GPR_TIMER_BEGIN("grpc_completion_queue_shutdown", 0);
GRPC_API_TRACE("grpc_completion_queue_shutdown(cc=%p)", 1, (cc));
- gpr_mu_lock(&cc->mu);
+ gpr_mu_lock(cc->mu);
if (cc->shutdown_called) {
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
GPR_TIMER_END("grpc_completion_queue_shutdown", 0);
return;
}
@@ -492,7 +491,7 @@ void grpc_completion_queue_shutdown(grpc_completion_queue *cc) {
grpc_pollset_shutdown(&exec_ctx, POLLSET_FROM_CQ(cc),
&cc->pollset_shutdown_done);
}
- gpr_mu_unlock(&cc->mu);
+ gpr_mu_unlock(cc->mu);
grpc_exec_ctx_finish(&exec_ctx);
GPR_TIMER_END("grpc_completion_queue_shutdown", 0);
}
diff --git a/src/csharp/Grpc.Core/Internal/PlatformApis.cs b/src/csharp/Grpc.Core/Internal/PlatformApis.cs
index f0c5b0f63f..fb1acfb607 100644
--- a/src/csharp/Grpc.Core/Internal/PlatformApis.cs
+++ b/src/csharp/Grpc.Core/Internal/PlatformApis.cs
@@ -53,12 +53,18 @@ namespace Grpc.Core.Internal
static PlatformApis()
{
+#if DNXCORE50
+ isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
+ isMacOSX = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
+ isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
+#else
var platform = Environment.OSVersion.Platform;
// PlatformID.MacOSX is never returned, commonly used trick is to identify Mac is by using uname.
isMacOSX = (platform == PlatformID.Unix && GetUname() == "Darwin");
isLinux = (platform == PlatformID.Unix && !isMacOSX);
isWindows = (platform == PlatformID.Win32NT || platform == PlatformID.Win32S || platform == PlatformID.Win32Windows);
+#endif
isMono = Type.GetType("Mono.Runtime") != null;
}
diff --git a/src/csharp/README.md b/src/csharp/README.md
index 65ae0b5efd..b4fa945ac9 100644
--- a/src/csharp/README.md
+++ b/src/csharp/README.md
@@ -12,9 +12,9 @@ Beta
PREREQUISITES
--------------
-- Windows: .NET Framework 4.5+, Visual Studio 2013 or 2015.
-- Linux: Mono 3.2.8+, MonoDevelop 5.9 with NuGet add-in installed.
-- Mac OS X: [homebrew][], Xamarin Studio with NuGet add-in installed.
+- Windows: .NET Framework 4.5+, Visual Studio 2013 or 2015
+- Linux: Mono 4+, MonoDevelop 5.9+ (with NuGet add-in installed)
+- Mac OS X: Xamarin Studio 5.9+
HOW TO USE
--------------
@@ -24,66 +24,28 @@ HOW TO USE
- Open Visual Studio and start a new project/solution.
- Add NuGet package `Grpc` as a dependency (Project options -> Manage NuGet Packages).
- That will also pull all the transitive dependencies (including the native libraries that
+ That will also pull all the transitive dependencies (including the gRPC native library that
gRPC C# is using internally).
**Linux (Debian)**
-- Add [Debian jessie-backports][] to your `sources.list` file. Example:
-
- ```sh
- echo "deb http://http.debian.net/debian jessie-backports main" | \
- sudo tee -a /etc/apt/sources.list
- ```
-
-- Install the gRPC Debian package
-
- ```sh
- sudo apt-get update
- sudo apt-get install libgrpc0
- ```
-
-- gRPC C# depends on native shared library `libgrpc_csharp_ext.so` (Unix flavor of grpc_csharp_ext.dll).
- This library is not part of the base gRPC debian package and needs to be installed manually from
- a `.deb` file. Download the debian package `libgrpc_csharp_ext` from corresponding gRPC release on GitHub
- and install it using `dpkg`.
-
- ```sh
- # choose version corresponding to the version of libgrpc you've installed.
- wget https://github.com/grpc/grpc/releases/download/release-0_11_0/libgrpc-csharp-ext0_0.11.0.0-1_amd64.deb
- dpkg -i libgrpc-csharp-ext0_0.11.0.0-1_amd64.deb
- ```
-
- Open MonoDevelop and start a new project/solution.
- Add NuGet package `Grpc` as a dependency (Project -> Add NuGet packages).
+ That will also pull all the transitive dependencies (including the gRPC native library that
+ gRPC C# is using internally).
-- NOTE: Currently, there are no debian packages for the latest version Protocol Buffers compiler (_protoc_)
- and the gRPC _protoc_ plugin. You can install them using [gRPC Linuxbrew instructions][].
+- NOTE: gRPC C# doesn't have a good story yet for shipping precompiled Linux version of Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin. You can install them using [gRPC Linuxbrew instructions][].
**Mac OS X**
-- WARNING: As of now gRPC C# only works on 64bit version of Mono (because we don't compile
- the native extension for C# in 32bit mode yet). That means your development experience
- with Xamarin Studio on MacOS will not be great, as you won't be able to run your
- code directly from Xamarin Studio (which requires 32bit version of Mono).
-
-- Install [homebrew][]. Run the following command to install gRPC C# native dependencies.
-
- ```sh
- $ curl -fsSL https://goo.gl/getgrpc | bash -
- ```
- This will download and run the [gRPC install script][], then install the latest version of gRPC C core and native C# extension.
- It also installs Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin for C#.
-
-- Install 64-bit version of mono with command `brew install mono`.
-
- Open Xamarin Studio and start a new project/solution.
- Add NuGet package `Grpc` as a dependency (Project -> Add NuGet packages).
+ That will also pull all the transitive dependencies (including the gRPC native library that
+ gRPC C# is using internally).
-- *You will be able to build your project in Xamarin Studio, but to run or test it,
- you will need to run it under 64-bit version of Mono.*
+- NOTE: gRPC C# doesn't have a good story yet for shipping precompiled Mac OS X version of Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin. You can install them using [gRPC Homebrew instructions][].
BUILD FROM SOURCE
-----------------
@@ -94,7 +56,7 @@ If you are a user of gRPC C#, go to Usage section above.
**Windows**
- The grpc_csharp_ext native library needs to be built so you can build the gRPC C# solution. You can
- either build the native solution in `vsprojects/grpc.sln` from Visual Studio manually, or you can use
+ either build the native solution in `vsprojects/grpc_csharp_ext.sln` from Visual Studio manually, or you can use
a convenience batch script that builds everything for you.
```
@@ -102,30 +64,28 @@ If you are a user of gRPC C#, go to Usage section above.
> buildall.bat
```
-- Open Grpc.sln using Visual Studio. NuGet dependencies will be restored
- upon build (you need to have NuGet add-in installed).
+- Open Grpc.sln using Visual Studio.
**Linux**
+- The grpc_csharp_ext native library needs to be built so you can build the gRPC C# solution:
```sh
- $ sudo apt-get install mono-devel
- $ sudo apt-get install nunit nunit-console
+ # from the gRPC repository root
+ $ make CONFIG=dbg grpc_csharp_ext
```
-You can use older versions of MonoDevelop, but then you might need to restore
-NuGet dependencies manually (by `nuget restore`), because older versions of MonoDevelop
-don't support NuGet add-in.
+- Use MonoDevelop to open the solution Grpc.sln
+
+**Mac OS X**
-- Compile and install the gRPC C# extension library (that will be used via
- P/Invoke from C#).
+- The grpc_csharp_ext native library needs to be built so you can build the gRPC C# solution.
+
```sh
- $ make grpc_csharp_ext
- $ sudo make install_grpc_csharp_ext
+ # from the gRPC repository root
+ $ tools/run_tests/run_tests.py -c dbg -l csharp --build_only
```
-- Use MonoDevelop to open the solution Grpc.sln
-
-- Build the solution & run all the tests from test view.
+- Use Xamarin Studio to open the solution Grpc.sln
RUNNING TESTS
-------------
@@ -135,17 +95,9 @@ gRPC C# is using NUnit as the testing framework.
Under Visual Studio, make sure NUnit test adapter is installed (under "Extensions and Updates").
Then you should be able to run all the tests using Test Explorer.
-Under Monodevelop, make sure you installed "NUnit support" in Add-in manager.
+Under Monodevelop or Xamarin Studio, make sure you installed "NUnit support" in Add-in manager.
Then you should be able to run all the test from the Test View.
-After building the solution, you can also run the tests from command line
-using nunit-console tool.
-
-```sh
-# from Grpc.Core.Test/bin/Debug directory
-$ nunit-console Grpc.Core.Tests.dll
-```
-
gRPC team uses a Python script to simplify facilitate running tests for
different languages.
@@ -176,27 +128,15 @@ CONTENTS
- Grpc.IntegrationTesting:
Cross-language gRPC implementation testing (interop testing).
-TROUBLESHOOTING
+THE NATIVE DEPENDENCY
---------------
-### Problem: Unable to load DLL 'grpc_csharp_ext.dll'
-
-Internally, gRPC C# uses a native library written in C (gRPC C core) and invokes its functionality via P/Invoke. `grpc_csharp_ext` library is a native extension library that facilitates this by wrapping some C core API into a form that's more digestible for P/Invoke. If you get the above error, it means that the native dependencies could not be located by the C# runtime (or they are incompatible with the current runtime, so they could not be loaded). The solution to this is environment specific.
-
-- If you are developing on Windows in Visual Studio, the `grpc_csharp_ext.dll` that is shipped by gRPC nuget packages should be automatically copied to your build destination folder once you build. By adjusting project properties in your VS project file, you can influence which exact configuration of `grpc_csharp_ext.dll` will be used (based on VS version, bitness, debug/release configuration).
-
-- If you are running your application that is using gRPC on Windows machine that doesn't have Visual Studio installed, you might need to install [Visual C++ 2013 redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=40784) that contains some system .dll libraries that `grpc_csharp_ext.dll` depends on (see #905 for more details).
-
-- On Linux (or Docker), you need to first install gRPC C core and `libgrpc_csharp_ext.so` shared libraries.
- See [How to Use](#how-to-use) section for details how to install it.
- Installation on a machine where your application is going to be deployed is no different.
-
-- On Mac, you need to first install gRPC C core and `libgrpc_csharp_ext.dylib` shared libraries using Homebrew. See above for installation instruction.
- Installation on a machine where your application is going to be deployed is no different.
+Internally, gRPC C# uses a native library written in C (gRPC C core) and invokes its functionality via P/Invoke. `grpc_csharp_ext` library is a native extension library that facilitates this by wrapping some C core API into a form that's more digestible for P/Invoke.
-- Possible cause for the problem is that the `grpc_csharp_ext` library is installed, but it has different bitness (32/64bit) than your C# runtime (in case you are using mono) or C# application.
+Prior to version 0.13, installing `grpc_csharp_ext` was required to make gRPC work on Linux and MacOS. Starting with version 0.13, we have improved the packaging story significantly and precompiled versions of the native library for all supported platforms are now shipped with the NuGet package. Just installing the `Grpc` NuGet package should be the only step needed to use gRPC C#, regardless of your platform (Windows, Linux or Mac) and the bitness (32 or 64bit).
[gRPC Linuxbrew instructions]:https://github.com/grpc/homebrew-grpc#quick-install-linux
+[gRPC Homebrew instructions]:https://github.com/grpc/homebrew-grpc#quick-install-linux
[homebrew]:http://brew.sh
[gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install
[grpc.io]: http://www.grpc.io/docs/installation/csharp.html
diff --git a/src/python/grpcio/precompiled.py b/src/python/grpcio/precompiled.py
index 05c651b506..ae2a0c835a 100644
--- a/src/python/grpcio/precompiled.py
+++ b/src/python/grpcio/precompiled.py
@@ -100,3 +100,5 @@ def update_setup_arguments(setup_arguments):
sys.stderr.write(
'could not write precompiled extension to directory: {} -> {}\n'
.format(url, target_path))
+ return
+ setup_arguments['package_data']['grpc._cython'].append('cygrpc.so')
diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c
index eefdb93d67..0f9b18fa21 100644
--- a/src/ruby/ext/grpc/rb_grpc.c
+++ b/src/ruby/ext/grpc/rb_grpc.c
@@ -269,20 +269,9 @@ static void Init_grpc_time_consts() {
id_tv_nsec = rb_intern("tv_nsec");
}
-/*
- TODO: find an alternative to ruby_vm_at_exit that is ok in Ruby 2.0 where
- RUBY_TYPED_FREE_IMMEDIATELY is not defined.
-
- At the moment, registering a function using ruby_vm_at_exit segfaults in Ruby
- 2.0. This is not an issue with the gRPC handler. More likely, this was an
- in issue with 2.0 that got resolved in 2.1 and has not been backported.
-*/
-#ifdef RUBY_TYPED_FREE_IMMEDIATELY
-static void grpc_rb_shutdown(ruby_vm_t *vm) {
- (void)vm;
+static void grpc_rb_shutdown(void) {
grpc_shutdown();
}
-#endif
/* Initialize the GRPC module structs */
@@ -300,18 +289,30 @@ VALUE sym_code = Qundef;
VALUE sym_details = Qundef;
VALUE sym_metadata = Qundef;
+static gpr_once g_once_init = GPR_ONCE_INIT;
+
+static void grpc_ruby_once_init() {
+ grpc_init();
+ atexit(grpc_rb_shutdown);
+}
+
void Init_grpc_c() {
if (!grpc_rb_load_core()) {
rb_raise(rb_eLoadError, "Couldn't find or load gRPC's dynamic C core");
return;
}
- grpc_init();
-
-/* TODO: find alternative to ruby_vm_at_exit that is ok in Ruby 2.0 */
-#ifdef RUBY_TYPED_FREE_IMMEDIATELY
- ruby_vm_at_exit(grpc_rb_shutdown);
-#endif
+ /* ruby_vm_at_exit doesn't seem to be working. It would crash once every
+ * blue moon, and some users are getting it repeatedly. See the discussions
+ * - https://github.com/grpc/grpc/pull/5337
+ * - https://bugs.ruby-lang.org/issues/12095
+ *
+ * In order to still be able to handle the (unlikely) situation where the
+ * extension is loaded by a first Ruby VM that is subsequently destroyed,
+ * then loaded again by another VM within the same process, we need to
+ * schedule our initialization and destruction only once.
+ */
+ gpr_once_init(&g_once_init, grpc_ruby_once_init);
grpc_rb_mGRPC = rb_define_module("GRPC");
grpc_rb_mGrpcCore = rb_define_module_under(grpc_rb_mGRPC, "Core");
diff --git a/src/ruby/lib/grpc/core/time_consts.rb b/src/ruby/lib/grpc/core/time_consts.rb
index e6dae7b08a..c8eae7806b 100644
--- a/src/ruby/lib/grpc/core/time_consts.rb
+++ b/src/ruby/lib/grpc/core/time_consts.rb
@@ -1,4 +1,4 @@
-# Copyright 2015, Google Inc.
+# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-require 'grpc'
+require 'grpc/grpc'
# GRPC contains the General RPC module.
module GRPC
diff --git a/src/ruby/lib/grpc/errors.rb b/src/ruby/lib/grpc/errors.rb
index f1201c1704..2227ee1f12 100644
--- a/src/ruby/lib/grpc/errors.rb
+++ b/src/ruby/lib/grpc/errors.rb
@@ -1,4 +1,4 @@
-# Copyright 2015, Google Inc.
+# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-require 'grpc'
+require 'grpc/grpc'
# GRPC contains the General RPC module.
module GRPC
diff --git a/templates/config.m4.template b/templates/config.m4.template
index dbc12188dc..5e73901efa 100644
--- a/templates/config.m4.template
+++ b/templates/config.m4.template
@@ -41,4 +41,18 @@
, $ext_shared, , -Wall -Werror -std=c11 ${"\\"}
-fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN ${"\\"}
-D_HAS_EXCEPTIONS=0 -DNOMINMAX)
+
+ PHP_ADD_BUILD_DIR($ext_builddir/src/php/ext/grpc)
+ <%
+ dirs = {}
+ for lib in libs:
+ if lib.name in php_config_m4.get('deps', []):
+ for source in lib.src:
+ dirs[source[:source.rfind('/')]] = 1
+ dirs = dirs.keys()
+ dirs.sort()
+ %>
+ % for dir in dirs:
+ PHP_ADD_BUILD_DIR($ext_builddir/${dir})
+ % endfor
fi
diff --git a/templates/package.xml.template b/templates/package.xml.template
index 455b002e64..067c8839d5 100644
--- a/templates/package.xml.template
+++ b/templates/package.xml.template
@@ -12,7 +12,7 @@
<email>grpc-packages@google.com</email>
<active>yes</active>
</lead>
- <%! from time import strftime %><date>${"%Y-%m-%d" | strftime}</date>
+ <date>2016-02-24</date>
<time>16:06:07</time>
<version>
<release>0.8.0</release>
@@ -149,7 +149,7 @@
<release>beta</release>
<api>beta</api>
</stability>
- <date>${"%Y-%m-%d" | strftime}</date>
+ <date>2016-02-24</date>
<license>BSD</license>
<notes>
- Simplify gRPC PHP installation #4517
diff --git a/templates/tools/run_tests/tests.json.template b/templates/tools/run_tests/tests.json.template
index 9a84783467..5690874415 100644
--- a/templates/tools/run_tests/tests.json.template
+++ b/templates/tools/run_tests/tests.json.template
@@ -3,11 +3,12 @@
<%!
import json
%>
-
+
${json.dumps([{"name": tgt.name,
"language": tgt.language,
"platforms": tgt.platforms,
"ci_platforms": tgt.ci_platforms,
+ "gtest": tgt.gtest,
"exclude_configs": tgt.get("exclude_configs", []),
"args": [],
"flaky": tgt.flaky,
diff --git a/test/core/end2end/fixtures/h2_uchannel.c b/test/core/end2end/fixtures/h2_uchannel.c
index ec1e5f4280..87bbd64d09 100644
--- a/test/core/end2end/fixtures/h2_uchannel.c
+++ b/test/core/end2end/fixtures/h2_uchannel.c
@@ -253,8 +253,7 @@ static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *arg, bool success) {
}
static grpc_connected_subchannel *connect_subchannel(grpc_subchannel *c) {
- gpr_mu mu;
- gpr_mu_init(&mu);
+ gpr_mu *mu;
grpc_pollset *pollset = gpr_malloc(grpc_pollset_size());
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_pollset_init(pollset, &mu);
@@ -264,22 +263,21 @@ static grpc_connected_subchannel *connect_subchannel(grpc_subchannel *c) {
&g_state,
grpc_closure_create(state_changed, c));
grpc_exec_ctx_flush(&exec_ctx);
- gpr_mu_lock(&mu);
+ gpr_mu_lock(mu);
while (g_state != GRPC_CHANNEL_READY) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, pollset, &worker, gpr_now(GPR_CLOCK_MONOTONIC),
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1));
- gpr_mu_unlock(&mu);
+ gpr_mu_unlock(mu);
grpc_exec_ctx_flush(&exec_ctx);
- gpr_mu_lock(&mu);
+ gpr_mu_lock(mu);
}
grpc_pollset_shutdown(&exec_ctx, pollset,
grpc_closure_create(destroy_pollset, pollset));
grpc_pollset_set_destroy(g_interested_parties);
- gpr_mu_unlock(&mu);
+ gpr_mu_unlock(mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_free(pollset);
- gpr_mu_destroy(&mu);
return grpc_subchannel_get_connected_subchannel(c);
}
diff --git a/test/core/httpcli/httpcli_test.c b/test/core/httpcli/httpcli_test.c
index cfa1829214..da1463329d 100644
--- a/test/core/httpcli/httpcli_test.c
+++ b/test/core/httpcli/httpcli_test.c
@@ -47,7 +47,7 @@
static int g_done = 0;
static grpc_httpcli_context g_context;
-static gpr_mu g_mu;
+static gpr_mu *g_mu;
static grpc_pollset *g_pollset;
static gpr_timespec n_seconds_time(int seconds) {
@@ -64,10 +64,10 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg,
GPR_ASSERT(response->status == 200);
GPR_ASSERT(response->body_length == strlen(expect));
GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length));
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
g_done = 1;
grpc_pollset_kick(g_pollset, NULL);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
static void test_get(int port) {
@@ -88,16 +88,16 @@ static void test_get(int port) {
grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15),
on_finish, (void *)42);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (!g_done) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20));
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
gpr_free(host);
}
@@ -119,16 +119,16 @@ static void test_post(int port) {
grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5,
n_seconds_time(15), on_finish, (void *)42);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (!g_done) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20));
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
gpr_free(host);
}
@@ -177,7 +177,6 @@ int main(int argc, char **argv) {
grpc_init();
grpc_httpcli_context_init(&g_context);
g_pollset = gpr_malloc(grpc_pollset_size());
- gpr_mu_init(&g_mu);
grpc_pollset_init(g_pollset, &g_mu);
test_get(port);
@@ -189,7 +188,6 @@ int main(int argc, char **argv) {
grpc_exec_ctx_finish(&exec_ctx);
grpc_shutdown();
- gpr_mu_destroy(&g_mu);
gpr_free(g_pollset);
gpr_subprocess_destroy(server);
diff --git a/test/core/httpcli/httpscli_test.c b/test/core/httpcli/httpscli_test.c
index b12f9472b1..7f765bc614 100644
--- a/test/core/httpcli/httpscli_test.c
+++ b/test/core/httpcli/httpscli_test.c
@@ -47,7 +47,7 @@
static int g_done = 0;
static grpc_httpcli_context g_context;
-static gpr_mu g_mu;
+static gpr_mu *g_mu;
static grpc_pollset *g_pollset;
static gpr_timespec n_seconds_time(int seconds) {
@@ -64,10 +64,10 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg,
GPR_ASSERT(response->status == 200);
GPR_ASSERT(response->body_length == strlen(expect));
GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length));
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
g_done = 1;
grpc_pollset_kick(g_pollset, NULL);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
static void test_get(int port) {
@@ -89,16 +89,16 @@ static void test_get(int port) {
grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15),
on_finish, (void *)42);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (!g_done) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20));
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
gpr_free(host);
}
@@ -121,16 +121,16 @@ static void test_post(int port) {
grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5,
n_seconds_time(15), on_finish, (void *)42);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (!g_done) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20));
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
gpr_free(host);
}
@@ -192,7 +192,6 @@ int main(int argc, char **argv) {
grpc_shutdown();
gpr_free(g_pollset);
- gpr_mu_destroy(&g_mu);
gpr_subprocess_destroy(server);
diff --git a/test/core/iomgr/endpoint_pair_test.c b/test/core/iomgr/endpoint_pair_test.c
index c02e414935..c3a91088a5 100644
--- a/test/core/iomgr/endpoint_pair_test.c
+++ b/test/core/iomgr/endpoint_pair_test.c
@@ -42,7 +42,7 @@
#include "test/core/iomgr/endpoint_tests.h"
#include "test/core/util/test_config.h"
-static gpr_mu g_mu;
+static gpr_mu *g_mu;
static grpc_pollset *g_pollset;
static void clean_up(void) {}
@@ -73,17 +73,15 @@ static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) {
int main(int argc, char **argv) {
grpc_closure destroyed;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- gpr_mu_init(&g_mu);
grpc_test_init(argc, argv);
grpc_init();
g_pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
- grpc_endpoint_tests(configs[0], g_pollset, &g_mu);
+ grpc_endpoint_tests(configs[0], g_pollset, g_mu);
grpc_closure_init(&destroyed, destroy_pollset, g_pollset);
grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed);
grpc_exec_ctx_finish(&exec_ctx);
grpc_shutdown();
- gpr_mu_destroy(&g_mu);
gpr_free(g_pollset);
return 0;
diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c
index 9e00f8a43e..8c64a2e787 100644
--- a/test/core/iomgr/fd_posix_test.c
+++ b/test/core/iomgr/fd_posix_test.c
@@ -53,7 +53,7 @@
#include "src/core/iomgr/iomgr.h"
#include "test/core/util/test_config.h"
-static gpr_mu g_mu;
+static gpr_mu *g_mu;
static grpc_pollset *g_pollset;
/* buffer size used to send and receive data.
@@ -182,10 +182,10 @@ static void listen_shutdown_cb(grpc_exec_ctx *exec_ctx, void *arg /*server */,
grpc_fd_orphan(exec_ctx, sv->em_fd, NULL, NULL, "b");
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
sv->done = 1;
grpc_pollset_kick(g_pollset, NULL);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
/* Called when a new TCP connection request arrives in the listening port. */
@@ -252,18 +252,18 @@ static int server_start(grpc_exec_ctx *exec_ctx, server *sv) {
/* Wait and shutdown a sever. */
static void server_wait_and_shutdown(server *sv) {
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (!sv->done) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC));
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
/* ===An upload client to test notify_on_write=== */
@@ -310,9 +310,9 @@ static void client_session_write(grpc_exec_ctx *exec_ctx, void *arg, /*client */
ssize_t write_once = 0;
if (!success) {
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
client_session_shutdown_cb(exec_ctx, arg, 1);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
return;
}
@@ -322,7 +322,7 @@ static void client_session_write(grpc_exec_ctx *exec_ctx, void *arg, /*client */
} while (write_once > 0);
if (errno == EAGAIN) {
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
if (cl->client_write_cnt < CLIENT_TOTAL_WRITE_CNT) {
cl->write_closure.cb = client_session_write;
cl->write_closure.cb_arg = cl;
@@ -331,7 +331,7 @@ static void client_session_write(grpc_exec_ctx *exec_ctx, void *arg, /*client */
} else {
client_session_shutdown_cb(exec_ctx, arg, 1);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
} else {
gpr_log(GPR_ERROR, "unknown errno %s", strerror(errno));
abort();
@@ -367,18 +367,18 @@ static void client_start(grpc_exec_ctx *exec_ctx, client *cl, int port) {
/* Wait for the signal to shutdown a client. */
static void client_wait_and_shutdown(client *cl) {
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (!cl->done) {
grpc_pollset_worker *worker = NULL;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC));
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
/* Test grpc_fd. Start an upload server and client, upload a stream of
@@ -413,20 +413,20 @@ static void first_read_callback(grpc_exec_ctx *exec_ctx,
void *arg /* fd_change_data */, bool success) {
fd_change_data *fdc = arg;
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
fdc->cb_that_ran = first_read_callback;
grpc_pollset_kick(g_pollset, NULL);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
static void second_read_callback(grpc_exec_ctx *exec_ctx,
void *arg /* fd_change_data */, bool success) {
fd_change_data *fdc = arg;
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
fdc->cb_that_ran = second_read_callback;
grpc_pollset_kick(g_pollset, NULL);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
/* Test that changing the callback we use for notify_on_read actually works.
@@ -468,18 +468,18 @@ static void test_grpc_fd_change(void) {
GPR_ASSERT(result == 1);
/* And now wait for it to run. */
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (a.cb_that_ran == NULL) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC));
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
GPR_ASSERT(a.cb_that_ran == first_read_callback);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
/* And drain the socket so we can generate a new read edge */
result = read(sv[0], &data, 1);
@@ -492,19 +492,19 @@ static void test_grpc_fd_change(void) {
result = write(sv[1], &data, 1);
GPR_ASSERT(result == 1);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (b.cb_that_ran == NULL) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC));
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
/* Except now we verify that second_read_callback ran instead */
GPR_ASSERT(b.cb_that_ran == second_read_callback);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_fd_orphan(&exec_ctx, em_fd, NULL, NULL, "d");
grpc_exec_ctx_finish(&exec_ctx);
@@ -522,7 +522,6 @@ int main(int argc, char **argv) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_test_init(argc, argv);
grpc_iomgr_init();
- gpr_mu_init(&g_mu);
g_pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
test_grpc_fd();
@@ -531,7 +530,6 @@ int main(int argc, char **argv) {
grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed);
grpc_exec_ctx_finish(&exec_ctx);
gpr_free(g_pollset);
- gpr_mu_destroy(&g_mu);
grpc_iomgr_shutdown();
return 0;
}
diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c
index 51581a8cb0..ac666080fe 100644
--- a/test/core/iomgr/tcp_client_posix_test.c
+++ b/test/core/iomgr/tcp_client_posix_test.c
@@ -51,7 +51,7 @@
#include "test/core/util/test_config.h"
static grpc_pollset_set *g_pollset_set;
-static gpr_mu g_mu;
+static gpr_mu *g_mu;
static grpc_pollset *g_pollset;
static int g_connections_complete = 0;
static grpc_endpoint *g_connecting = NULL;
@@ -61,10 +61,10 @@ static gpr_timespec test_deadline(void) {
}
static void finish_connection() {
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
g_connections_complete++;
grpc_pollset_kick(g_pollset, NULL);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
static void must_succeed(grpc_exec_ctx *exec_ctx, void *arg, bool success) {
@@ -102,9 +102,9 @@ void test_succeeds(void) {
GPR_ASSERT(0 == bind(svr_fd, (struct sockaddr *)&addr, addr_len));
GPR_ASSERT(0 == listen(svr_fd, 1));
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
connections_complete_before = g_connections_complete;
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
/* connect to it */
GPR_ASSERT(getsockname(svr_fd, (struct sockaddr *)&addr, &addr_len) == 0);
@@ -121,19 +121,19 @@ void test_succeeds(void) {
GPR_ASSERT(r >= 0);
close(r);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (g_connections_complete == connections_complete_before) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5));
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_flush(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
}
@@ -150,9 +150,9 @@ void test_fails(void) {
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
connections_complete_before = g_connections_complete;
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
/* connect to a broken address */
grpc_closure_init(&done, must_fail, NULL);
@@ -160,7 +160,7 @@ void test_fails(void) {
(struct sockaddr *)&addr, addr_len,
gpr_inf_future(GPR_CLOCK_REALTIME));
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
/* wait for the connection callback to finish */
while (g_connections_complete == connections_complete_before) {
@@ -170,12 +170,12 @@ void test_fails(void) {
if (!grpc_timer_check(&exec_ctx, now, &polling_deadline)) {
grpc_pollset_work(&exec_ctx, g_pollset, &worker, now, polling_deadline);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_flush(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
}
@@ -220,16 +220,16 @@ void test_times_out(void) {
connect_deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
connections_complete_before = g_connections_complete;
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_closure_init(&done, must_fail, NULL);
grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set,
(struct sockaddr *)&addr, addr_len, connect_deadline);
/* Make sure the event doesn't trigger early */
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
for (;;) {
grpc_pollset_worker *worker = NULL;
gpr_timespec now = gpr_now(connect_deadline.clock_type);
@@ -257,11 +257,11 @@ void test_times_out(void) {
if (!grpc_timer_check(&exec_ctx, now, &polling_deadline)) {
grpc_pollset_work(&exec_ctx, g_pollset, &worker, now, polling_deadline);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_flush(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
@@ -282,7 +282,6 @@ int main(int argc, char **argv) {
grpc_init();
g_pollset_set = grpc_pollset_set_create();
g_pollset = gpr_malloc(grpc_pollset_size());
- gpr_mu_init(&g_mu);
grpc_pollset_init(g_pollset, &g_mu);
grpc_pollset_set_add_pollset(&exec_ctx, g_pollset_set, g_pollset);
grpc_exec_ctx_finish(&exec_ctx);
@@ -296,6 +295,5 @@ int main(int argc, char **argv) {
grpc_exec_ctx_finish(&exec_ctx);
grpc_shutdown();
gpr_free(g_pollset);
- gpr_mu_destroy(&g_mu);
return 0;
}
diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c
index d6758f8fe1..4351642ab6 100644
--- a/test/core/iomgr/tcp_posix_test.c
+++ b/test/core/iomgr/tcp_posix_test.c
@@ -48,7 +48,7 @@
#include "test/core/iomgr/endpoint_tests.h"
#include "test/core/util/test_config.h"
-static gpr_mu g_mu;
+static gpr_mu *g_mu;
static grpc_pollset *g_pollset;
/*
@@ -146,7 +146,7 @@ static void read_cb(grpc_exec_ctx *exec_ctx, void *user_data, bool success) {
GPR_ASSERT(success);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
current_data = state->read_bytes % 256;
read_bytes = count_slices(state->incoming.slices, state->incoming.count,
&current_data);
@@ -154,10 +154,10 @@ static void read_cb(grpc_exec_ctx *exec_ctx, void *user_data, bool success) {
gpr_log(GPR_INFO, "Read %d bytes of %d", read_bytes,
state->target_read_bytes);
if (state->read_bytes >= state->target_read_bytes) {
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
} else {
grpc_endpoint_read(exec_ctx, state->ep, &state->incoming, &state->read_cb);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
}
@@ -189,17 +189,17 @@ static void read_test(size_t num_bytes, size_t slice_size) {
grpc_endpoint_read(&exec_ctx, ep, &state.incoming, &state.read_cb);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (state.read_bytes < state.target_read_bytes) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), deadline);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
GPR_ASSERT(state.read_bytes == state.target_read_bytes);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
gpr_slice_buffer_destroy(&state.incoming);
grpc_endpoint_destroy(&exec_ctx, ep);
@@ -235,17 +235,17 @@ static void large_read_test(size_t slice_size) {
grpc_endpoint_read(&exec_ctx, ep, &state.incoming, &state.read_cb);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (state.read_bytes < state.target_read_bytes) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), deadline);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
GPR_ASSERT(state.read_bytes == state.target_read_bytes);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
gpr_slice_buffer_destroy(&state.incoming);
grpc_endpoint_destroy(&exec_ctx, ep);
@@ -284,11 +284,11 @@ static void write_done(grpc_exec_ctx *exec_ctx,
void *user_data /* write_socket_state */, bool success) {
struct write_socket_state *state = (struct write_socket_state *)user_data;
gpr_log(GPR_INFO, "Write done callback called");
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
gpr_log(GPR_INFO, "Signalling write done");
state->write_done = 1;
grpc_pollset_kick(g_pollset, NULL);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
void drain_socket_blocking(int fd, size_t num_bytes, size_t read_size) {
@@ -305,11 +305,11 @@ void drain_socket_blocking(int fd, size_t num_bytes, size_t read_size) {
for (;;) {
grpc_pollset_worker *worker = NULL;
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10));
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
do {
bytes_read =
@@ -364,7 +364,7 @@ static void write_test(size_t num_bytes, size_t slice_size) {
grpc_endpoint_write(&exec_ctx, ep, &outgoing, &write_done_closure);
drain_socket_blocking(sv[0], num_bytes, num_bytes);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
for (;;) {
grpc_pollset_worker *worker = NULL;
if (state.write_done) {
@@ -372,11 +372,11 @@ static void write_test(size_t num_bytes, size_t slice_size) {
}
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), deadline);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
gpr_slice_buffer_destroy(&outgoing);
grpc_endpoint_destroy(&exec_ctx, ep);
@@ -424,27 +424,27 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) {
grpc_endpoint_read(&exec_ctx, ep, &state.incoming, &state.read_cb);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (state.read_bytes < state.target_read_bytes) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), deadline);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
GPR_ASSERT(state.read_bytes == state.target_read_bytes);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
gpr_slice_buffer_destroy(&state.incoming);
grpc_tcp_destroy_and_release_fd(&exec_ctx, ep, &fd, &fd_released_cb);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
while (!fd_released_done) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), deadline);
}
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
GPR_ASSERT(fd_released_done == 1);
GPR_ASSERT(fd == sv[1]);
grpc_exec_ctx_finish(&exec_ctx);
@@ -514,16 +514,14 @@ int main(int argc, char **argv) {
grpc_test_init(argc, argv);
grpc_init();
g_pollset = gpr_malloc(grpc_pollset_size());
- gpr_mu_init(&g_mu);
grpc_pollset_init(g_pollset, &g_mu);
run_tests();
- grpc_endpoint_tests(configs[0], g_pollset, &g_mu);
+ grpc_endpoint_tests(configs[0], g_pollset, g_mu);
grpc_closure_init(&destroyed, destroy_pollset, g_pollset);
grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed);
grpc_exec_ctx_finish(&exec_ctx);
grpc_shutdown();
gpr_free(g_pollset);
- gpr_mu_destroy(&g_mu);
return 0;
}
diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c
index ed627734bf..7933468355 100644
--- a/test/core/iomgr/tcp_server_posix_test.c
+++ b/test/core/iomgr/tcp_server_posix_test.c
@@ -52,7 +52,7 @@
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", #x)
-static gpr_mu g_mu;
+static gpr_mu *g_mu;
static grpc_pollset *g_pollset;
static int g_nconnects = 0;
@@ -117,11 +117,11 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp,
grpc_endpoint_shutdown(exec_ctx, tcp);
grpc_endpoint_destroy(exec_ctx, tcp);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
on_connect_result_set(&g_result, acceptor);
g_nconnects++;
grpc_pollset_kick(g_pollset, NULL);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
static void test_no_op(void) {
@@ -178,7 +178,7 @@ static void tcp_connect(grpc_exec_ctx *exec_ctx, const struct sockaddr *remote,
int clifd = socket(remote->sa_family, SOCK_STREAM, 0);
int nconnects_before;
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
nconnects_before = g_nconnects;
on_connect_result_init(&g_result);
GPR_ASSERT(clifd >= 0);
@@ -190,16 +190,16 @@ static void tcp_connect(grpc_exec_ctx *exec_ctx, const struct sockaddr *remote,
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(exec_ctx, g_pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), deadline);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(exec_ctx);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
}
gpr_log(GPR_DEBUG, "wait done");
GPR_ASSERT(g_nconnects == nconnects_before + 1);
close(clifd);
*result = g_result;
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
/* Tests a tcp server with multiple ports. TODO(daniel-j-born): Multiple fds for
@@ -315,7 +315,6 @@ int main(int argc, char **argv) {
grpc_test_init(argc, argv);
grpc_init();
g_pollset = gpr_malloc(grpc_pollset_size());
- gpr_mu_init(&g_mu);
grpc_pollset_init(g_pollset, &g_mu);
test_no_op();
@@ -330,6 +329,5 @@ int main(int argc, char **argv) {
grpc_exec_ctx_finish(&exec_ctx);
grpc_shutdown();
gpr_free(g_pollset);
- gpr_mu_destroy(&g_mu);
return 0;
}
diff --git a/test/core/iomgr/workqueue_test.c b/test/core/iomgr/workqueue_test.c
index f557042e39..8a1faf6303 100644
--- a/test/core/iomgr/workqueue_test.c
+++ b/test/core/iomgr/workqueue_test.c
@@ -39,15 +39,15 @@
#include "test/core/util/test_config.h"
-static gpr_mu g_mu;
+static gpr_mu *g_mu;
static grpc_pollset *g_pollset;
static void must_succeed(grpc_exec_ctx *exec_ctx, void *p, bool success) {
GPR_ASSERT(success == 1);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
*(int *)p = 1;
grpc_pollset_kick(g_pollset, NULL);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
}
static void test_ref_unref(void) {
@@ -71,11 +71,11 @@ static void test_add_closure(void) {
grpc_workqueue_push(wq, &c, 1);
grpc_workqueue_add_to_pollset(&exec_ctx, wq, g_pollset);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
GPR_ASSERT(!done);
grpc_pollset_work(&exec_ctx, g_pollset, &worker, gpr_now(deadline.clock_type),
deadline);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
@@ -96,11 +96,11 @@ static void test_flush(void) {
grpc_workqueue_flush(&exec_ctx, wq);
grpc_workqueue_add_to_pollset(&exec_ctx, wq, g_pollset);
- gpr_mu_lock(&g_mu);
+ gpr_mu_lock(g_mu);
GPR_ASSERT(!done);
grpc_pollset_work(&exec_ctx, g_pollset, &worker, gpr_now(deadline.clock_type),
deadline);
- gpr_mu_unlock(&g_mu);
+ gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(done);
@@ -117,7 +117,6 @@ int main(int argc, char **argv) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_test_init(argc, argv);
grpc_init();
- gpr_mu_init(&g_mu);
g_pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
@@ -131,6 +130,5 @@ int main(int argc, char **argv) {
grpc_shutdown();
gpr_free(g_pollset);
- gpr_mu_destroy(&g_mu);
return 0;
}
diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c
index 3280eac801..9b70afffe1 100644
--- a/test/core/security/oauth2_utils.c
+++ b/test/core/security/oauth2_utils.c
@@ -45,7 +45,7 @@
#include "src/core/security/credentials.h"
typedef struct {
- gpr_mu mu;
+ gpr_mu *mu;
grpc_pollset *pollset;
int is_done;
char *token;
@@ -67,11 +67,11 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data,
GPR_SLICE_LENGTH(token_slice));
token[GPR_SLICE_LENGTH(token_slice)] = '\0';
}
- gpr_mu_lock(&request->mu);
+ gpr_mu_lock(request->mu);
request->is_done = 1;
request->token = token;
grpc_pollset_kick(request->pollset, NULL);
- gpr_mu_unlock(&request->mu);
+ gpr_mu_unlock(request->mu);
}
static void do_nothing(grpc_exec_ctx *exec_ctx, void *unused, bool success) {}
@@ -95,14 +95,14 @@ char *grpc_test_fetch_oauth2_token_with_credentials(
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&request.mu);
+ gpr_mu_lock(request.mu);
while (!request.is_done) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, request.pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC));
}
- gpr_mu_unlock(&request.mu);
+ gpr_mu_unlock(request.mu);
grpc_pollset_shutdown(&exec_ctx, request.pollset, &do_nothing_closure);
grpc_exec_ctx_finish(&exec_ctx);
diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c
index 2145a79ff9..09673f362c 100644
--- a/test/core/security/print_google_default_creds_token.c
+++ b/test/core/security/print_google_default_creds_token.c
@@ -46,7 +46,7 @@
#include "src/core/support/string.h"
typedef struct {
- gpr_mu mu;
+ gpr_mu *mu;
grpc_pollset *pollset;
int is_done;
} synchronizer;
@@ -64,10 +64,10 @@ static void on_metadata_response(grpc_exec_ctx *exec_ctx, void *user_data,
printf("\nGot token: %s\n\n", token);
gpr_free(token);
}
- gpr_mu_lock(&sync->mu);
+ gpr_mu_lock(sync->mu);
sync->is_done = 1;
grpc_pollset_kick(sync->pollset, NULL);
- gpr_mu_unlock(&sync->mu);
+ gpr_mu_unlock(sync->mu);
}
int main(int argc, char **argv) {
@@ -94,7 +94,6 @@ int main(int argc, char **argv) {
}
sync.pollset = gpr_malloc(grpc_pollset_size());
- gpr_mu_init(&sync.mu);
grpc_pollset_init(sync.pollset, &sync.mu);
sync.is_done = 0;
@@ -102,21 +101,22 @@ int main(int argc, char **argv) {
&exec_ctx, ((grpc_composite_channel_credentials *)creds)->call_creds,
sync.pollset, context, on_metadata_response, &sync);
- gpr_mu_lock(&sync.mu);
+ gpr_mu_lock(sync.mu);
while (!sync.is_done) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, sync.pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC));
- gpr_mu_unlock(&sync.mu);
- grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&sync.mu);
+ gpr_mu_unlock(sync.mu);
+ grpc_exec_ctx_flush(&exec_ctx);
+ gpr_mu_lock(sync.mu);
}
- gpr_mu_unlock(&sync.mu);
+ gpr_mu_unlock(sync.mu);
+
+ grpc_exec_ctx_finish(&exec_ctx);
grpc_channel_credentials_release(creds);
gpr_free(sync.pollset);
- gpr_mu_destroy(&sync.mu);
end:
gpr_cmdline_destroy(cl);
diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c
index 61543ada43..0e8c38a53e 100644
--- a/test/core/security/secure_endpoint_test.c
+++ b/test/core/security/secure_endpoint_test.c
@@ -45,7 +45,7 @@
#include "src/core/tsi/fake_transport_security.h"
#include "test/core/util/test_config.h"
-static gpr_mu g_mu;
+static gpr_mu *g_mu;
static grpc_pollset *g_pollset;
static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair(
@@ -183,9 +183,8 @@ int main(int argc, char **argv) {
grpc_init();
g_pollset = gpr_malloc(grpc_pollset_size());
- gpr_mu_init(&g_mu);
grpc_pollset_init(g_pollset, &g_mu);
- grpc_endpoint_tests(configs[0], g_pollset, &g_mu);
+ grpc_endpoint_tests(configs[0], g_pollset, g_mu);
test_leftover(configs[1], 1);
grpc_closure_init(&destroyed, destroy_pollset, g_pollset);
grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed);
@@ -193,7 +192,6 @@ int main(int argc, char **argv) {
grpc_shutdown();
gpr_free(g_pollset);
- gpr_mu_destroy(&g_mu);
return 0;
}
diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c
index c3cf6bb739..eb86589681 100644
--- a/test/core/security/verify_jwt.c
+++ b/test/core/security/verify_jwt.c
@@ -46,7 +46,7 @@
typedef struct {
grpc_pollset *pollset;
- gpr_mu mu;
+ gpr_mu *mu;
int is_done;
int success;
} synchronizer;
@@ -79,10 +79,10 @@ static void on_jwt_verification_done(void *user_data,
grpc_jwt_verifier_status_to_string(status));
}
- gpr_mu_lock(&sync->mu);
+ gpr_mu_lock(sync->mu);
sync->is_done = 1;
grpc_pollset_kick(sync->pollset, NULL);
- gpr_mu_unlock(&sync->mu);
+ gpr_mu_unlock(sync->mu);
}
int main(int argc, char **argv) {
@@ -106,26 +106,24 @@ int main(int argc, char **argv) {
grpc_init();
sync.pollset = gpr_malloc(grpc_pollset_size());
- gpr_mu_init(&sync.mu);
grpc_pollset_init(sync.pollset, &sync.mu);
sync.is_done = 0;
grpc_jwt_verifier_verify(&exec_ctx, verifier, sync.pollset, jwt, aud,
on_jwt_verification_done, &sync);
- gpr_mu_lock(&sync.mu);
+ gpr_mu_lock(sync.mu);
while (!sync.is_done) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, sync.pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC));
- gpr_mu_unlock(&sync.mu);
+ gpr_mu_unlock(sync.mu);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&sync.mu);
+ gpr_mu_lock(sync.mu);
}
- gpr_mu_unlock(&sync.mu);
+ gpr_mu_unlock(sync.mu);
- gpr_mu_destroy(&sync.mu);
gpr_free(sync.pollset);
grpc_jwt_verifier_destroy(verifier);
diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c
index a04471706e..8b8514ccc9 100644
--- a/test/core/util/port_posix.c
+++ b/test/core/util/port_posix.c
@@ -69,7 +69,7 @@ static int has_port_been_chosen(int port) {
}
typedef struct freereq {
- gpr_mu mu;
+ gpr_mu *mu;
grpc_pollset *pollset;
int done;
} freereq;
@@ -83,10 +83,10 @@ static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p,
static void freed_port_from_server(grpc_exec_ctx *exec_ctx, void *arg,
const grpc_httpcli_response *response) {
freereq *pr = arg;
- gpr_mu_lock(&pr->mu);
+ gpr_mu_lock(pr->mu);
pr->done = 1;
grpc_pollset_kick(pr->pollset, NULL);
- gpr_mu_unlock(&pr->mu);
+ gpr_mu_unlock(pr->mu);
}
static void free_port_using_server(char *server, int port) {
@@ -103,7 +103,6 @@ static void free_port_using_server(char *server, int port) {
memset(&req, 0, sizeof(req));
pr.pollset = gpr_malloc(grpc_pollset_size());
- gpr_mu_init(&pr.mu);
grpc_pollset_init(pr.pollset, &pr.mu);
grpc_closure_init(&shutdown_closure, destroy_pollset_and_shutdown,
pr.pollset);
@@ -116,21 +115,20 @@ static void free_port_using_server(char *server, int port) {
grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req,
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), freed_port_from_server,
&pr);
- gpr_mu_lock(&pr.mu);
+ gpr_mu_lock(pr.mu);
while (!pr.done) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, pr.pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1));
}
- gpr_mu_unlock(&pr.mu);
+ gpr_mu_unlock(pr.mu);
grpc_httpcli_context_destroy(&context);
grpc_exec_ctx_finish(&exec_ctx);
grpc_pollset_shutdown(&exec_ctx, pr.pollset, &shutdown_closure);
grpc_exec_ctx_finish(&exec_ctx);
gpr_free(pr.pollset);
- gpr_mu_destroy(&pr.mu);
gpr_free(path);
}
@@ -208,7 +206,7 @@ static int is_port_available(int *port, int is_tcp) {
}
typedef struct portreq {
- gpr_mu mu;
+ gpr_mu *mu;
grpc_pollset *pollset;
int port;
int retries;
@@ -253,10 +251,10 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg,
port = port * 10 + response->body[i] - '0';
}
GPR_ASSERT(port > 1024);
- gpr_mu_lock(&pr->mu);
+ gpr_mu_lock(pr->mu);
pr->port = port;
grpc_pollset_kick(pr->pollset, NULL);
- gpr_mu_unlock(&pr->mu);
+ gpr_mu_unlock(pr->mu);
}
static int pick_port_using_server(char *server) {
@@ -271,7 +269,6 @@ static int pick_port_using_server(char *server) {
memset(&pr, 0, sizeof(pr));
memset(&req, 0, sizeof(req));
pr.pollset = gpr_malloc(grpc_pollset_size());
- gpr_mu_init(&pr.mu);
grpc_pollset_init(pr.pollset, &pr.mu);
grpc_closure_init(&shutdown_closure, destroy_pollset_and_shutdown,
pr.pollset);
@@ -287,20 +284,20 @@ static int pick_port_using_server(char *server) {
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server,
&pr);
grpc_exec_ctx_finish(&exec_ctx);
- gpr_mu_lock(&pr.mu);
+ gpr_mu_lock(pr.mu);
while (pr.port == -1) {
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, pr.pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1));
}
- gpr_mu_unlock(&pr.mu);
+ gpr_mu_unlock(pr.mu);
grpc_httpcli_context_destroy(&context);
grpc_pollset_shutdown(&exec_ctx, pr.pollset, &shutdown_closure);
grpc_exec_ctx_finish(&exec_ctx);
gpr_free(pr.pollset);
- gpr_mu_destroy(&pr.mu);
+ gpr_mu_destroy(pr.mu);
return pr.port;
}
diff --git a/test/core/util/port_windows.c b/test/core/util/port_windows.c
index b5bd0168ad..3b20aeb718 100644
--- a/test/core/util/port_windows.c
+++ b/test/core/util/port_windows.c
@@ -129,7 +129,8 @@ static int is_port_available(int *port, int is_tcp) {
}
typedef struct portreq {
- grpc_pollset pollset;
+ grpc_pollset *pollset;
+ gpr_mu *mu;
int port;
} portreq;
@@ -145,10 +146,10 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg,
port = port * 10 + response->body[i] - '0';
}
GPR_ASSERT(port > 1024);
- gpr_mu_lock(GRPC_POLLSET_MU(&pr->pollset));
+ gpr_mu_lock(pr->mu);
pr->port = port;
- grpc_pollset_kick(&pr->pollset, NULL);
- gpr_mu_unlock(GRPC_POLLSET_MU(&pr->pollset));
+ grpc_pollset_kick(pr->pollset, NULL);
+ gpr_mu_unlock(pr->mu);
}
static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p,
@@ -168,32 +169,34 @@ static int pick_port_using_server(char *server) {
memset(&pr, 0, sizeof(pr));
memset(&req, 0, sizeof(req));
- grpc_pollset_init(&pr.pollset);
+ pr.pollset = gpr_malloc(grpc_pollset_size());
+ grpc_pollset_init(pr.pollset, &pr.mu);
pr.port = -1;
req.host = server;
req.path = "/get";
grpc_httpcli_context_init(&context);
- grpc_httpcli_get(&exec_ctx, &context, &pr.pollset, &req,
+ grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req,
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server,
&pr);
- gpr_mu_lock(GRPC_POLLSET_MU(&pr.pollset));
+ gpr_mu_lock(pr.mu);
while (pr.port == -1) {
grpc_pollset_worker *worker = NULL;
- grpc_pollset_work(&exec_ctx, &pr.pollset, &worker,
+ grpc_pollset_work(&exec_ctx, pr.pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1));
- gpr_mu_unlock(GRPC_POLLSET_MU(&pr.pollset));
+ gpr_mu_unlock(pr.mu);
grpc_exec_ctx_flush(&exec_ctx);
- gpr_mu_lock(GRPC_POLLSET_MU(&pr.pollset));
+ gpr_mu_lock(pr.mu);
}
- gpr_mu_unlock(GRPC_POLLSET_MU(&pr.pollset));
+ gpr_mu_unlock(pr.mu);
grpc_httpcli_context_destroy(&context);
grpc_closure_init(&destroy_pollset_closure, destroy_pollset_and_shutdown,
&pr.pollset);
- grpc_pollset_shutdown(&exec_ctx, &pr.pollset, &destroy_pollset_closure);
+ grpc_pollset_shutdown(&exec_ctx, pr.pollset, &destroy_pollset_closure);
+ gpr_free(pr.pollset);
grpc_exec_ctx_finish(&exec_ctx);
return pr.port;
diff --git a/test/core/util/test_tcp_server.c b/test/core/util/test_tcp_server.c
index 8f1db4e501..ab379441d8 100644
--- a/test/core/util/test_tcp_server.c
+++ b/test/core/util/test_tcp_server.c
@@ -58,7 +58,6 @@ void test_tcp_server_init(test_tcp_server *server,
grpc_closure_init(&server->shutdown_complete, on_server_destroyed, server);
server->shutdown = 0;
server->pollset = gpr_malloc(grpc_pollset_size());
- gpr_mu_init(&server->mu);
grpc_pollset_init(server->pollset, &server->mu);
server->on_connect = on_connect;
server->cb_data = user_data;
@@ -91,10 +90,10 @@ void test_tcp_server_poll(test_tcp_server *server, int seconds) {
gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
gpr_time_from_seconds(seconds, GPR_TIMESPAN));
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- gpr_mu_lock(&server->mu);
+ gpr_mu_lock(server->mu);
grpc_pollset_work(&exec_ctx, server->pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), deadline);
- gpr_mu_unlock(&server->mu);
+ gpr_mu_unlock(server->mu);
grpc_exec_ctx_finish(&exec_ctx);
}
@@ -116,6 +115,5 @@ void test_tcp_server_destroy(test_tcp_server *server) {
grpc_exec_ctx_finish(&exec_ctx);
grpc_pollset_destroy(server->pollset);
gpr_free(server->pollset);
- gpr_mu_destroy(&server->mu);
grpc_shutdown();
}
diff --git a/test/core/util/test_tcp_server.h b/test/core/util/test_tcp_server.h
index ef9dd007c7..15fcb4fb87 100644
--- a/test/core/util/test_tcp_server.h
+++ b/test/core/util/test_tcp_server.h
@@ -41,7 +41,7 @@ typedef struct test_tcp_server {
grpc_tcp_server *tcp_server;
grpc_closure shutdown_complete;
int shutdown;
- gpr_mu mu;
+ gpr_mu *mu;
grpc_pollset *pollset;
grpc_tcp_server_cb on_connect;
void *cb_data;
diff --git a/tools/buildgen/build-cleaner.py b/tools/buildgen/build-cleaner.py
index 49a3644123..12054da238 100755
--- a/tools/buildgen/build-cleaner.py
+++ b/tools/buildgen/build-cleaner.py
@@ -40,6 +40,7 @@ TEST = (os.environ.get('TEST', 'false') == 'true')
_TOP_LEVEL_KEYS = ['settings', 'proto_deps', 'filegroups', 'libs', 'targets', 'vspackages']
_ELEM_KEYS = [
'name',
+ 'gtest',
'cpu_cost',
'flaky',
'build',
@@ -98,4 +99,3 @@ for filename in sys.argv[1:]:
else:
with open(filename, 'w') as f:
f.write(output)
-
diff --git a/tools/buildgen/plugins/expand_bin_attrs.py b/tools/buildgen/plugins/expand_bin_attrs.py
index 735c60ea99..c30df2ad89 100755
--- a/tools/buildgen/plugins/expand_bin_attrs.py
+++ b/tools/buildgen/plugins/expand_bin_attrs.py
@@ -52,6 +52,7 @@ def mako_plugin(dictionary):
tgt['ci_platforms'] = sorted(tgt.get('ci_platforms', tgt['platforms']))
tgt['boringssl'] = tgt.get('boringssl', False)
tgt['zlib'] = tgt.get('zlib', False)
+ tgt['gtest'] = tgt.get('gtest', False)
libs = dictionary.get('libs')
for lib in libs:
diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py
index 803d3d106b..288a3f0154 100644
--- a/tools/run_tests/artifact_targets.py
+++ b/tools/run_tests/artifact_targets.py
@@ -254,10 +254,14 @@ class PHPArtifact:
return []
def build_jobspec(self):
- return create_docker_jobspec(
- self.name,
- 'tools/dockerfile/grpc_artifact_linux_{}'.format(self.arch),
- 'tools/run_tests/build_artifact_php.sh')
+ if self.platform == 'linux':
+ return create_docker_jobspec(
+ self.name,
+ 'tools/dockerfile/grpc_artifact_linux_{}'.format(self.arch),
+ 'tools/run_tests/build_artifact_php.sh')
+ else:
+ return create_jobspec(self.name,
+ ['tools/run_tests/build_artifact_php.sh'])
class ProtocArtifact:
"""Builds protoc and protoc-plugin artifacts"""
diff --git a/tools/run_tests/build_artifact_python.sh b/tools/run_tests/build_artifact_python.sh
index 6e7ab911d5..7ba04d7546 100755
--- a/tools/run_tests/build_artifact_python.sh
+++ b/tools/run_tests/build_artifact_python.sh
@@ -39,6 +39,14 @@ then
pip install -rrequirements.txt
fi
+# Build the source distribution first because MANIFEST.in cannot override
+# exclusion of built shared objects among package resources (for some
+# inexplicable reason).
+GRPC_PYTHON_USE_CUSTOM_BDIST=0 \
+GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
+${SETARCH_CMD} python setup.py \
+ sdist
+
# The bdist_wheel_grpc_custom command is finicky about command output ordering
# and thus ought to be run in a shell command separate of others. Further, it
# trashes the actual bdist_wheel output, so it should be run first so that
@@ -48,11 +56,12 @@ GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
${SETARCH_CMD} python setup.py \
build_tagged_ext
+# Wheel has a bug where directories don't get excluded.
+# https://bitbucket.org/pypa/wheel/issues/99/cannot-exclude-directory
GRPC_PYTHON_USE_CUSTOM_BDIST=0 \
GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
${SETARCH_CMD} python setup.py \
- bdist_wheel \
- sdist
+ bdist_wheel
mkdir -p artifacts
diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py
index 0c02344d90..933103f0a0 100644
--- a/tools/run_tests/distribtest_targets.py
+++ b/tools/run_tests/distribtest_targets.py
@@ -201,7 +201,7 @@ class RubyDistribTest(object):
class PHPDistribTest(object):
"""Tests PHP package"""
- def __init__(self, platform, arch, docker_suffix):
+ def __init__(self, platform, arch, docker_suffix=None):
self.name = 'php_%s_%s_%s' % (platform, arch, docker_suffix)
self.platform = platform
self.arch = arch
@@ -212,15 +212,19 @@ class PHPDistribTest(object):
return []
def build_jobspec(self):
- if not self.platform == 'linux':
+ if self.platform == 'linux':
+ return create_docker_jobspec(self.name,
+ 'tools/dockerfile/distribtest/php_%s_%s' % (
+ self.docker_suffix,
+ self.arch),
+ 'test/distrib/php/run_distrib_test.sh')
+ elif self.platform == 'macos':
+ return create_jobspec(self.name,
+ ['test/distrib/php/run_distrib_test.sh'],
+ environ={'EXTERNAL_GIT_ROOT': '../../..'})
+ else:
raise Exception("Not supported yet.")
- return create_docker_jobspec(self.name,
- 'tools/dockerfile/distribtest/php_%s_%s' % (
- self.docker_suffix,
- self.arch),
- 'test/distrib/php/run_distrib_test.sh')
-
def __str__(self):
return self.name
@@ -271,6 +275,7 @@ def targets():
NodeDistribTest('macos', 'x64', None, '5'),
NodeDistribTest('linux', 'x86', 'jessie', '4'),
PHPDistribTest('linux', 'x64', 'jessie'),
+ PHPDistribTest('macos', 'x64'),
] + [
NodeDistribTest('linux', 'x64', os, version)
for os in ('wheezy', 'jessie', 'ubuntu1204', 'ubuntu1404',
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 7b2bc53716..75de4cb71d 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -160,12 +160,38 @@ class CLanguage(object):
else:
binary = 'bins/%s/%s' % (self.config.build_config, target['name'])
if os.path.isfile(binary):
- cmdline = [binary] + target['args']
- out.append(self.config.job_spec(cmdline, [binary],
- shortname=' '.join(cmdline),
- cpu_cost=target['cpu_cost'],
- environ={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH':
- _ROOT + '/src/core/tsi/test_creds/ca.pem'}))
+ if 'gtest' in target and target['gtest']:
+ # here we parse the output of --gtest_list_tests to build up a
+ # complete list of the tests contained in a binary
+ # for each test, we then add a job to run, filtering for just that
+ # test
+ with open(os.devnull, 'w') as fnull:
+ tests = subprocess.check_output([binary, '--gtest_list_tests'],
+ stderr=fnull)
+ base = None
+ for line in tests.split('\n'):
+ i = line.find('#')
+ if i >= 0: line = line[:i]
+ if not line: continue
+ if line[0] != ' ':
+ base = line.strip()
+ else:
+ assert base is not None
+ assert line[1] == ' '
+ test = base + line.strip()
+ cmdline = [binary] + ['--gtest_filter=%s' % test]
+ out.append(self.config.job_spec(cmdline, [binary],
+ shortname='%s:%s' % (binary, test),
+ cpu_cost=target['cpu_cost'],
+ environ={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH':
+ _ROOT + '/src/core/tsi/test_creds/ca.pem'}))
+ else:
+ cmdline = [binary] + target['args']
+ out.append(self.config.job_spec(cmdline, [binary],
+ shortname=' '.join(cmdline),
+ cpu_cost=target['cpu_cost'],
+ environ={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH':
+ _ROOT + '/src/core/tsi/test_creds/ca.pem'}))
elif self.args.regex == '.*' or self.platform == 'windows':
print '\nWARNING: binary not found, skipping', binary
return sorted(out)
diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json
index 2f514bfc00..629891a847 100644
--- a/tools/run_tests/tests.json
+++ b/tools/run_tests/tests.json
@@ -12,6 +12,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "alarm_test",
"platforms": [
@@ -32,6 +33,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "algorithm_test",
"platforms": [
@@ -52,6 +54,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "alloc_test",
"platforms": [
@@ -72,6 +75,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "alpn_test",
"platforms": [
@@ -92,6 +96,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "bin_encoder_test",
"platforms": [
@@ -112,6 +117,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "census_context_test",
"platforms": [
@@ -132,6 +138,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "channel_create_test",
"platforms": [
@@ -152,6 +159,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "chttp2_hpack_encoder_test",
"platforms": [
@@ -172,6 +180,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "chttp2_status_conversion_test",
"platforms": [
@@ -192,6 +201,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "chttp2_stream_map_test",
"platforms": [
@@ -212,6 +222,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "chttp2_varint_test",
"platforms": [
@@ -232,6 +243,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "compression_test",
"platforms": [
@@ -252,6 +264,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "dns_resolver_test",
"platforms": [
@@ -271,6 +284,7 @@
"cpu_cost": 0.1,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "dualstack_socket_test",
"platforms": [
@@ -290,6 +304,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "endpoint_pair_test",
"platforms": [
@@ -309,6 +324,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "fd_conservation_posix_test",
"platforms": [
@@ -327,6 +343,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "fd_posix_test",
"platforms": [
@@ -345,6 +362,7 @@
"cpu_cost": 2,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "fling_stream_test",
"platforms": [
@@ -363,6 +381,7 @@
"cpu_cost": 2,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "fling_test",
"platforms": [
@@ -382,6 +401,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_avl_test",
"platforms": [
@@ -402,6 +422,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_cmdline_test",
"platforms": [
@@ -422,6 +443,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_cpu_test",
"platforms": [
@@ -442,6 +464,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_env_test",
"platforms": [
@@ -462,6 +485,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_histogram_test",
"platforms": [
@@ -482,6 +506,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_host_port_test",
"platforms": [
@@ -502,6 +527,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_load_file_test",
"platforms": [
@@ -522,6 +548,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_log_test",
"platforms": [
@@ -542,6 +569,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_slice_buffer_test",
"platforms": [
@@ -562,6 +590,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_slice_test",
"platforms": [
@@ -582,6 +611,7 @@
"cpu_cost": 10,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_stack_lockfree_test",
"platforms": [
@@ -602,6 +632,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_string_test",
"platforms": [
@@ -622,6 +653,7 @@
"cpu_cost": 10,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_sync_test",
"platforms": [
@@ -642,6 +674,7 @@
"cpu_cost": 10,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_thd_test",
"platforms": [
@@ -662,6 +695,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_time_test",
"platforms": [
@@ -682,6 +716,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_tls_test",
"platforms": [
@@ -702,6 +737,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "gpr_useful_test",
"platforms": [
@@ -722,6 +758,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "grpc_auth_context_test",
"platforms": [
@@ -742,6 +779,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "grpc_b64_test",
"platforms": [
@@ -762,6 +800,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "grpc_byte_buffer_reader_test",
"platforms": [
@@ -782,6 +821,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "grpc_channel_args_test",
"platforms": [
@@ -802,6 +842,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "grpc_channel_stack_test",
"platforms": [
@@ -822,6 +863,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "grpc_completion_queue_test",
"platforms": [
@@ -842,6 +884,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "grpc_credentials_test",
"platforms": [
@@ -862,6 +905,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "grpc_invalid_channel_args_test",
"platforms": [
@@ -881,6 +925,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "grpc_json_token_test",
"platforms": [
@@ -900,6 +945,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "grpc_jwt_verifier_test",
"platforms": [
@@ -920,6 +966,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "grpc_security_connector_test",
"platforms": [
@@ -940,6 +987,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "hpack_parser_test",
"platforms": [
@@ -960,6 +1008,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "hpack_table_test",
"platforms": [
@@ -980,6 +1029,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "httpcli_format_request_test",
"platforms": [
@@ -1000,6 +1050,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "httpcli_parser_test",
"platforms": [
@@ -1019,6 +1070,7 @@
"cpu_cost": 0.5,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "httpcli_test",
"platforms": [
@@ -1035,6 +1087,7 @@
"cpu_cost": 0.5,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "httpscli_test",
"platforms": [
@@ -1052,6 +1105,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "init_test",
"platforms": [
@@ -1072,6 +1126,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "invalid_call_argument_test",
"platforms": [
@@ -1092,6 +1147,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "json_rewrite_test",
"platforms": [
@@ -1112,6 +1168,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "json_stream_error_test",
"platforms": [
@@ -1132,6 +1189,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "json_test",
"platforms": [
@@ -1152,6 +1210,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "lame_client_test",
"platforms": [
@@ -1172,6 +1231,7 @@
"cpu_cost": 0.1,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "lb_policies_test",
"platforms": [
@@ -1192,6 +1252,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "message_compress_test",
"platforms": [
@@ -1212,6 +1273,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "mlog_test",
"platforms": [
@@ -1232,6 +1294,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "multiple_server_queues_test",
"platforms": [
@@ -1252,6 +1315,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "murmur_hash_test",
"platforms": [
@@ -1272,6 +1336,7 @@
"cpu_cost": 0.1,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "no_server_test",
"platforms": [
@@ -1292,6 +1357,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "resolve_address_test",
"platforms": [
@@ -1312,6 +1378,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "secure_channel_create_test",
"platforms": [
@@ -1332,6 +1399,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "secure_endpoint_test",
"platforms": [
@@ -1352,6 +1420,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "server_chttp2_test",
"platforms": [
@@ -1372,6 +1441,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "server_test",
"platforms": [
@@ -1392,6 +1462,7 @@
"cpu_cost": 0.1,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "set_initial_connect_string_test",
"platforms": [
@@ -1412,6 +1483,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "sockaddr_resolver_test",
"platforms": [
@@ -1432,6 +1504,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "sockaddr_utils_test",
"platforms": [
@@ -1451,6 +1524,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "socket_utils_test",
"platforms": [
@@ -1469,6 +1543,7 @@
"cpu_cost": 0.5,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "tcp_client_posix_test",
"platforms": [
@@ -1487,6 +1562,7 @@
"cpu_cost": 0.5,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "tcp_posix_test",
"platforms": [
@@ -1505,6 +1581,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "tcp_server_posix_test",
"platforms": [
@@ -1524,6 +1601,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "time_averaged_stats_test",
"platforms": [
@@ -1544,6 +1622,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "timeout_encoding_test",
"platforms": [
@@ -1564,6 +1643,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "timer_heap_test",
"platforms": [
@@ -1584,6 +1664,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "timer_list_test",
"platforms": [
@@ -1604,6 +1685,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "timers_test",
"platforms": [
@@ -1624,6 +1706,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "transport_connectivity_state_test",
"platforms": [
@@ -1644,6 +1727,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "transport_metadata_test",
"platforms": [
@@ -1663,6 +1747,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "transport_security_test",
"platforms": [
@@ -1681,6 +1766,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "udp_server_test",
"platforms": [
@@ -1700,6 +1786,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "uri_parser_test",
"platforms": [
@@ -1719,6 +1806,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "workqueue_test",
"platforms": [
@@ -1738,6 +1826,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "alarm_cpp_test",
"platforms": [
@@ -1758,6 +1847,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "async_end2end_test",
"platforms": [
@@ -1777,6 +1867,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c++",
"name": "async_streaming_ping_pong_test",
"platforms": [
@@ -1795,6 +1886,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c++",
"name": "async_unary_ping_pong_test",
"platforms": [
@@ -1814,6 +1906,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "auth_property_iterator_test",
"platforms": [
@@ -1834,6 +1927,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "channel_arguments_test",
"platforms": [
@@ -1854,6 +1948,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "cli_call_test",
"platforms": [
@@ -1873,6 +1968,7 @@
"cpu_cost": 0.1,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "client_crash_test",
"platforms": [
@@ -1892,6 +1988,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "credentials_test",
"platforms": [
@@ -1912,6 +2009,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "cxx_byte_buffer_test",
"platforms": [
@@ -1932,6 +2030,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "cxx_slice_test",
"platforms": [
@@ -1952,6 +2051,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "cxx_string_ref_test",
"platforms": [
@@ -1972,6 +2072,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "cxx_time_test",
"platforms": [
@@ -1992,6 +2093,7 @@
"cpu_cost": 0.5,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "end2end_test",
"platforms": [
@@ -2011,6 +2113,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c++",
"name": "generic_async_streaming_ping_pong_test",
"platforms": [
@@ -2030,6 +2133,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "generic_end2end_test",
"platforms": [
@@ -2050,6 +2154,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "grpclb_api_test",
"platforms": [
@@ -2070,6 +2175,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "hybrid_end2end_test",
"platforms": [
@@ -2089,6 +2195,7 @@
"cpu_cost": 0.1,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c++",
"name": "interop_test",
"platforms": [
@@ -2108,6 +2215,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "mock_test",
"platforms": [
@@ -2127,6 +2235,7 @@
"cpu_cost": 10,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c++",
"name": "qps_openloop_test",
"platforms": [
@@ -2145,6 +2254,7 @@
"cpu_cost": 10,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c++",
"name": "qps_test",
"platforms": [
@@ -2164,6 +2274,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "secure_auth_context_test",
"platforms": [
@@ -2183,6 +2294,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c++",
"name": "secure_sync_unary_ping_pong_test",
"platforms": [
@@ -2201,6 +2313,7 @@
"cpu_cost": 0.1,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "server_crash_test",
"platforms": [
@@ -2220,6 +2333,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "shutdown_test",
"platforms": [
@@ -2240,6 +2354,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c++",
"name": "status_test",
"platforms": [
@@ -2259,6 +2374,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "streaming_throughput_test",
"platforms": [
@@ -2277,6 +2393,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c++",
"name": "sync_streaming_ping_pong_test",
"platforms": [
@@ -2295,6 +2412,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c++",
"name": "sync_unary_ping_pong_test",
"platforms": [
@@ -2314,6 +2432,7 @@
"cpu_cost": 100,
"exclude_configs": [],
"flaky": false,
+ "gtest": true,
"language": "c++",
"name": "thread_stress_test",
"platforms": [
@@ -2334,6 +2453,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c89",
"name": "public_headers_must_be_c89",
"platforms": [
@@ -2354,6 +2474,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "badreq_bad_client_test",
"platforms": [
@@ -2374,6 +2495,7 @@
"cpu_cost": 0.2,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "connection_prefix_bad_client_test",
"platforms": [
@@ -2394,6 +2516,7 @@
"cpu_cost": 0.2,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "headers_bad_client_test",
"platforms": [
@@ -2414,6 +2537,7 @@
"cpu_cost": 0.2,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "initial_settings_frame_bad_client_test",
"platforms": [
@@ -2434,6 +2558,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "server_registered_method_bad_client_test",
"platforms": [
@@ -2454,6 +2579,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "simple_request_bad_client_test",
"platforms": [
@@ -2474,6 +2600,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "unknown_frame_bad_client_test",
"platforms": [
@@ -2494,6 +2621,7 @@
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "window_overflow_bad_client_test",
"platforms": [
@@ -2513,6 +2641,7 @@
"cpu_cost": 0.1,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "bad_ssl_alpn_test",
"platforms": [
@@ -2531,6 +2660,7 @@
"cpu_cost": 0.1,
"exclude_configs": [],
"flaky": false,
+ "gtest": false,
"language": "c",
"name": "bad_ssl_cert_test",
"platforms": [