Merge github.com:google/grpc into batch-metadata

Conflicts:
	Makefile
	vsprojects/Grpc.mak
	vsprojects/vs2010/Grpc.mak
	vsprojects/vs2010/grpc.vcxproj
	vsprojects/vs2010/grpc.vcxproj.filters
	vsprojects/vs2010/grpc_test_util.vcxproj
	vsprojects/vs2010/grpc_unsecure.vcxproj
	vsprojects/vs2010/grpc_unsecure.vcxproj.filters
pull/1312/head
Craig Tiller 10 years ago
commit 062db022b7
  1. 2
      BUILD
  2. 15406
      Makefile
  3. 3
      build.json
  4. 94
      doc/interop-test-descriptions.md
  5. 66
      gRPC.podspec
  6. 1
      src/core/transport/chttp2/frame.h
  7. 8
      src/core/transport/chttp2/frame_settings.c
  8. 24
      src/core/transport/chttp2_transport.c
  9. 20
      src/csharp/Grpc.Core/Grpc.Core.csproj
  10. 2
      src/csharp/Grpc.Core/packages.config
  11. 19
      src/node/index.js
  12. 22
      src/node/test/surface_test.js
  13. 55
      src/node/test/test_service.json
  14. 2
      src/objective-c/GRPCClient/GRPCCall.h
  15. 4
      src/objective-c/GRPCClient/GRPCCall.m
  16. 14
      src/objective-c/GRPCClient/GRPCClient.podspec
  17. 2
      src/objective-c/GRPCClient/private/GRPCChannel.m
  18. 2
      src/objective-c/GRPCClient/private/GRPCCompletionQueue.m
  19. 2
      src/objective-c/GRPCClient/private/GRPCDelegateWrapper.m
  20. 2
      src/objective-c/GRPCClient/private/NSData+GRPC.m
  21. 13
      src/objective-c/RxLibrary/RxLibrary.podspec
  22. 7
      src/objective-c/examples/Sample/Podfile
  23. 23094
      src/objective-c/examples/Sample/Pods/Pods.xcodeproj/project.pbxproj
  24. 71
      src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj
  25. 21
      src/objective-c/examples/Sample/Sample/ViewController.m
  26. 75
      src/objective-c/examples/Sample/SampleTests/SampleTests.m
  27. 1
      src/ruby/.rspec
  28. 8
      src/ruby/.rubocop_todo.yml
  29. 1
      src/ruby/Rakefile
  30. 1
      src/ruby/grpc.gemspec
  31. 7
      src/ruby/lib/grpc/errors.rb
  32. 34
      src/ruby/lib/grpc/generic/active_call.rb
  33. 12
      src/ruby/lib/grpc/generic/rpc_desc.rb
  34. 334
      src/ruby/lib/grpc/generic/rpc_server.rb
  35. 101
      src/ruby/spec/generic/rpc_desc_spec.rb
  36. 4
      src/ruby/spec/generic/rpc_server_pool_spec.rb
  37. 166
      src/ruby/spec/generic/rpc_server_spec.rb
  38. 12
      src/ruby/spec/spec_helper.rb
  39. 2
      templates/BUILD.template
  40. 2
      templates/Makefile.template
  41. 26
      templates/vsprojects/Grpc.mak.template
  42. 2
      templates/vsprojects/gpr/gpr.vcxproj.filters.template
  43. 2
      templates/vsprojects/gpr/gpr.vcxproj.template
  44. 2
      templates/vsprojects/gpr_test_util/gpr_test_util.vcxproj.template
  45. 2
      templates/vsprojects/grpc++/grpc++.vcxproj.filters.template
  46. 2
      templates/vsprojects/grpc++/grpc++.vcxproj.template
  47. 42
      templates/vsprojects/grpc.sln.template
  48. 2
      templates/vsprojects/grpc/grpc.vcxproj.filters.template
  49. 2
      templates/vsprojects/grpc/grpc.vcxproj.template
  50. 2
      templates/vsprojects/grpc/packages.config.template
  51. 2
      templates/vsprojects/grpc_csharp_ext/grpc_csharp_ext.vcxproj.template
  52. 2
      templates/vsprojects/grpc_csharp_ext/packages.config.template
  53. 2
      templates/vsprojects/grpc_test_util/grpc_test_util.vcxproj.template
  54. 2
      templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters.template
  55. 2
      templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.template
  56. 2
      templates/vsprojects/grpc_unsecure/packages.config.template
  57. 54
      templates/vsprojects/packages.include
  58. 7
      templates/vsprojects/vcxproj.filters_defs.include
  59. 46
      templates/vsprojects/vcxproj_defs.include
  60. 107
      templates/vsprojects/vs2010/Grpc.mak.template
  61. 2
      templates/vsprojects/vs2010/gpr.vcxproj.filters.template
  62. 2
      templates/vsprojects/vs2010/gpr.vcxproj.template
  63. 2
      templates/vsprojects/vs2010/gpr_test_util.vcxproj.template
  64. 2
      templates/vsprojects/vs2010/grpc++.vcxproj.filters.template
  65. 2
      templates/vsprojects/vs2010/grpc++.vcxproj.template
  66. 59
      templates/vsprojects/vs2010/grpc.sln.template
  67. 2
      templates/vsprojects/vs2010/grpc.vcxproj.filters.template
  68. 2
      templates/vsprojects/vs2010/grpc.vcxproj.template
  69. 2
      templates/vsprojects/vs2010/grpc_csharp_ext.vcxproj.template
  70. 2
      templates/vsprojects/vs2010/grpc_csharp_ext_shared.vcxproj.template
  71. 2
      templates/vsprojects/vs2010/grpc_test_util.vcxproj.template
  72. 2
      templates/vsprojects/vs2010/grpc_unsecure.vcxproj.filters.template
  73. 2
      templates/vsprojects/vs2010/grpc_unsecure.vcxproj.template
  74. 64
      templates/vsprojects/vs2010/vcxproj.filters_defs.include
  75. 131
      templates/vsprojects/vs2010/vcxproj_defs.include
  76. 2
      templates/vsprojects/vs2013/gpr.vcxproj.filters.template
  77. 2
      templates/vsprojects/vs2013/gpr.vcxproj.template
  78. 2
      templates/vsprojects/vs2013/gpr_test_util.vcxproj.template
  79. 2
      templates/vsprojects/vs2013/grpc++.vcxproj.filters.template
  80. 2
      templates/vsprojects/vs2013/grpc++.vcxproj.template
  81. 67
      templates/vsprojects/vs2013/grpc.sln.template
  82. 2
      templates/vsprojects/vs2013/grpc.vcxproj.filters.template
  83. 2
      templates/vsprojects/vs2013/grpc.vcxproj.template
  84. 2
      templates/vsprojects/vs2013/grpc_csharp_ext.vcxproj.template
  85. 2
      templates/vsprojects/vs2013/grpc_csharp_ext_shared.vcxproj.template
  86. 2
      templates/vsprojects/vs2013/grpc_test_util.vcxproj.template
  87. 2
      templates/vsprojects/vs2013/grpc_unsecure.vcxproj.filters.template
  88. 2
      templates/vsprojects/vs2013/grpc_unsecure.vcxproj.template
  89. 44
      test/core/end2end/gen_build_json.py
  90. 2
      tools/buildgen/generate_projects.sh
  91. 4
      tools/run_tests/jobset.py
  92. 4
      tools/run_tests/run_tests.py
  93. 2518
      tools/run_tests/tests.json
  94. 1
      vsprojects/.gitignore
  95. 337
      vsprojects/Grpc.mak
  96. 1
      vsprojects/README
  97. 34
      vsprojects/README.md
  98. 26
      vsprojects/global.props
  99. 17
      vsprojects/gpr/gpr.vcxproj
  100. 0
      vsprojects/gpr/gpr.vcxproj.filters
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,5 +1,7 @@
# GRPC Bazel BUILD file.
# This currently builds C and C++ code.
# This file has been automatically generated from a template file.
# Please look at the templates directory instead.
# Copyright 2015, Google Inc.
# All rights reserved.

15406
Makefile

File diff suppressed because one or more lines are too long

@ -663,7 +663,8 @@
"test/cpp/qps/timer.cc"
],
"deps": [
"grpc_test_util"
"grpc_test_util",
"grpc++_test_util"
]
},
{

@ -2,7 +2,7 @@ Interoperability Test Case Descriptions
=======================================
Client and server use
[test.proto](https://github.com/grpc/grpc/blob/master/test/cpp/interop/test.proto)
[test.proto](https://github.com/grpc/grpc/blob/master/test/proto/test.proto)
and the [gRPC over HTTP/2 v2
protocol](https://github.com/grpc/grpc-common/blob/master/PROTOCOL-HTTP2.md).
@ -30,6 +30,14 @@ Clients should accept these arguments:
* Whether to replace platform root CAs with
[ca.pem](https://github.com/grpc/grpc/blob/master/src/core/tsi/test_creds/ca.pem)
as the CA root
* --default_service_account=ACCOUNT_EMAIL
* Email of the GCE default service account. Only applicable
for compute_engine_creds test.
* --oauth_scope=SCOPE
* OAuth scope. For example, "https://www.googleapis.com/auth/xapi.zoo"
* --service_account_key_file=PATH
* The path to the service account JSON key file generated from GCE developer
console.
Clients must support TLS with ALPN. Clients must not disable certificate
checking.
@ -259,25 +267,26 @@ Asserts:
### compute_engine_creds
Status: Not yet implementable
This test is only for cloud-to-prod path.
This test verifies unary calls succeed in sending messages while using Service
Credentials from GCE metadata server. The client instance needs to be created
with desired oauth scope.
The test uses `--default_service_account` with GCE service account email and
`--oauth_scope` with the OAuth scope to use. For testing against
grpc-test.sandbox.google.com, "https://www.googleapis.com/auth/xapi.zoo" should
be passed in as `--oauth_scope`.
Server features:
* [UnaryCall][]
* [Compressable Payload][]
* SimpeResponse.username
* SimpleResponse.oauth_scope
* [Echo Authenticated Username][]
* [Echo OAuth Scope][]
Procedure:
1. Client sets flags default_service_account with GCE service account name and
oauth_scope with the oauth scope to use.
2. Client configures channel to use GCECredentials
3. Client calls UnaryCall on the channel with:
1. Client configures channel to use GCECredentials
2. Client calls UnaryCall on the channel with:
```
{
@ -293,32 +302,34 @@ Procedure:
Asserts:
* call was successful
* received SimpleResponse.username equals FLAGS_default_service_account
* received SimpleResponse.oauth_scope is in FLAGS_oauth_scope
* received SimpleResponse.username equals the value of `--default_service_account` flag
* received SimpleResponse.oauth_scope is in `--oauth_scope`
* response payload body is 314159 bytes in size
* clients are free to assert that the response payload body contents are zero
and comparing the entire response message against a golden response
### service_account_creds
Status: Not yet implementable
This test is only for cloud-to-prod path.
This test verifies unary calls succeed in sending messages while using JWT
signing keys (redeemed for OAuth2 access tokens by the auth implementation)
The test uses `--service_account_key_file` with the path to a json key file
downloaded from https://console.developers.google.com, and `--oauth_scope`
to the oauth scope. For testing against grpc-test.sandbox.google.com,
"https://www.googleapis.com/auth/xapi.zoo" should be passed in
as `--oauth_scope`.
Server features:
* [UnaryCall][]
* [Compressable Payload][]
* SimpleResponse.username
* SimpleResponse.oauth_scope
* [Echo Authenticated Username][]
* [Echo OAuth Scope][]
Procedure:
1. Client sets flags service_account_key_file with the path to json key file,
oauth_scope to the oauth scope.
2. Client configures the channel to use ServiceAccountCredentials.
3. Client calls UnaryCall with:
1. Client configures the channel to use ServiceAccountCredentials.
2. Client calls UnaryCall with:
```
{
@ -335,31 +346,32 @@ Procedure:
Asserts:
* call was successful
* received SimpleResponse.username is in the json key file read from
FLAGS_service_account_key_file
* received SimpleResponse.oauth_scope is in FLAGS_oauth_scope
`--service_account_key_file`
* received SimpleResponse.oauth_scope is in `--oauth_scope`
* response payload body is 314159 bytes in size
* clients are free to assert that the response payload body contents are zero
and comparing the entire response message against a golden response
### jwt_token_creds
Status: Not yet implementable
This test is only for cloud-to-prod path.
This test verifies unary calls succeed in sending messages while using JWT
token (created by the project's key file)
Test caller should set flag `--service_account_key_file` with the
path to json key file downloaded from
https://console.developers.google.com.
Server features:
* [UnaryCall][]
* [Compressable Payload][]
* SimpleResponse.username
* SimpleResponse.oauth_scope
* [Echo Authenticated Username][]
* [Echo OAuth Scope][]
Procedure:
1. Client sets flags service_account_key_file with the path to json key file
2. Client configures the channel to use JWTTokenCredentials.
3. Client calls UnaryCall with:
1. Client configures the channel to use JWTTokenCredentials.
2. Client calls UnaryCall with:
```
{
@ -375,7 +387,7 @@ Procedure:
Asserts:
* call was successful
* received SimpleResponse.username is in the json key file read from
FLAGS_service_account_key_file
`--service_account_key_file`
* response payload body is 314159 bytes in size
* clients are free to assert that the response payload body contents are zero
and comparing the entire response message against a golden response
@ -394,7 +406,8 @@ Server features:
back to client in both header and trailer. (TODO: this is not defined)
Procedure:
1. While sending custom metadata (ascii + binary) in the header, client calls UnaryCall with:
1. While sending custom metadata (ascii + binary) in the header, client calls
UnaryCall with:
```
{
@ -619,11 +632,6 @@ payload body of size SimpleRequest.response_size bytes and type as appropriate
for the SimpleRequest.response_type. If the server does not support the
response_type, then it should fail the RPC with INVALID_ARGUMENT.
If the request sets fill_username, the server should return the client username
it sees in field SimpleResponse.username. If the request sets fill_oauth_scope,
the server should return the oauth scope of the rpc in the form of "xapi_zoo"
in field SimpleResponse.oauth_scope.
### StreamingInputCall
[StreamingInputCall]: #streaminginputcall
@ -672,14 +680,30 @@ Interaction with flow control is unspecified.
Status: Pending
#### Echo Authenticated Username
[Echo Authenticated Username]: #echo-authenticated-username
If a SimpleRequest has fill_username=true and that request was successfully
authenticated, then the SimpleResponse should have username filled with the
canonical form of the authenticated source. The canonical form is dependent on
the authentication method, but is likely to be a base 10 integer identifier or
an email address.
#### Echo OAuth scope
[Echo OAuth Scope]: #echo-oauth-scope
If a SimpleRequest has fill_oauth_scope=true and that request was successfully
authenticated via OAuth, then the SimpleResponse should have oauth_scope filled
with the scope of the method being invoked.
Although a general server-side feature, most test servers won't implement this
feature. The TLS server grpc-test.sandbox.google.com:443 supports this feature.
It requires at least the OAuth scope
`https://www.googleapis.com/auth/xapi.zoo` for authentication to succeed.
Discussion:
Ideally, this would be communicated via metadata and not in the
request/response, but we want to use this test in code paths that don't yet
fully communicate metadata.

@ -0,0 +1,66 @@
Pod::Spec.new do |s|
s.name = 'gRPC'
s.version = '0.0.1'
s.summary = 'Generic gRPC client library for iOS'
s.homepage = 'https://www.grpc.io'
s.license = 'New BSD'
s.authors = { 'Jorge Canizales' => 'jcanizales@google.com' }
# s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => 'release-0_5_0' }
s.source_files = 'src/objective-c/GRPCClient/*.{h,m}', 'src/objective-c/GRPCClient/private/*.{h,m}'
s.private_header_files = 'src/objective-c/GRPCClient/private/*.h'
s.platform = :ios
s.ios.deployment_target = '6.0'
s.requires_arc = true
s.subspec 'RxLibrary' do |rs|
rs.summary = 'Reactive Extensions library for iOS'
rs.authors = { 'Jorge Canizales' => 'jcanizales@google.com' }
rs.source_files = 'src/objective-c/RxLibrary/*.{h,m}', 'src/objective-c/RxLibrary/transformations/*.{h,m}', 'src/objective-c/RxLibrary/private/*.{h,m}'
rs.private_header_files = 'src/objective-c/RxLibrary/private/*.h'
end
s.subspec 'C-Core' do |cs|
cs.summary = 'Core gRPC library, written in C'
cs.authors = { 'Craig Tiller' => 'ctiller@google.com',
'David Klempner' => 'klempner@google.com',
'Nicolas Noble' => 'nnoble@google.com',
'Vijay Pai' => 'vpai@google.com',
'Yang Gao' => 'yangg@google.com' }
cs.source_files = 'src/core/**/*.{h,c}', 'include/grpc/*.h', 'include/grpc/**/*.h'
cs.private_header_files = 'src/core/**/*.h'
cs.header_mappings_dir = '.'
cs.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Build/gRPC" "$(PODS_ROOT)/Headers/Build/gRPC/include"' }
cs.requires_arc = false
cs.libraries = 'z'
cs.dependency 'OpenSSL', '~> 1.0.200'
end
# This is a workaround for Cocoapods Issue #1437.
# It renames time.h and string.h to grpc_time.h and grpc_string.h.
s.prepare_command = <<-CMD
DIR_TIME="grpc/support"
BAD_TIME="$DIR_TIME/time.h"
GOOD_TIME="$DIR_TIME/grpc_time.h"
if [ -f "include/$BAD_TIME" ];
then
grep -rl "$BAD_TIME" include/grpc src/core | xargs sed -i '' -e s@$BAD_TIME@$GOOD_TIME@g
mv "include/$BAD_TIME" "include/$GOOD_TIME"
fi
DIR_STRING="src/core/support"
BAD_STRING="$DIR_STRING/string.h"
GOOD_STRING="$DIR_STRING/grpc_string.h"
if [ -f "$BAD_STRING" ];
then
grep -rl "$BAD_STRING" include/grpc src/core | xargs sed -i '' -e s@$BAD_STRING@$GOOD_STRING@g
mv "$BAD_STRING" "$GOOD_STRING"
fi
CMD
s.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Public/gRPC/include"' }
end

@ -54,6 +54,7 @@ typedef struct {
gpr_uint8 process_ping_reply;
gpr_uint8 goaway;
gpr_int64 initial_window_update;
gpr_uint32 window_update;
gpr_uint32 goaway_last_stream_index;
gpr_uint32 goaway_error;

@ -218,6 +218,14 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse(
return GRPC_CHTTP2_CONNECTION_ERROR;
}
}
if (parser->id == GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE &&
parser->incoming_settings[parser->id] != parser->value) {
state->initial_window_update =
(gpr_int64)parser->value -
parser->incoming_settings[parser->id];
gpr_log(GPR_DEBUG, "adding %d for initial_window change",
(int)state->initial_window_update);
}
parser->incoming_settings[parser->id] = parser->value;
if (grpc_http_trace) {
gpr_log(GPR_DEBUG, "CHTTP2: got setting %d = %d", parser->id,

@ -276,8 +276,8 @@ struct transport {
struct stream {
gpr_uint32 id;
gpr_uint32 outgoing_window;
gpr_uint32 incoming_window;
gpr_int64 outgoing_window;
/* when the application requests writes be closed, the write_closed is
'queued'; when the close is flow controlled into the send path, we are
'sending' it; when the write has been performed it is 'sent' */
@ -862,7 +862,8 @@ static int prepare_write(transport *t) {
/* for each stream that's become writable, frame it's data (according to
available window sizes) and add to the output buffer */
while (t->outgoing_window && (s = stream_list_remove_head(t, WRITABLE))) {
while (t->outgoing_window && (s = stream_list_remove_head(t, WRITABLE)) &&
s->outgoing_window > 0) {
window_delta = grpc_chttp2_preencode(
s->outgoing_sopb.ops, &s->outgoing_sopb.nops,
GPR_MIN(t->outgoing_window, s->outgoing_window), &s->writing_sopb);
@ -877,7 +878,7 @@ static int prepare_write(transport *t) {
/* if there are still writes to do and the stream still has window
available, then schedule a further write */
if (s->outgoing_sopb.nops && s->outgoing_window) {
if (s->outgoing_sopb.nops > 0 && s->outgoing_window > 0) {
GPR_ASSERT(!t->outgoing_window);
stream_list_add_tail(t, s, WRITABLE);
}
@ -1459,8 +1460,8 @@ static int init_frame_parser(transport *t) {
}
}
static int is_window_update_legal(gpr_uint32 window_update, gpr_uint32 window) {
return window_update < MAX_WINDOW - window;
static int is_window_update_legal(gpr_int64 window_update, gpr_int64 window) {
return window + window_update < MAX_WINDOW;
}
static void free_md(void *p, grpc_op_error result) { gpr_free(p); }
@ -1542,12 +1543,23 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) {
}
}
}
if (st.initial_window_update) {
for (i = 0; i < t->stream_map.count; i++) {
stream *s = (stream*)(t->stream_map.values[i]);
int was_window_empty = s->outgoing_window <= 0;
s->outgoing_window += st.initial_window_update;
if (was_window_empty && s->outgoing_window > 0 &&
s->outgoing_sopb.nops > 0) {
stream_list_join(t, s, WRITABLE);
}
}
}
if (st.window_update) {
if (t->incoming_stream_id) {
/* if there was a stream id, this is for some stream */
stream *s = lookup_stream(t, t->incoming_stream_id);
if (s) {
int was_window_empty = s->outgoing_window == 0;
int was_window_empty = s->outgoing_window <= 0;
if (!is_window_update_legal(st.window_update, s->outgoing_window)) {
cancel_stream(t, s, grpc_chttp2_http2_error_to_grpc_status(
GRPC_CHTTP2_FLOW_CONTROL_ERROR),

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\portable-net45\grpc.dependencies.zlib.redist.props" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\portable-net45\grpc.dependencies.zlib.redist.props')" />
<Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.2.2\build\portable-net45\grpc.dependencies.openssl.redist.props" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.2.2\build\portable-net45\grpc.dependencies.openssl.redist.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,6 +12,7 @@
<RootNamespace>Grpc.Core</RootNamespace>
<AssemblyName>Grpc.Core</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<NuGetPackageImportStamp>8bb563fb</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -92,7 +95,7 @@
ignored, which gives us the desired effect. -->
<When Condition=" '$(OS)' != 'Unix' ">
<ItemGroup>
<Content Include="..\..\..\vsprojects\vs2013\Debug\grpc_csharp_ext.dll">
<Content Include="..\..\..\vsprojects\Debug\grpc_csharp_ext.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
@ -100,7 +103,16 @@
<Otherwise />
</Choose>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Folder Include="Stub\" />
</ItemGroup>
<ItemGroup />
<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.openssl.redist.1.0.2.2\build\portable-net45\grpc.dependencies.openssl.redist.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.2.2\build\portable-net45\grpc.dependencies.openssl.redist.props'))" />
<Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.2.2\build\portable-net45\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.2.2\build\portable-net45\grpc.dependencies.openssl.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\portable-net45\grpc.dependencies.zlib.redist.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\portable-net45\grpc.dependencies.zlib.redist.props'))" />
<Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\portable-net45\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\portable-net45\grpc.dependencies.zlib.redist.targets'))" />
</Target>
<Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.2.2\build\portable-net45\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.2.2\build\portable-net45\grpc.dependencies.openssl.redist.targets')" />
<Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\portable-net45\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\portable-net45\grpc.dependencies.zlib.redist.targets')" />
</Project>

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="grpc.dependencies.openssl.redist" version="1.0.2.2" targetFramework="net45" />
<package id="grpc.dependencies.zlib.redist" version="1.2.8.9" targetFramework="net45" />
<package id="System.Collections.Immutable" version="1.1.34-rc" targetFramework="net45" />
</packages>

@ -67,10 +67,25 @@ function loadObject(value) {
/**
* Load a gRPC object from a .proto file.
* @param {string} filename The file to load
* @param {string=} format The file format to expect. Must be either 'proto' or
* 'json'. Defaults to 'proto'
* @return {Object<string, *>} The resulting gRPC object
*/
function load(filename) {
var builder = ProtoBuf.loadProtoFile(filename);
function load(filename, format) {
if (!format) {
format = 'proto';
}
var builder;
switch(format) {
case 'proto':
builder = ProtoBuf.loadProtoFile(filename);
break;
case 'json':
builder = ProtoBuf.loadJsonFile(filename);
break;
default:
throw new Error('Unrecognized format "' + format + '"');
}
return loadObject(builder.ns);
}

@ -47,6 +47,28 @@ var mathService = math_proto.lookup('math.Math');
var capitalize = require('underscore.string/capitalize');
describe('File loader', function() {
it('Should load a proto file by default', function() {
assert.doesNotThrow(function() {
grpc.load(__dirname + '/test_service.proto');
});
});
it('Should load a proto file with the proto format', function() {
assert.doesNotThrow(function() {
grpc.load(__dirname + '/test_service.proto', 'proto');
});
});
it('Should load a json file with the json format', function() {
assert.doesNotThrow(function() {
grpc.load(__dirname + '/test_service.json', 'json');
});
});
it('Should fail to load a file with an unknown format', function() {
assert.throws(function() {
grpc.load(__dirname + '/test_service.proto', 'fake_format');
});
});
});
describe('Surface server constructor', function() {
it('Should fail with conflicting method names', function() {
assert.throws(function() {

@ -0,0 +1,55 @@
{
"package": null,
"messages": [
{
"name": "Request",
"fields": [
{
"rule": "optional",
"type": "bool",
"name": "error",
"id": 1
}
]
},
{
"name": "Response",
"fields": [
{
"rule": "optional",
"type": "int32",
"name": "count",
"id": 1
}
]
}
],
"services": [
{
"name": "TestService",
"options": {},
"rpc": {
"Unary": {
"request": "Request",
"response": "Response",
"options": {}
},
"ClientStream": {
"request": "Request",
"response": "Response",
"options": {}
},
"ServerStream": {
"request": "Request",
"response": "Response",
"options": {}
},
"BidiStream": {
"request": "Request",
"response": "Response",
"options": {}
}
}
}
]
}

@ -32,7 +32,7 @@
*/
#import <Foundation/Foundation.h>
#import <RxLibrary/GRXWriter.h>
#import <gRPC/GRXWriter.h>
@class GRPCMethodName;

@ -33,8 +33,8 @@
#import "GRPCCall.h"
#include <grpc.h>
#include <support/time.h>
#include <grpc/grpc.h>
#include <grpc/support/grpc_time.h>
#import "GRPCMethodName.h"
#import "private/GRPCChannel.h"

@ -1,14 +0,0 @@
Pod::Spec.new do |s|
s.name = 'GRPCClient'
s.version = '0.0.1'
s.summary = 'Generic gRPC client library for iOS'
s.author = {
'Jorge Canizales' => 'jcanizales@google.com'
}
s.source_files = '*.{h,m}', 'private/*.{h,m}'
s.private_header_files = 'private/*.h'
s.platform = :ios
s.ios.deployment_target = '6.0'
s.requires_arc = true
s.dependency 'RxLibrary', '~> 0.0'
end

@ -33,7 +33,7 @@
#import "GRPCChannel.h"
#import <grpc.h>
#import <grpc/grpc.h>
@implementation GRPCChannel

@ -33,7 +33,7 @@
#import "GRPCCompletionQueue.h"
#import <grpc.h>
#import <grpc/grpc.h>
@implementation GRPCCompletionQueue

@ -33,7 +33,7 @@
#import "GRPCDelegateWrapper.h"
#import <RxLibrary/GRXWriteable.h>
#import <gRPC/GRXWriteable.h>
@interface GRPCDelegateWrapper ()
// These are atomic so that cancellation can nillify them from any thread.

@ -33,7 +33,7 @@
#import "NSData+GRPC.h"
#include <byte_buffer.h>
#include <grpc/byte_buffer.h>
#include <string.h>
// TODO(jcanizales): Move these two incantations to the C library.

@ -1,13 +0,0 @@
Pod::Spec.new do |s|
s.name = 'RxLibrary'
s.version = '0.0.1'
s.summary = 'Reactive Extensions library for iOS'
s.author = {
'Jorge Canizales' => 'jcanizales@google.com'
}
s.source_files = '*.{h,m}', 'transformations/*.{h,m}', 'private/*.{h,m}'
s.private_header_files = 'private/*.h'
s.platform = :ios
s.ios.deployment_target = '6.0'
s.requires_arc = true
end

@ -1,13 +1,12 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
pod 'RxLibrary', :path => "../../RxLibrary"
pod 'GRPCClient', :path => "../../GRPCClient"
pod 'gRPC', :path => "../../../.."
target 'Sample' do
link_with 'Sample', 'SampleTests'
target 'Sample' do
end
target 'SampleTests' do
end

File diff suppressed because it is too large Load Diff

@ -77,6 +77,13 @@ fi
<key>showEnvVarsInLog</key>
<string>0</string>
</dict>
<key>60BBBBB15823BBF7639D7AA9</key>
<dict>
<key>fileRef</key>
<string>2DC7B7C4C0410F43B9621631</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>6369A2611A9322E20015FC5C</key>
<dict>
<key>children</key>
@ -481,7 +488,9 @@ fi
<key>buildActionMask</key>
<string>2147483647</string>
<key>files</key>
<array/>
<array>
<string>60BBBBB15823BBF7639D7AA9</string>
</array>
<key>isa</key>
<string>PBXFrameworksBuildPhase</string>
<key>runOnlyForDeploymentPostprocessing</key>
@ -504,9 +513,11 @@ fi
<string>6369A2901A9322E20015FC5C</string>
<key>buildPhases</key>
<array>
<string>75C393B2FDC60A22B2121058</string>
<string>6369A27F1A9322E20015FC5C</string>
<string>6369A2801A9322E20015FC5C</string>
<string>6369A2811A9322E20015FC5C</string>
<string>7B8CDC152F76D6014A96C798</string>
</array>
<key>buildRules</key>
<array/>
@ -831,6 +842,8 @@ fi
</dict>
<key>6369A2911A9322E20015FC5C</key>
<dict>
<key>baseConfigurationReference</key>
<string>AC29DD6FCDF962F519FEBB0D</string>
<key>buildSettings</key>
<dict>
<key>BUNDLE_LOADER</key>
@ -861,6 +874,8 @@ fi
</dict>
<key>6369A2921A9322E20015FC5C</key>
<dict>
<key>baseConfigurationReference</key>
<string>C68330F8D451CC6ACEABA09F</string>
<key>buildSettings</key>
<dict>
<key>BUNDLE_LOADER</key>
@ -884,6 +899,60 @@ fi
<key>name</key>
<string>Release</string>
</dict>
<key>75C393B2FDC60A22B2121058</key>
<dict>
<key>buildActionMask</key>
<string>2147483647</string>
<key>files</key>
<array/>
<key>inputPaths</key>
<array/>
<key>isa</key>
<string>PBXShellScriptBuildPhase</string>
<key>name</key>
<string>Check Pods Manifest.lock</string>
<key>outputPaths</key>
<array/>
<key>runOnlyForDeploymentPostprocessing</key>
<string>0</string>
<key>shellPath</key>
<string>/bin/sh</string>
<key>shellScript</key>
<string>diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" &gt; /dev/null
if [[ $? != 0 ]] ; then
cat &lt;&lt; EOM
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
EOM
exit 1
fi
</string>
<key>showEnvVarsInLog</key>
<string>0</string>
</dict>
<key>7B8CDC152F76D6014A96C798</key>
<dict>
<key>buildActionMask</key>
<string>2147483647</string>
<key>files</key>
<array/>
<key>inputPaths</key>
<array/>
<key>isa</key>
<string>PBXShellScriptBuildPhase</string>
<key>name</key>
<string>Copy Pods Resources</string>
<key>outputPaths</key>
<array/>
<key>runOnlyForDeploymentPostprocessing</key>
<string>0</string>
<key>shellPath</key>
<string>/bin/sh</string>
<key>shellScript</key>
<string>"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh"
</string>
<key>showEnvVarsInLog</key>
<string>0</string>
</dict>
<key>AB3331C9AE6488E61B2B094E</key>
<dict>
<key>children</key>

@ -32,10 +32,11 @@
*/
#import "ViewController.h"
#import <GRPCClient/GRPCCall.h>
#import <GRPCClient/GRPCMethodName.h>
#import <RxLibrary/GRXWriter+Immediate.h>
#import <RxLibrary/GRXWriteable.h>
#import <gRPC/GRPCCall.h>
#import <gRPC/GRPCMethodName.h>
#import <gRPC/GRXWriter+Immediate.h>
#import <gRPC/GRXWriteable.h>
@interface ViewController ()
@ -51,15 +52,19 @@
interface:@"TestService"
method:@"EmptyCall"];
GRPCCall *call = [[GRPCCall alloc] initWithHost:@"localhost"
id<GRXWriter> requestsWriter = [GRXWriter writerWithValue:[NSData data]];
GRPCCall *call = [[GRPCCall alloc] initWithHost:@"grpc-test.sandbox.google.com:443"
method:method
requestsWriter:[GRXWriter writerWithValue:[NSData data]]];
requestsWriter:requestsWriter];
[call startWithWriteable:[[GRXWriteable alloc] initWithValueHandler:^(NSData *value) {
id<GRXWriteable> responsesWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) {
NSLog(@"Received response: %@", value);
} completionHandler:^(NSError *errorOrNil) {
NSLog(@"Finished with error: %@", errorOrNil);
}]];
}];
[call startWithWriteable:responsesWriteable];
}
- (void)didReceiveMemoryWarning {

@ -34,32 +34,71 @@
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
@interface SampleTests : XCTestCase
#import <gRPC/GRPCCall.h>
#import <gRPC/GRPCMethodName.h>
#import <gRPC/GRXWriter+Immediate.h>
#import <gRPC/GRXWriteable.h>
@interface SampleTests : XCTestCase
@end
// These tests require the gRPC-Java "RouteGuide" sample server to be running locally. Install the
// gRPC-Java library following the instructions here: https://github.com/grpc/grpc-java And run the
// server by following the instructions here: https://github.com/grpc/grpc-java/tree/master/examples
@implementation SampleTests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)testConnectionToLocalServer {
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"Server reachable."];
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
// This method isn't implemented by the local server.
GRPCMethodName *method = [[GRPCMethodName alloc] initWithPackage:@"grpc.testing"
interface:@"TestService"
method:@"EmptyCall"];
- (void)testExample {
// This is an example of a functional test case.
XCTAssert(YES, @"Pass");
}
id<GRXWriter> requestsWriter = [GRXWriter writerWithValue:[NSData data]];
GRPCCall *call = [[GRPCCall alloc] initWithHost:@"127.0.0.1:8980"
method:method
requestsWriter:requestsWriter];
id<GRXWriteable> responsesWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) {
XCTFail(@"Received unexpected response: %@", value);
} completionHandler:^(NSError *errorOrNil) {
XCTAssertNotNil(errorOrNil, @"Finished without error!");
XCTAssertEqual(errorOrNil.code, 12, @"Finished with unexpected error: %@", errorOrNil);
[expectation fulfill];
}];
[call startWithWriteable:responsesWriteable];
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
[self waitForExpectationsWithTimeout:2.0 handler:nil];
}
- (void)testEmptyRPC {
__weak XCTestExpectation *response = [self expectationWithDescription:@"Empty response received."];
__weak XCTestExpectation *completion = [self expectationWithDescription:@"Empty RPC completed."];
GRPCMethodName *method = [[GRPCMethodName alloc] initWithPackage:@"grpc.example.routeguide"
interface:@"RouteGuide"
method:@"RecordRoute"];
id<GRXWriter> requestsWriter = [GRXWriter emptyWriter];
GRPCCall *call = [[GRPCCall alloc] initWithHost:@"127.0.0.1:8980"
method:method
requestsWriter:requestsWriter];
id<GRXWriteable> responsesWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) {
XCTAssertNotNil(value, @"nil value received as response.");
XCTAssertEqual([value length], 0, @"Non-empty response received: %@", value);
[response fulfill];
} completionHandler:^(NSError *errorOrNil) {
XCTAssertNil(errorOrNil, @"Finished with unexpected error: %@", errorOrNil);
[completion fulfill];
}];
[call startWithWriteable:responsesWriteable];
[self waitForExpectationsWithTimeout:2.0 handler:nil];
}
@end

@ -1 +1,2 @@
-I.
--require spec_helper

@ -1,18 +1,18 @@
# This configuration was generated by `rubocop --auto-gen-config`
# on 2015-04-16 12:30:09 -0700 using RuboCop version 0.30.0.
# on 2015-04-17 14:43:27 -0700 using RuboCop version 0.30.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 34
# Offense count: 30
Metrics/AbcSize:
Max: 36
Max: 40
# Offense count: 3
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 185
Max: 184
# Offense count: 35
# Configuration parameters: CountComments.

@ -26,6 +26,7 @@ namespace :suite do
SPEC_SUITES.each do |suite|
desc "Run all specs in the #{suite[:title]} spec suite"
RSpec::Core::RakeTask.new(suite[:id]) do |t|
ENV['COVERAGE_NAME'] = suite[:id].to_s
spec_files = []
suite[:files].each { |f| spec_files += Dir[f] } if suite[:files]

@ -29,6 +29,7 @@ Gem::Specification.new do |s|
s.add_dependency 'logging', '~> 1.8'
s.add_dependency 'minitest', '~> 5.4' # reqd for interop tests
s.add_development_dependency 'simplecov', '~> 0.9'
s.add_development_dependency 'bundler', '~> 1.9'
s.add_development_dependency 'rake', '~> 10.4'
s.add_development_dependency 'rake-compiler', '~> 0.9'

@ -36,14 +36,15 @@ module GRPC
# error should be returned to the other end of a GRPC connection; when
# caught it means that this end received a status error.
class BadStatus < StandardError
attr_reader :code, :details
attr_reader :code, :details, :metadata
# @param code [Numeric] the status code
# @param details [String] the details of the exception
def initialize(code, details = 'unknown cause')
def initialize(code, details = 'unknown cause', **kw)
super("#{code}:#{details}")
@code = code
@details = details
@metadata = kw
end
# Converts the exception to a GRPC::Status for use in the networking
@ -51,7 +52,7 @@ module GRPC
#
# @return [Status] with the same code and details
def to_status
Status.new(code, details)
Struct::Status.new(code, details, @metadata)
end
end

@ -39,7 +39,10 @@ class Struct
return nil if status.nil?
fail GRPC::Cancelled if status.code == GRPC::Core::StatusCodes::CANCELLED
if status.code != GRPC::Core::StatusCodes::OK
fail GRPC::BadStatus.new(status.code, status.details)
# raise BadStatus, propagating the metadata if present.
md = status.metadata
with_sym_keys = Hash[md.each_pair.collect { |x, y| [x.to_sym, y] }]
fail GRPC::BadStatus.new(status.code, status.details, **with_sym_keys)
end
status
end
@ -119,6 +122,12 @@ module GRPC
@metadata_tag = metadata_tag
end
# output_metadata are provides access to hash that can be used to
# save metadata to be sent as trailer
def output_metadata
@output_metadata ||= {}
end
# multi_req_view provides a restricted view of this ActiveCall for use
# in a server client-streaming handler.
def multi_req_view
@ -161,10 +170,12 @@ module GRPC
def finished
batch_result = @call.run_batch(@cq, self, INFINITE_FUTURE,
RECV_STATUS_ON_CLIENT => nil)
if @call.metadata.nil?
@call.metadata = batch_result.metadata
elsif !batch_result.metadata.nil?
@call.metadata.merge!(batch_result.metadata)
unless batch_result.status.nil?
if @call.metadata.nil?
@call.metadata = batch_result.status.metadata
else
@call.metadata.merge!(batch_result.status.metadata)
end
end
batch_result.check_status
end
@ -192,9 +203,13 @@ module GRPC
# @param details [String] details
# @param assert_finished [true, false] when true(default), waits for
# FINISHED.
def send_status(code = OK, details = '', assert_finished = false)
#
# == Keyword Arguments ==
# any keyword arguments are treated as metadata to be sent to the server
# if a keyword value is a list, multiple metadata for it's key are sent
def send_status(code = OK, details = '', assert_finished = false, **kw)
ops = {
SEND_STATUS_FROM_SERVER => Struct::Status.new(code, details)
SEND_STATUS_FROM_SERVER => Struct::Status.new(code, details, kw)
}
ops[RECV_CLOSE_ON_SERVER] = nil if assert_finished
@call.run_batch(@cq, self, INFINITE_FUTURE, ops)
@ -438,12 +453,13 @@ module GRPC
# SingleReqView limits access to an ActiveCall's methods for use in server
# handlers that receive just one request.
SingleReqView = view_class(:cancelled, :deadline, :metadata)
SingleReqView = view_class(:cancelled, :deadline, :metadata,
:output_metadata)
# MultiReqView limits access to an ActiveCall's methods for use in
# server client_streamer handlers.
MultiReqView = view_class(:cancelled, :deadline, :each_queued_msg,
:each_remote_read, :metadata)
:each_remote_read, :metadata, :output_metadata)
# Operation limits access to an ActiveCall's methods for use as
# a Operation on the client.

@ -80,12 +80,12 @@ module GRPC
else # is a bidi_stream
active_call.run_server_bidi(mth)
end
send_status(active_call, OK, 'OK')
send_status(active_call, OK, 'OK', **active_call.output_metadata)
rescue BadStatus => e
# this is raised by handlers that want GRPC to send an application
# error code and detail message.
# this is raised by handlers that want GRPC to send an application error
# code and detail message and some additional app-specific metadata.
logger.debug("app err: #{active_call}, status:#{e.code}:#{e.details}")
send_status(active_call, e.code, e.details)
send_status(active_call, e.code, e.details, **e.metadata)
rescue Core::CallError => e
# This is raised by GRPC internals but should rarely, if ever happen.
# Log it, but don't notify the other endpoint..
@ -135,9 +135,9 @@ module GRPC
"##{mth.name}: bad arg count; got:#{mth.arity}, want:#{want}, #{msg}"
end
def send_status(active_client, code, details)
def send_status(active_client, code, details, **kw)
details = 'Not sure why' if details.nil?
active_client.send_status(code, details, code == OK)
active_client.send_status(code, details, code == OK, **kw)
rescue StandardError => e
logger.warn("Could not send status #{code}:#{details}")
logger.warn(e)

@ -37,6 +37,120 @@ $grpc_signals = []
# GRPC contains the General RPC module.
module GRPC
# Handles the signals in $grpc_signals.
#
# @return false if the server should exit, true if not.
def handle_signals
loop do
sig = $grpc_signals.shift
case sig
when 'INT'
return false
when 'TERM'
return false
end
end
true
end
module_function :handle_signals
# Pool is a simple thread pool.
class Pool
# Default keep alive period is 1s
DEFAULT_KEEP_ALIVE = 1
def initialize(size, keep_alive: DEFAULT_KEEP_ALIVE)
fail 'pool size must be positive' unless size > 0
@jobs = Queue.new
@size = size
@stopped = false
@stop_mutex = Mutex.new
@stop_cond = ConditionVariable.new
@workers = []
@keep_alive = keep_alive
end
# Returns the number of jobs waiting
def jobs_waiting
@jobs.size
end
# Runs the given block on the queue with the provided args.
#
# @param args the args passed blk when it is called
# @param blk the block to call
def schedule(*args, &blk)
fail 'already stopped' if @stopped
return if blk.nil?
logger.info('schedule another job')
@jobs << [blk, args]
end
# Starts running the jobs in the thread pool.
def start
fail 'already stopped' if @stopped
until @workers.size == @size.to_i
next_thread = Thread.new do
catch(:exit) do # allows { throw :exit } to kill a thread
loop_execute_jobs
end
remove_current_thread
end
@workers << next_thread
end
end
# Stops the jobs in the pool
def stop
logger.info('stopping, will wait for all the workers to exit')
@workers.size.times { schedule { throw :exit } }
@stopped = true
@stop_mutex.synchronize do # wait @keep_alive for works to stop
@stop_cond.wait(@stop_mutex, @keep_alive) if @workers.size > 0
end
forcibly_stop_workers
logger.info('stopped, all workers are shutdown')
end
protected
# Forcibly shutdown any threads that are still alive.
def forcibly_stop_workers
return unless @workers.size > 0
logger.info("forcibly terminating #{@workers.size} worker(s)")
@workers.each do |t|
next unless t.alive?
begin
t.exit
rescue StandardError => e
logger.warn('error while terminating a worker')
logger.warn(e)
end
end
end
# removes the threads from workers, and signal when all the
# threads are complete.
def remove_current_thread
@stop_mutex.synchronize do
@workers.delete(Thread.current)
@stop_cond.signal if @workers.size == 0
end
end
def loop_execute_jobs
loop do
begin
blk, args = @jobs.pop
blk.call(*args)
rescue StandardError => e
logger.warn('Error in worker thread')
logger.warn(e)
end
end
end
end
# RpcServer hosts a number of services and makes them available on the
# network.
class RpcServer
@ -69,6 +183,32 @@ module GRPC
%w(INT TERM).each { |sig| trap(sig) { $grpc_signals << sig } }
end
# setup_cq is used by #initialize to constuct a Core::CompletionQueue from
# its arguments.
def self.setup_cq(alt_cq)
return Core::CompletionQueue.new if alt_cq.nil?
unless alt_cq.is_a? Core::CompletionQueue
fail(TypeError, '!CompletionQueue')
end
alt_cq
end
# setup_srv is used by #initialize to constuct a Core::Server from its
# arguments.
def self.setup_srv(alt_srv, cq, **kw)
return Core::Server.new(cq, kw) if alt_srv.nil?
fail(TypeError, '!Server') unless alt_srv.is_a? Core::Server
alt_srv
end
# setup_connect_md_proc is used by #initialize to validate the
# connect_md_proc.
def self.setup_connect_md_proc(a_proc)
return nil if a_proc.nil?
fail(TypeError, '!Proc') unless a_proc.is_a? Proc
a_proc
end
# Creates a new RpcServer.
#
# The RPC server is configured using keyword arguments.
@ -96,30 +236,21 @@ module GRPC
# * max_waiting_requests: the maximum number of requests that are not
# being handled to allow. When this limit is exceeded, the server responds
# with not available to new requests
#
# * connect_md_proc:
# when non-nil is a proc for determining metadata to to send back the client
# on receiving an invocation req. The proc signature is:
# {key: val, ..} func(method_name, {key: val, ...})
def initialize(pool_size:DEFAULT_POOL_SIZE,
max_waiting_requests:DEFAULT_MAX_WAITING_REQUESTS,
poll_period:DEFAULT_POLL_PERIOD,
completion_queue_override:nil,
server_override:nil,
connect_md_proc:nil,
**kw)
if completion_queue_override.nil?
cq = Core::CompletionQueue.new
else
cq = completion_queue_override
unless cq.is_a? Core::CompletionQueue
fail(ArgumentError, 'not a CompletionQueue')
end
end
@cq = cq
if server_override.nil?
srv = Core::Server.new(@cq, kw)
else
srv = server_override
fail(ArgumentError, 'not a Server') unless srv.is_a? Core::Server
end
@server = srv
@cq = RpcServer.setup_cq(completion_queue_override)
@server = RpcServer.setup_srv(server_override, @cq, **kw)
@connect_md_proc = RpcServer.setup_connect_md_proc(connect_md_proc)
@pool_size = pool_size
@max_waiting_requests = max_waiting_requests
@poll_period = poll_period
@ -179,22 +310,6 @@ module GRPC
t.join
end
# Handles the signals in $grpc_signals.
#
# @return false if the server should exit, true if not.
def handle_signals
loop do
sig = $grpc_signals.shift
case sig
when 'INT'
return false
when 'TERM'
return false
end
end
true
end
# Determines if the server is currently stopped
def stopped?
@stopped ||= false
@ -258,19 +373,7 @@ module GRPC
end
@pool.start
@server.start
request_call_tag = Object.new
until stopped?
deadline = from_relative_time(@poll_period)
an_rpc = @server.request_call(@cq, request_call_tag, deadline)
next if an_rpc.nil?
c = new_active_server_call(an_rpc)
unless c.nil?
mth = an_rpc.method.to_sym
@pool.schedule(c) do |call|
rpc_descs[mth].run_server_method(call, rpc_handlers[mth])
end
end
end
loop_handle_server_calls
@running = false
end
@ -297,17 +400,35 @@ module GRPC
nil
end
# handles calls to the server
def loop_handle_server_calls
fail 'not running' unless @running
request_call_tag = Object.new
until stopped?
deadline = from_relative_time(@poll_period)
an_rpc = @server.request_call(@cq, request_call_tag, deadline)
c = new_active_server_call(an_rpc)
unless c.nil?
mth = an_rpc.method.to_sym
@pool.schedule(c) do |call|
rpc_descs[mth].run_server_method(call, rpc_handlers[mth])
end
end
end
end
def new_active_server_call(an_rpc)
# Accept the call. This is necessary even if a status is to be sent
# back immediately
return nil if an_rpc.nil? || an_rpc.call.nil?
# allow the metadata to be accessed from the call
handle_call_tag = Object.new
an_rpc.call.metadata = an_rpc.metadata
# TODO: add a hook to send md
an_rpc.call.metadata = an_rpc.metadata # attaches md to call for handlers
connect_md = nil
unless @connect_md_proc.nil?
connect_md = @connect_md_proc.call(an_rpc.method, an_rpc.metadata)
end
an_rpc.call.run_batch(@cq, handle_call_tag, INFINITE_FUTURE,
SEND_INITIAL_METADATA => nil)
SEND_INITIAL_METADATA => connect_md)
return nil unless available?(an_rpc)
return nil unless found?(an_rpc)
@ -319,93 +440,6 @@ module GRPC
an_rpc.deadline)
end
# Pool is a simple thread pool for running server requests.
class Pool
# Default keep alive period is 1s
DEFAULT_KEEP_ALIVE = 1
def initialize(size, keep_alive: DEFAULT_KEEP_ALIVE)
fail 'pool size must be positive' unless size > 0
@jobs = Queue.new
@size = size
@stopped = false
@stop_mutex = Mutex.new
@stop_cond = ConditionVariable.new
@workers = []
@keep_alive = keep_alive
end
# Returns the number of jobs waiting
def jobs_waiting
@jobs.size
end
# Runs the given block on the queue with the provided args.
#
# @param args the args passed blk when it is called
# @param blk the block to call
def schedule(*args, &blk)
fail 'already stopped' if @stopped
return if blk.nil?
logger.info('schedule another job')
@jobs << [blk, args]
end
# Starts running the jobs in the thread pool.
def start
fail 'already stopped' if @stopped
until @workers.size == @size.to_i
next_thread = Thread.new do
catch(:exit) do # allows { throw :exit } to kill a thread
loop do
begin
blk, args = @jobs.pop
blk.call(*args)
rescue StandardError => e
logger.warn('Error in worker thread')
logger.warn(e)
end
end
end
# removes the threads from workers, and signal when all the
# threads are complete.
@stop_mutex.synchronize do
@workers.delete(Thread.current)
@stop_cond.signal if @workers.size == 0
end
end
@workers << next_thread
end
end
# Stops the jobs in the pool
def stop
logger.info('stopping, will wait for all the workers to exit')
@workers.size.times { schedule { throw :exit } }
@stopped = true
@stop_mutex.synchronize do
@stop_cond.wait(@stop_mutex, @keep_alive) if @workers.size > 0
end
# Forcibly shutdown any threads that are still alive.
if @workers.size > 0
logger.info("forcibly terminating #{@workers.size} worker(s)")
@workers.each do |t|
next unless t.alive?
begin
t.exit
rescue StandardError => e
logger.warn('error while terminating a worker')
logger.warn(e)
end
end
end
logger.info('stopped, all workers are shutdown')
end
end
protected
def rpc_descs
@ -416,11 +450,9 @@ module GRPC
@rpc_handlers ||= {}
end
private
def assert_valid_service_class(cls)
unless cls.include?(GenericService)
fail "#{cls} should 'include GenericService'"
fail "#{cls} must 'include GenericService'"
end
if cls.rpc_descs.size == 0
fail "#{cls} should specify some rpc descriptions"
@ -430,21 +462,17 @@ module GRPC
def add_rpc_descs_for(service)
cls = service.is_a?(Class) ? service : service.class
specs = rpc_descs
handlers = rpc_handlers
specs, handlers = rpc_descs, rpc_handlers
cls.rpc_descs.each_pair do |name, spec|
route = "/#{cls.service_name}/#{name}".to_sym
if specs.key? route
fail "Cannot add rpc #{route} from #{spec}, already registered"
fail "already registered: rpc #{route} from #{spec}" if specs.key? route
specs[route] = spec
if service.is_a?(Class)
handlers[route] = cls.new.method(name.to_s.underscore.to_sym)
else
specs[route] = spec
if service.is_a?(Class)
handlers[route] = cls.new.method(name.to_s.underscore.to_sym)
else
handlers[route] = service.method(name.to_s.underscore.to_sym)
end
logger.info("handling #{route} with #{handlers[route]}")
handlers[route] = service.method(name.to_s.underscore.to_sym)
end
logger.info("handling #{route} with #{handlers[route]}")
end
end
end

@ -52,41 +52,49 @@ describe GRPC::RpcDesc do
@ok_response = Object.new
end
shared_examples 'it handles errors' do
it 'sends the specified status if BadStatus is raised' do
expect(@call).to receive(:remote_read).once.and_return(Object.new)
expect(@call).to receive(:send_status).once.with(@bs_code, 'NOK', false,
{})
this_desc.run_server_method(@call, method(:bad_status))
end
it 'sends status UNKNOWN if other StandardErrors are raised' do
expect(@call).to receive(:remote_read).once.and_return(Object.new)
expect(@call).to receive(:send_status) .once.with(UNKNOWN, @no_reason,
false, {})
this_desc.run_server_method(@call, method(:other_error))
end
it 'absorbs CallError with no further action' do
expect(@call).to receive(:remote_read).once.and_raise(CallError)
blk = proc do
this_desc.run_server_method(@call, method(:fake_reqresp))
end
expect(&blk).to_not raise_error
end
end
describe '#run_server_method' do
let(:fake_md) { { k1: 'v1', k2: 'v2' } }
describe 'for request responses' do
let(:this_desc) { @request_response }
before(:each) do
@call = double('active_call')
allow(@call).to receive(:single_req_view).and_return(@call)
allow(@call).to receive(:gc)
end
it 'sends the specified status if BadStatus is raised' do
expect(@call).to receive(:remote_read).once.and_return(Object.new)
expect(@call).to receive(:send_status).once.with(@bs_code, 'NOK', false)
@request_response.run_server_method(@call, method(:bad_status))
end
it 'sends status UNKNOWN if other StandardErrors are raised' do
expect(@call).to receive(:remote_read).once.and_return(Object.new)
expect(@call).to receive(:send_status) .once.with(UNKNOWN, @no_reason,
false)
@request_response.run_server_method(@call, method(:other_error))
end
it 'absorbs CallError with no further action' do
expect(@call).to receive(:remote_read).once.and_raise(CallError)
blk = proc do
@request_response.run_server_method(@call, method(:fake_reqresp))
end
expect(&blk).to_not raise_error
end
it_behaves_like 'it handles errors'
it 'sends a response and closes the stream if there no errors' do
req = Object.new
expect(@call).to receive(:remote_read).once.and_return(req)
expect(@call).to receive(:remote_send).once.with(@ok_response)
expect(@call).to receive(:send_status).once.with(OK, 'OK', true)
@request_response.run_server_method(@call, method(:fake_reqresp))
expect(@call).to receive(:output_metadata).and_return(fake_md)
expect(@call).to receive(:send_status).once.with(OK, 'OK', true,
**fake_md)
this_desc.run_server_method(@call, method(:fake_reqresp))
end
end
@ -94,17 +102,17 @@ describe GRPC::RpcDesc do
before(:each) do
@call = double('active_call')
allow(@call).to receive(:multi_req_view).and_return(@call)
allow(@call).to receive(:gc)
end
it 'sends the specified status if BadStatus is raised' do
expect(@call).to receive(:send_status).once.with(@bs_code, 'NOK', false)
expect(@call).to receive(:send_status).once.with(@bs_code, 'NOK', false,
{})
@client_streamer.run_server_method(@call, method(:bad_status_alt))
end
it 'sends status UNKNOWN if other StandardErrors are raised' do
expect(@call).to receive(:send_status) .once.with(UNKNOWN, @no_reason,
false)
false, {})
@client_streamer.run_server_method(@call, method(:other_error_alt))
end
@ -118,44 +126,29 @@ describe GRPC::RpcDesc do
it 'sends a response and closes the stream if there no errors' do
expect(@call).to receive(:remote_send).once.with(@ok_response)
expect(@call).to receive(:send_status).once.with(OK, 'OK', true)
expect(@call).to receive(:output_metadata).and_return(fake_md)
expect(@call).to receive(:send_status).once.with(OK, 'OK', true,
**fake_md)
@client_streamer.run_server_method(@call, method(:fake_clstream))
end
end
describe 'for server streaming' do
let(:this_desc) { @request_response }
before(:each) do
@call = double('active_call')
allow(@call).to receive(:single_req_view).and_return(@call)
allow(@call).to receive(:gc)
end
it 'sends the specified status if BadStatus is raised' do
expect(@call).to receive(:remote_read).once.and_return(Object.new)
expect(@call).to receive(:send_status).once.with(@bs_code, 'NOK', false)
@server_streamer.run_server_method(@call, method(:bad_status))
end
it 'sends status UNKNOWN if other StandardErrors are raised' do
expect(@call).to receive(:remote_read).once.and_return(Object.new)
expect(@call).to receive(:send_status) .once.with(UNKNOWN, @no_reason,
false)
@server_streamer.run_server_method(@call, method(:other_error))
end
it 'absorbs CallError with no further action' do
expect(@call).to receive(:remote_read).once.and_raise(CallError)
blk = proc do
@server_streamer.run_server_method(@call, method(:fake_svstream))
end
expect(&blk).to_not raise_error
end
it_behaves_like 'it handles errors'
it 'sends a response and closes the stream if there no errors' do
req = Object.new
expect(@call).to receive(:remote_read).once.and_return(req)
expect(@call).to receive(:remote_send).twice.with(@ok_response)
expect(@call).to receive(:send_status).once.with(OK, 'OK', true)
expect(@call).to receive(:output_metadata).and_return(fake_md)
expect(@call).to receive(:send_status).once.with(OK, 'OK', true,
**fake_md)
@server_streamer.run_server_method(@call, method(:fake_svstream))
end
end
@ -166,26 +159,28 @@ describe GRPC::RpcDesc do
enq_th, rwl_th = double('enqueue_th'), ('read_write_loop_th')
allow(enq_th).to receive(:join)
allow(rwl_th).to receive(:join)
allow(@call).to receive(:gc)
end
it 'sends the specified status if BadStatus is raised' do
e = GRPC::BadStatus.new(@bs_code, 'NOK')
expect(@call).to receive(:run_server_bidi).and_raise(e)
expect(@call).to receive(:send_status).once.with(@bs_code, 'NOK', false)
expect(@call).to receive(:send_status).once.with(@bs_code, 'NOK', false,
{})
@bidi_streamer.run_server_method(@call, method(:bad_status_alt))
end
it 'sends status UNKNOWN if other StandardErrors are raised' do
expect(@call).to receive(:run_server_bidi).and_raise(StandardError)
expect(@call).to receive(:send_status).once.with(UNKNOWN, @no_reason,
false)
false, {})
@bidi_streamer.run_server_method(@call, method(:other_error_alt))
end
it 'closes the stream if there no errors' do
expect(@call).to receive(:run_server_bidi)
expect(@call).to receive(:send_status).once.with(OK, 'OK', true)
expect(@call).to receive(:output_metadata).and_return(fake_md)
expect(@call).to receive(:send_status).once.with(OK, 'OK', true,
**fake_md)
@bidi_streamer.run_server_method(@call, method(:fake_bidistream))
end
end

@ -29,9 +29,9 @@
require 'grpc'
Pool = GRPC::RpcServer::Pool
describe GRPC::Pool do
Pool = GRPC::Pool
describe Pool do
describe '#new' do
it 'raises if a non-positive size is used' do
expect { Pool.new(0) }.to raise_error

@ -57,18 +57,20 @@ class NoRpcImplementation
rpc :an_rpc, EchoMsg, EchoMsg
end
# A test service with an implementation.
# A test service with an echo implementation.
class EchoService
include GRPC::GenericService
rpc :an_rpc, EchoMsg, EchoMsg
attr_reader :received_md
def initialize(_default_var = 'ignored')
def initialize(**kw)
@trailing_metadata = kw
@received_md = []
end
def an_rpc(req, call)
logger.info('echo service received a request')
call.output_metadata.update(@trailing_metadata)
@received_md << call.metadata unless call.metadata.nil?
req
end
@ -76,6 +78,25 @@ end
EchoStub = EchoService.rpc_stub_class
# A test service with an implementation that fails with BadStatus
class FailingService
include GRPC::GenericService
rpc :an_rpc, EchoMsg, EchoMsg
attr_reader :details, :code, :md
def initialize(_default_var = 'ignored')
@details = 'app error'
@code = 101
@md = { failed_method: 'an_rpc' }
end
def an_rpc(_req, _call)
fail GRPC::BadStatus.new(@code, @details, **@md)
end
end
FailingStub = FailingService.rpc_stub_class
# A slow test service.
class SlowService
include GRPC::GenericService
@ -300,21 +321,20 @@ describe GRPC::RpcServer do
end
describe '#run' do
before(:each) do
@client_opts = {
channel_override: @ch
}
@marshal = EchoService.rpc_descs[:an_rpc].marshal_proc
@unmarshal = EchoService.rpc_descs[:an_rpc].unmarshal_proc(:output)
server_opts = {
server_override: @server,
completion_queue_override: @server_queue,
poll_period: 1
}
@srv = RpcServer.new(**server_opts)
end
let(:client_opts) { { channel_override: @ch } }
let(:marshal) { EchoService.rpc_descs[:an_rpc].marshal_proc }
let(:unmarshal) { EchoService.rpc_descs[:an_rpc].unmarshal_proc(:output) }
context 'with no connect_metadata' do
before(:each) do
server_opts = {
server_override: @server,
completion_queue_override: @server_queue,
poll_period: 1
}
@srv = RpcServer.new(**server_opts)
end
describe 'when running' do
it 'should return NOT_FOUND status on unknown methods', server: true do
@srv.handle(EchoService)
t = Thread.new { @srv.run }
@ -322,8 +342,8 @@ describe GRPC::RpcServer do
req = EchoMsg.new
blk = proc do
cq = GRPC::Core::CompletionQueue.new
stub = GRPC::ClientStub.new(@host, cq, **@client_opts)
stub.request_response('/unknown', req, @marshal, @unmarshal)
stub = GRPC::ClientStub.new(@host, cq, **client_opts)
stub.request_response('/unknown', req, marshal, unmarshal)
end
expect(&blk).to raise_error GRPC::BadStatus
@srv.stop
@ -336,7 +356,7 @@ describe GRPC::RpcServer do
@srv.wait_till_running
req = EchoMsg.new
n = 5 # arbitrary
stub = EchoStub.new(@host, **@client_opts)
stub = EchoStub.new(@host, **client_opts)
n.times { expect(stub.an_rpc(req)).to be_a(EchoMsg) }
@srv.stop
t.join
@ -348,7 +368,7 @@ describe GRPC::RpcServer do
t = Thread.new { @srv.run }
@srv.wait_till_running
req = EchoMsg.new
stub = EchoStub.new(@host, **@client_opts)
stub = EchoStub.new(@host, **client_opts)
expect(stub.an_rpc(req, k1: 'v1', k2: 'v2')).to be_a(EchoMsg)
wanted_md = [{ 'k1' => 'v1', 'k2' => 'v2' }]
expect(service.received_md).to eq(wanted_md)
@ -362,7 +382,7 @@ describe GRPC::RpcServer do
t = Thread.new { @srv.run }
@srv.wait_till_running
req = EchoMsg.new
stub = SlowStub.new(@host, **@client_opts)
stub = SlowStub.new(@host, **client_opts)
deadline = service.delay + 1.0 # wait for long enough
expect(stub.an_rpc(req, deadline, k1: 'v1', k2: 'v2')).to be_a(EchoMsg)
wanted_md = [{ 'k1' => 'v1', 'k2' => 'v2' }]
@ -377,7 +397,7 @@ describe GRPC::RpcServer do
t = Thread.new { @srv.run }
@srv.wait_till_running
req = EchoMsg.new
stub = SlowStub.new(@host, **@client_opts)
stub = SlowStub.new(@host, **client_opts)
deadline = 0.1 # too short for SlowService to respond
blk = proc { stub.an_rpc(req, deadline, k1: 'v1', k2: 'v2') }
expect(&blk).to raise_error GRPC::BadStatus
@ -393,7 +413,7 @@ describe GRPC::RpcServer do
t = Thread.new { @srv.run }
@srv.wait_till_running
req = EchoMsg.new
stub = SlowStub.new(@host, **@client_opts)
stub = SlowStub.new(@host, **client_opts)
op = stub.an_rpc(req, k1: 'v1', k2: 'v2', return_op: true)
Thread.new do # cancel the call
sleep 0.1
@ -410,11 +430,11 @@ describe GRPC::RpcServer do
t = Thread.new { @srv.run }
@srv.wait_till_running
req = EchoMsg.new
@client_opts[:update_metadata] = proc do |md|
client_opts[:update_metadata] = proc do |md|
md[:k1] = 'updated-v1'
md
end
stub = EchoStub.new(@host, **@client_opts)
stub = EchoStub.new(@host, **client_opts)
expect(stub.an_rpc(req, k1: 'v1', k2: 'v2')).to be_a(EchoMsg)
wanted_md = [{ 'k1' => 'updated-v1', 'k2' => 'v2',
'jwt_aud_uri' => "https://#{@host}/EchoService" }]
@ -432,7 +452,7 @@ describe GRPC::RpcServer do
threads = []
n.times do
threads << Thread.new do
stub = EchoStub.new(@host, **@client_opts)
stub = EchoStub.new(@host, **client_opts)
q << stub.an_rpc(req)
end
end
@ -460,7 +480,7 @@ describe GRPC::RpcServer do
one_failed_as_unavailable = false
n.times do
threads << Thread.new do
stub = SlowStub.new(@host, **@client_opts)
stub = SlowStub.new(@host, **client_opts)
begin
stub.an_rpc(req)
rescue GRPC::BadStatus => e
@ -473,5 +493,97 @@ describe GRPC::RpcServer do
expect(one_failed_as_unavailable).to be(true)
end
end
context 'with connect metadata' do
let(:test_md_proc) do
proc do |mth, md|
res = md.clone
res['method'] = mth
res['connect_k1'] = 'connect_v1'
res
end
end
before(:each) do
server_opts = {
server_override: @server,
completion_queue_override: @server_queue,
poll_period: 1,
connect_md_proc: test_md_proc
}
@srv = RpcServer.new(**server_opts)
end
it 'should send connect metadata to the client', server: true do
service = EchoService.new
@srv.handle(service)
t = Thread.new { @srv.run }
@srv.wait_till_running
req = EchoMsg.new
stub = EchoStub.new(@host, **client_opts)
op = stub.an_rpc(req, k1: 'v1', k2: 'v2', return_op: true)
expect(op.metadata).to be nil
expect(op.execute).to be_a(EchoMsg)
wanted_md = {
'k1' => 'v1',
'k2' => 'v2',
'method' => '/EchoService/an_rpc',
'connect_k1' => 'connect_v1'
}
expect(op.metadata).to eq(wanted_md)
@srv.stop
t.join
end
end
context 'with trailing metadata' do
before(:each) do
server_opts = {
server_override: @server,
completion_queue_override: @server_queue,
poll_period: 1
}
@srv = RpcServer.new(**server_opts)
end
it 'should be added to BadStatus when requests fail', server: true do
service = FailingService.new
@srv.handle(service)
t = Thread.new { @srv.run }
@srv.wait_till_running
req = EchoMsg.new
stub = FailingStub.new(@host, **client_opts)
blk = proc { stub.an_rpc(req) }
# confirm it raise the expected error
expect(&blk).to raise_error GRPC::BadStatus
# call again and confirm exception contained the trailing metadata.
begin
blk.call
rescue GRPC::BadStatus => e
expect(e.code).to eq(service.code)
expect(e.details).to eq(service.details)
expect(e.metadata).to eq(service.md)
end
@srv.stop
t.join
end
it 'should be received by the client', server: true do
wanted_trailers = { 'k1' => 'out_v1', 'k2' => 'out_v2' }
service = EchoService.new(k1: 'out_v1', k2: 'out_v2')
@srv.handle(service)
t = Thread.new { @srv.run }
@srv.wait_till_running
req = EchoMsg.new
stub = EchoStub.new(@host, **client_opts)
op = stub.an_rpc(req, k1: 'v1', k2: 'v2', return_op: true)
expect(op.metadata).to be nil
expect(op.execute).to be_a(EchoMsg)
expect(op.metadata).to eq(wanted_trailers)
@srv.stop
t.join
end
end
end
end

@ -35,14 +35,18 @@ $LOAD_PATH.unshift(spec_dir)
$LOAD_PATH.unshift(lib_dir)
$LOAD_PATH.uniq!
require 'faraday'
# set up coverage
require 'simplecov'
SimpleCov.start do
add_filter 'spec'
add_filter 'bin'
SimpleCov.command_name ENV['COVERAGE_NAME']
end if ENV['COVERAGE_NAME']
require 'rspec'
require 'logging'
require 'rspec/logging_helper'
# Allow Faraday to support test stubs
Faraday::Adapter.load_middleware(:test)
# Configure RSpec to capture log messages for each test. The output from the
# logs will be stored in the @log_output variable. It is a StringIO instance.
RSpec.configure do |config|

@ -1,5 +1,7 @@
# GRPC Bazel BUILD file.
# This currently builds C and C++ code.
# This file has been automatically generated from a template file.
# Please look at the templates directory instead.
# Copyright 2015, Google Inc.
# All rights reserved.

@ -1,5 +1,7 @@
# GRPC global makefile
# This currently builds C and C++ code.
# This file has been automatically generated from a template file.
# Please look at the templates directory instead.
# Copyright 2015, Google Inc.
# All rights reserved.

@ -29,13 +29,14 @@
<%!
import re
%>\
<%namespace file="packages.include" import="get_openssl,get_zlib"/>\
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
<%
allowed_dependencies = set(['gpr', 'grpc', 'gpr_test_util', 'grpc_test_util'])
buildable_targets = [ target for target in targets
if set(target.deps).issubset(allowed_dependencies) and
all([src.endswith('.c') for src in target.src]) and
'windows' in target.platforms ]
all([src.endswith('.c') for src in target.src]) and
'windows' in target.platforms ]
c_test_targets = [ target for target in buildable_targets if target.build == 'test' and not target.language == 'c++' ]
cxx_test_targets = [ target for target in buildable_targets if target.build == 'test' and target.language == 'c++' ]
%>\
@ -47,21 +48,24 @@ OUT_DIR=test_bin
CC=cl.exe
LINK=link.exe
INCLUDES=/I..\.. /I..\..\include /I..\..\third_party\zlib /I..\third_party /I..\..\third_party\openssl\inc32
REPO_ROOT=..
OPENSSL_INCLUDES = .\packages\${get_openssl()}\build\native\include\v120\Win32\Debug\static
ZLIB_INCLUDES = .\packages\${get_zlib()}\build\native\include
INCLUDES=/I$(REPO_ROOT) /I$(REPO_ROOT)\include /I$(OPENSSL_INCLUDES) /I$(ZLIB_INCLUDES)
DEFINES=/D WIN32 /D _LIB /D _USE_32BIT_TIME_T /D _UNICODE /D UNICODE /D _CRT_SECURE_NO_WARNINGS
CFLAGS=/c $(INCLUDES) /nologo /Z7 /W3 /WX- /sdl $(DEFINES) /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Gd /TC /analyze-
LFLAGS=/DEBUG /INCREMENTAL /NOLOGO /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86
OPENSSL_LIBS=..\..\third_party\openssl\out32\ssleay32.lib ..\..\third_party\openssl\out32\libeay32.lib
OPENSSL_LIBS=.\packages\${get_openssl()}\build\native\lib\v120\Win32\Debug\static\ssleay32.lib .\packages\${get_openssl()}\build\native\lib\v120\Win32\Debug\static\libeay32.lib
WINSOCK_LIBS=ws2_32.lib
ZLIB_LIBS=Debug\zlibwapi.lib
ZLIB_LIBS=.\packages\${get_zlib()}\build\native\lib\v120\Win32\Debug\static\cdecl\zlib.lib
LIBS=$(OPENSSL_LIBS) $(WINSOCK_LIBS) $(ZLIB_LIBS)
gpr_test_util:
MSBuild.exe gpr_test_util.vcxproj /p:Configuration=Debug
build_gpr_test_util:
msbuild grpc.sln /t:gpr_test_util /p:Configuration=Debug
grpc_test_util:
MSBuild.exe grpc_test_util.vcxproj /p:Configuration=Debug
build_grpc_test_util:
msbuild grpc.sln /t:grpc_test_util /p:Configuration=Debug
$(OUT_DIR):
mkdir $(OUT_DIR)
@ -83,11 +87,11 @@ ${target.name}.exe \
echo All tests built.
% for target in buildable_targets:
${target.name}.exe: grpc_test_util $(OUT_DIR)
${target.name}.exe: build_grpc_test_util $(OUT_DIR)
echo Building ${target.name}
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ \
%for source in target.src:
..\..\${to_windows_path(source)} \
$(REPO_ROOT)\${to_windows_path(source)} \
%endfor
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\${target.name}.exe" \

@ -0,0 +1,2 @@
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('gpr', libs, targets)}

@ -0,0 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
${gen_project('gpr', libs, targets)}

@ -0,0 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
${gen_project('gpr_test_util', libs, targets)}

@ -0,0 +1,2 @@
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('grpc++', libs, targets)}

@ -0,0 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc++', libs, targets)}

@ -0,0 +1,42 @@
## Template for Visual Studio solution
## based on http://msdn.microsoft.com/en-us/library/bb165951(v=vs.90).aspx
## NOTE: tabs in this file are needed by Visual Studio to correctly interpret
## the file.
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
<%
## Visual Studio uses GUIDs for project types
## http://msdn.microsoft.com/en-us/library/hb23x61k%28v=vs.80%29.aspx
cpp_proj_type = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"
%>\
% for project in vsprojects:
Project("${cpp_proj_type}") = "${project.name}", "${project.name}\${project.name}.vcxproj", "${project.vs_project_guid}"
% if project.get('deps', None):
ProjectSection(ProjectDependencies) = postProject
% for dep in project.get('deps', []):
${vsproject_dict[dep].vs_project_guid} = ${vsproject_dict[dep].vs_project_guid}
% endfor
EndProjectSection
% endif
EndProject
% endfor
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
% for project in vsprojects:
${project.vs_project_guid}.Debug|Win32.ActiveCfg = Debug|Win32
${project.vs_project_guid}.Debug|Win32.Build.0 = Debug|Win32
${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32
${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32
% endfor
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

@ -0,0 +1,2 @@
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('grpc', libs, targets)}

@ -0,0 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc', libs, targets, packages=['openssl','zlib'])}

@ -0,0 +1,2 @@
<%namespace file="../packages.include" import="gen_packages_config"/>\
${gen_packages_config(['openssl','zlib'])}

@ -0,0 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc_csharp_ext', libs, targets, configuration_type = 'DynamicLibrary', additional_props = ['winsock'], packages=['openssl','zlib'])}

@ -0,0 +1,2 @@
<%namespace file="../packages.include" import="gen_packages_config"/>\
${gen_packages_config(['openssl','zlib'])}

@ -0,0 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc_test_util', libs, targets)}

@ -0,0 +1,2 @@
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('grpc_unsecure', libs, targets)}

@ -0,0 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc_unsecure', libs, targets, packages=['zlib'])}

@ -0,0 +1,2 @@
<%namespace file="../packages.include" import="gen_packages_config"/>\
${gen_packages_config(['zlib'])}

@ -0,0 +1,54 @@
<%!
openssl_pkg_name = "grpc.dependencies.openssl"
openssl_pkg_version = "1.0.2.2"
zlib_pkg_name = "grpc.dependencies.zlib"
zlib_pkg_version = "1.2.8.9"
%>\
<%def name="get_openssl()">${openssl_pkg_name}.${openssl_pkg_version}</%def>\
<%def name="get_zlib()">${zlib_pkg_name}.${zlib_pkg_version}</%def>\
<%def name="gen_packages_config(packages)">\
<?xml version="1.0" encoding="utf-8"?>
<packages>
% if 'openssl' in packages:
<package id="${openssl_pkg_name}" version="${openssl_pkg_version}" targetFramework="Native" />
<package id="${openssl_pkg_name}.redist" version="${openssl_pkg_version}" targetFramework="Native" />
% endif
% if 'zlib' in packages:
<package id="${zlib_pkg_name}" version="${zlib_pkg_version}" targetFramework="Native" />
<package id="${zlib_pkg_name}.redist" version="${zlib_pkg_version}" targetFramework="Native" />
% endif
</packages>
</%def>\
<%def name="gen_package_props(packages)">\
% if 'openssl' in packages:
<Import Project="..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props" Condition="Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props')" />
% endif
</%def>\
<%def name="gen_package_targets(packages)">\
% if 'zlib' in packages:
<Import Project="..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets" Condition="Exists('..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets')" />
<Import Project="..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets" Condition="Exists('..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets')" />
%endif
% if 'openssl' in packages:
<Import Project="..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets" Condition="Exists('..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets')" />
<Import Project="..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets" Condition="Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets')" />
% endif
</%def>\
<%def name="gen_package_ensure(packages)">\
% if packages:
<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>
% if 'zlib' in packages:
<Error Condition="!Exists('..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${zlib_pkg_name}.redist.${zlib_pkg_version}\build\native\${zlib_pkg_name}.redist.targets'))" />
<Error Condition="!Exists('..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${zlib_pkg_name}.${zlib_pkg_version}\build\native\${zlib_pkg_name}.targets'))" />
%endif
% if 'openssl' in packages:
<Error Condition="!Exists('..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${openssl_pkg_name}.redist.${openssl_pkg_version}\build\native\${openssl_pkg_name}.redist.targets'))" />
<Error Condition="!Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.props'))" />
<Error Condition="!Exists('..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\${openssl_pkg_name}.${openssl_pkg_version}\build\native\${openssl_pkg_name}.targets'))" />
%endif
</Target>
%endif
</%def>\

@ -5,6 +5,7 @@
def calc_to_filter(path):
return '\\'.join(path.split('/')[:-1])
%>\
<%def name="get_repo_root()">..\..</%def>\
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
<%def name="to_filter(path)">${calc_to_filter(path)}</%def>\
<%def name="filter_to_guid(proj, filter)">${re.sub('(........)(....)(....)(....)', r'\1-\2-\3-\4-', hashlib.md5(''.join([filter, proj])).hexdigest())}</%def>\
@ -16,7 +17,7 @@
% if project.get('src',[]):
<ItemGroup>
% for src_name in project.src:
<ClCompile Include="..\..\${to_windows_path(src_name)}">
<ClCompile Include="${get_repo_root()}\${to_windows_path(src_name)}">
<Filter>${to_filter(src_name)}</Filter>
</ClCompile>
% endfor
@ -25,7 +26,7 @@
% if project.get('public_headers',[]):
<ItemGroup>
% for public_header in project.public_headers:
<ClInclude Include="..\..\${to_windows_path(public_header)}">
<ClInclude Include="${get_repo_root()}\${to_windows_path(public_header)}">
<Filter>${to_filter(public_header)}</Filter>
</ClInclude>
% endfor
@ -34,7 +35,7 @@
% if project.get('headers',[]):
<ItemGroup>
% for header in project.headers:
<ClInclude Include="..\..\${to_windows_path(header)}">
<ClInclude Include="${get_repo_root()}\${to_windows_path(header)}">
<Filter>${to_filter(header)}</Filter>
</ClInclude>
% endfor

@ -1,10 +1,13 @@
<%namespace file="packages.include" import="gen_package_props,gen_package_targets,gen_package_ensure"/>\
<%def name="get_repo_root()">..\..</%def>\
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
<%def name="get_subsystem(is_library)">${'Windows' if is_library else 'Console'}</%def>\
<%def name="gen_project(name, libs, targets, configuration_type = 'StaticLibrary', project_guid = None, additional_props = [], depends_on_zlib = False)">\
<%def name="gen_project(name, libs, targets, configuration_type = 'StaticLibrary', project_guid = None, additional_props = [], packages = [])">\
% for project in vsprojects:
% if project.name == name:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
${gen_package_props(packages)}\
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -19,36 +22,41 @@
<ProjectGuid>${project_guid if project_guid else project.vs_project_guid}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration">
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>${configuration_type}</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>${configuration_type}</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="global.props" />
<Import Project="..\global.props" />
% for prop in additional_props:
<Import Project="${prop}.props" />
<Import Project="..\${prop}.props" />
% endfor
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="global.props" />
<Import Project="..\global.props" />
% for prop in additional_props:
<Import Project="${prop}.props" />
<Import Project="..\${prop}." />
% endfor
</ImportGroup>
<PropertyGroup Label="UserMacros" />
@ -91,21 +99,21 @@
% if project.get('public_headers',[]):
<ItemGroup>
% for public_header in project.public_headers:
<ClInclude Include="..\..\${to_windows_path(public_header)}" />
<ClInclude Include="${get_repo_root()}\${to_windows_path(public_header)}" />
% endfor
</ItemGroup>
% endif
% if project.get('headers',[]):
<ItemGroup>
% for header in project.headers:
<ClInclude Include="..\..\${to_windows_path(header)}" />
<ClInclude Include="${get_repo_root()}\${to_windows_path(header)}" />
% endfor
</ItemGroup>
% endif
% if project.get('src',[]):
<ItemGroup>
% for src_name in project.src:
<ClCompile Include="..\..\${to_windows_path(src_name)}">
<ClCompile Include="${get_repo_root()}\${to_windows_path(src_name)}">
</ClCompile>
% endfor
</ItemGroup>
@ -113,20 +121,22 @@
% if project.get('deps',[]):
<ItemGroup>
% for dep in project.deps:
<ProjectReference Include="${dep}.vcxproj">
<ProjectReference Include="..\${dep}\${dep}.vcxproj">
<Project>${vsproject_dict[dep].vs_project_guid}</Project>
</ProjectReference>
% endfor
% if depends_on_zlib:
<ProjectReference Include="third_party\zlibvc.vcxproj">
<Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
</ProjectReference>
% endif
</ItemGroup>
% endif
%if packages:
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
%endif
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
${gen_package_targets(packages)}\
</ImportGroup>
${gen_package_ensure(packages)}\
</Project>
% endif
% endfor

@ -1,107 +0,0 @@
# 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.
<%!
import re
%>\
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
<%
allowed_dependencies = set(['gpr', 'grpc', 'gpr_test_util', 'grpc_test_util'])
buildable_targets = [ target for target in targets if set(target.deps).issubset(allowed_dependencies) and all([src.endswith('.c') for src in target.src])]
test_targets = [ target for target in buildable_targets if target.name.endswith('_test') ]
%>\
# NMake file to build secondary gRPC targets on Windows.
# Use grpc.sln to solution to build the gRPC libraries.
OUT_DIR=test_bin
CC=cl.exe
LINK=link.exe
INCLUDES=/I..\.. /I..\..\include /I..\..\third_party\zlib /I..\third_party /I..\..\third_party\openssl\inc32
DEFINES=/D WIN32 /D _LIB /D _USE_32BIT_TIME_T /D _UNICODE /D UNICODE /D _CRT_SECURE_NO_WARNINGS
CFLAGS=/c $(INCLUDES) /nologo /Z7 /W3 /WX- /sdl $(DEFINES) /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Gd /TC /analyze-
LFLAGS=/DEBUG /INCREMENTAL /NOLOGO /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86
OPENSSL_LIBS=..\..\third_party\openssl\out32\ssleay32.lib ..\..\third_party\openssl\out32\libeay32.lib
WINSOCK_LIBS=ws2_32.lib
ZLIB_LIBS=Debug\zlibwapi.lib
LIBS=$(OPENSSL_LIBS) $(WINSOCK_LIBS) $(ZLIB_LIBS)
gpr_test_util:
MSBuild.exe gpr_test_util.vcxproj /p:Configuration=Debug
grpc_test_util:
MSBuild.exe grpc_test_util.vcxproj /p:Configuration=Debug
$(OUT_DIR):
mkdir $(OUT_DIR)
buildtests: \
% for target in test_targets:
${target.name}.exe \
% endfor
echo All tests built.
test: \
% for target in test_targets:
${target.name} \
% endfor
echo All tests ran.
test_gpr: \
% for target in [ tgt for tgt in test_targets if tgt.name.startswith('gpr_')]:
${target.name} \
% endfor
echo All tests ran.
% for target in buildable_targets:
${target.name}.exe: grpc_test_util
echo Building ${target.name}
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ \
%for source in target.src:
..\..\${to_windows_path(source)} \
%endfor
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\${target.name}.exe" \
%for dep in target.deps:
Debug\${dep}.lib \
%endfor
$(LIBS) \
%for source in target.src:
$(OUT_DIR)\${re.search('([^/]+)\.c$', source).group(1)}.obj \
%endfor
${target.name}: ${target.name}.exe
echo Running ${target.name}
$(OUT_DIR)\${target.name}.exe
% endfor

@ -1,2 +0,0 @@
<%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('gpr', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('gpr', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('gpr_test_util', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('grpc++', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc++', libs, targets)}

@ -1,59 +0,0 @@
## Template for Visual Studio solution
## based on http://msdn.microsoft.com/en-us/library/bb165951(v=vs.90).aspx
## NOTE: tabs in this file are needed by Visual Studio to correctly interpret
## the file.
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
<%
## Visual Studio uses GUIDs for project types
## http://msdn.microsoft.com/en-us/library/hb23x61k%28v=vs.80%29.aspx
cpp_proj_type = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"
%>\
% for project in vsprojects:
Project("${cpp_proj_type}") = "${project.name}", "${project.name}.vcxproj", "${project.vs_project_guid}"
% if project.get('deps', None):
ProjectSection(ProjectDependencies) = postProject
% for dep in project.get('deps', []):
${vsproject_dict[dep].vs_project_guid} = ${vsproject_dict[dep].vs_project_guid}
% endfor
EndProjectSection
% endif
EndProject
% endfor
Project("${cpp_proj_type}") = "grpc_csharp_ext_shared", "grpc_csharp_ext_shared.vcxproj", "{C26D04A8-37C6-44C7-B458-906C9FCE928C}"
EndProject
Project("${cpp_proj_type}") = "zlibvc", "third_party\zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
% for project in vsprojects:
${project.vs_project_guid}.Debug|Win32.ActiveCfg = Debug|Win32
${project.vs_project_guid}.Debug|Win32.Build.0 = Debug|Win32
${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32
${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32
% endfor
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Debug|Win32.ActiveCfg = Debug|Win32
{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Debug|Win32.Build.0 = Debug|Win32
{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Release|Win32.ActiveCfg = Release|Win32
{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Release|Win32.Build.0 = Release|Win32
{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Debug|Win32.ActiveCfg = Debug|Win32
{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Debug|Win32.Build.0 = Debug|Win32
{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Release|Win32.ActiveCfg = Release|Win32
{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Release|Win32.Build.0 = Release|Win32
{C26D04A8-37C6-44C7-B458-906C9FCE928C}.Debug|Win32.ActiveCfg = Debug|Win32
{C26D04A8-37C6-44C7-B458-906C9FCE928C}.Debug|Win32.Build.0 = Debug|Win32
{C26D04A8-37C6-44C7-B458-906C9FCE928C}.Release|Win32.ActiveCfg = Release|Win32
{C26D04A8-37C6-44C7-B458-906C9FCE928C}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

@ -1,2 +0,0 @@
<%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('grpc', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc_csharp_ext', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc_csharp_ext', libs, targets, configuration_type = 'DynamicLibrary', project_guid = '{C26D04A8-37C6-44C7-B458-906C9FCE928C}', additional_props = ['winsock', 'ssl'])}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc_test_util', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('grpc_unsecure', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc_unsecure', libs, targets)}

@ -1,64 +0,0 @@
<%!
import re
import hashlib
def calc_to_filter(path):
return '\\'.join(path.split('/')[:-1])
%>\
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
<%def name="to_filter(path)">${calc_to_filter(path)}</%def>\
<%def name="filter_to_guid(proj, filter)">${re.sub('(........)(....)(....)(....)', r'\1-\2-\3-\4-', hashlib.md5(''.join([filter, proj])).hexdigest())}</%def>\
<%def name="gen_filters(name, libs, targets)">\
% for project in vsprojects:
% if project.name == name:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
% if project.get('src',[]):
<ItemGroup>
% for src_name in project.src:
<ClCompile Include="..\..\${to_windows_path(src_name)}">
<Filter>${to_filter(src_name)}</Filter>
</ClCompile>
% endfor
</ItemGroup>
% endif
% if project.get('public_headers',[]):
<ItemGroup>
% for public_header in project.public_headers:
<ClInclude Include="..\..\${to_windows_path(public_header)}">
<Filter>${to_filter(public_header)}</Filter>
</ClInclude>
% endfor
</ItemGroup>
% endif
% if project.get('headers',[]):
<ItemGroup>
% for header in project.headers:
<ClInclude Include="..\..\${to_windows_path(header)}">
<Filter>${to_filter(header)}</Filter>
</ClInclude>
% endfor
</ItemGroup>
% endif
<%
filters = set()
files = project.get('src', []) + project.get('public_headers', []) + project.get('headers', [])
for file in files:
filter = calc_to_filter(file)
paths = filter.split('\\')
for i in range(len(paths)):
filters.add('\\'.join(paths[:i + 1]))
filters = sorted(filters)
%>
<ItemGroup>
% for filter in filters:
<Filter Include="${filter}">
<UniqueIdentifier>{${filter_to_guid(project.name, filter)}}</UniqueIdentifier>
</Filter>
% endfor
</ItemGroup>
</Project>
% endif
% endfor
</%def>\

@ -1,131 +0,0 @@
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
<%def name="get_subsystem(is_library)">${'Windows' if is_library else 'Console'}</%def>\
<%def name="gen_project(name, libs, targets, configuration_type = 'StaticLibrary', project_guid = None, additional_props = [], depends_on_zlib = False)">\
% for project in vsprojects:
% if project.name == name:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>${project_guid if project_guid else project.vs_project_guid}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>${configuration_type}</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>${configuration_type}</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="global.props" />
% for prop in additional_props:
<Import Project="${prop}.props" />
% endfor
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="global.props" />
% for prop in additional_props:
<Import Project="${prop}.props" />
% endfor
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetName>${name}</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>${name}</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>${get_subsystem(project.is_library)}</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<SubSystem>${get_subsystem(project.is_library)}</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
% if project.get('public_headers',[]):
<ItemGroup>
% for public_header in project.public_headers:
<ClInclude Include="..\..\${to_windows_path(public_header)}" />
% endfor
</ItemGroup>
% endif
% if project.get('headers',[]):
<ItemGroup>
% for header in project.headers:
<ClInclude Include="..\..\${to_windows_path(header)}" />
% endfor
</ItemGroup>
% endif
% if project.get('src',[]):
<ItemGroup>
% for src_name in project.src:
<ClCompile Include="..\..\${to_windows_path(src_name)}">
</ClCompile>
% endfor
</ItemGroup>
% endif
% if project.get('deps',[]):
<ItemGroup>
% for dep in project.deps:
<ProjectReference Include="${dep}.vcxproj">
<Project>${vsproject_dict[dep].vs_project_guid}</Project>
</ProjectReference>
% endfor
% if depends_on_zlib:
<ProjectReference Include="third_party\zlibvc.vcxproj">
<Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
</ProjectReference>
% endif
</ItemGroup>
% endif
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
% endif
% endfor
</%def>\

@ -1,2 +0,0 @@
<%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('gpr', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('gpr', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('gpr_test_util', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('grpc++', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc++', libs, targets)}

@ -1,67 +0,0 @@
## Template for Visual Studio solution
## based on http://msdn.microsoft.com/en-us/library/bb165951(v=vs.90).aspx
## NOTE: tabs in this file are needed by Visual Studio to correctly interpret
## the file.
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
<%
## Visual Studio uses GUIDs for project types
## http://msdn.microsoft.com/en-us/library/hb23x61k%28v=vs.80%29.aspx
cpp_proj_type = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"
%>\
% for project in vsprojects:
Project("${cpp_proj_type}") = "${project.name}", "${project.name}.vcxproj", "${project.vs_project_guid}"
% if project.get('deps', None):
ProjectSection(ProjectDependencies) = postProject
% for dep in project.get('deps', []):
${vsproject_dict[dep].vs_project_guid} = ${vsproject_dict[dep].vs_project_guid}
% endfor
EndProjectSection
% endif
EndProject
% endfor
Project("${cpp_proj_type}") = "grpc_csharp_ext_shared", "grpc_csharp_ext_shared.vcxproj", "{C26D04A8-37C6-44C7-B458-906C9FCE928C}"
EndProject
Project("${cpp_proj_type}") = "zlibvc", "third_party\zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "third_party", "third_party", "{DD51818F-0BCA-4035-9E5B-F28A9F87DED4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
% for project in vsprojects:
${project.vs_project_guid}.Debug|Win32.ActiveCfg = Debug|Win32
${project.vs_project_guid}.Debug|Win32.Build.0 = Debug|Win32
${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32
${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32
% endfor
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Debug|Win32.ActiveCfg = Debug|Win32
{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Debug|Win32.Build.0 = Debug|Win32
{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Release|Win32.ActiveCfg = Release|Win32
{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Release|Win32.Build.0 = Release|Win32
{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Debug|Win32.ActiveCfg = Debug|Win32
{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Debug|Win32.Build.0 = Debug|Win32
{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Release|Win32.ActiveCfg = Release|Win32
{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Release|Win32.Build.0 = Release|Win32
{C26D04A8-37C6-44C7-B458-906C9FCE928C}.Debug|Win32.ActiveCfg = Debug|Win32
{C26D04A8-37C6-44C7-B458-906C9FCE928C}.Debug|Win32.Build.0 = Debug|Win32
{C26D04A8-37C6-44C7-B458-906C9FCE928C}.Release|Win32.ActiveCfg = Release|Win32
{C26D04A8-37C6-44C7-B458-906C9FCE928C}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {DD51818F-0BCA-4035-9E5B-F28A9F87DED4}
EndGlobalSection
EndGlobal

@ -1,2 +0,0 @@
<%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('grpc', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc_csharp_ext', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc_csharp_ext', libs, targets, configuration_type = 'DynamicLibrary', project_guid = '{C26D04A8-37C6-44C7-B458-906C9FCE928C}', additional_props = ['winsock', 'ssl'])}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc_test_util', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\
${gen_filters('grpc_unsecure', libs, targets)}

@ -1,2 +0,0 @@
<%namespace file="vcxproj_defs.include" import="gen_project"/>\
${gen_project('grpc_unsecure', libs, targets)}

@ -34,15 +34,17 @@
import simplejson
END2END_FIXTURES = [
'chttp2_fake_security',
'chttp2_fullstack',
'chttp2_fullstack_uds',
'chttp2_simple_ssl_fullstack',
'chttp2_simple_ssl_with_oauth2_fullstack',
'chttp2_socket_pair',
'chttp2_socket_pair_one_byte_at_a_time',
]
# maps fixture name to whether it requires the security library
END2END_FIXTURES = {
'chttp2_fake_security': True,
'chttp2_fullstack': False,
'chttp2_fullstack_uds': False,
'chttp2_simple_ssl_fullstack': True,
'chttp2_simple_ssl_with_oauth2_fullstack': True,
'chttp2_socket_pair': False,
'chttp2_socket_pair_one_byte_at_a_time': False,
}
END2END_TESTS = [
@ -111,7 +113,7 @@ def main():
'secure': 'check',
'src': ['test/core/end2end/fixtures/%s.c' % f]
}
for f in END2END_FIXTURES] + [
for f in sorted(END2END_FIXTURES.keys())] + [
{
'name': 'end2end_test_%s' % t,
'build': 'private',
@ -120,7 +122,7 @@ def main():
'src': ['test/core/end2end/tests/%s.c' % t],
'headers': ['test/core/end2end/tests/cancel_test_helpers.h']
}
for t in END2END_TESTS] + [
for t in sorted(END2END_TESTS)] + [
{
'name': 'end2end_certs',
'build': 'private',
@ -149,8 +151,24 @@ def main():
'gpr'
]
}
for f in END2END_FIXTURES
for t in END2END_TESTS]}
for f in sorted(END2END_FIXTURES.keys())
for t in sorted(END2END_TESTS)] + [
{
'name': '%s_%s_unsecure_test' % (f, t),
'build': 'test',
'language': 'c',
'src': [],
'deps': [
'end2end_fixture_%s' % f,
'end2end_test_%s' % t,
'grpc_test_util',
'grpc_unsecure',
'gpr_test_util',
'gpr'
]
}
for f in sorted(END2END_FIXTURES.keys()) if not END2END_FIXTURES[f]
for t in sorted(END2END_TESTS)]}
print simplejson.dumps(json, sort_keys=True, indent=2 * ' ')

@ -57,12 +57,14 @@ for dir in . ; do
find -L $dir/templates -type f -and -name *.template | while read file ; do
out=${dir}/${file#$dir/templates/} # strip templates dir prefix
out=${out%.*} # strip template extension
echo "generating file: $out"
json_files="build.json $end2end_test_build"
data=`for i in $json_files ; do echo $i ; done | awk ' { printf "-d %s ", $0 } '`
if [ "x$TEST" = "xtrue" ] ; then
actual_out=$out
out=`mktemp /tmp/gentXXXXXX`
fi
mkdir -p `dirname $out` # make sure dest directory exist
$mako_renderer $plugins $data -o $out $file
if [ "x$TEST" = "xtrue" ] ; then
diff -q $out $actual_out

@ -144,7 +144,7 @@ def which(filename):
class JobSpec(object):
"""Specifies what to run for a job."""
def __init__(self, cmdline, shortname=None, environ=None, hash_targets=None, cwd=None):
def __init__(self, cmdline, shortname=None, environ=None, hash_targets=None, cwd=None, shell=False):
"""
Arguments:
cmdline: a list of arguments to pass as the command line
@ -161,6 +161,7 @@ class JobSpec(object):
self.shortname = cmdline[0] if shortname is None else shortname
self.hash_targets = hash_targets or []
self.cwd = cwd
self.shell = shell
def identity(self):
return '%r %r %r' % (self.cmdline, self.environ, self.hash_targets)
@ -187,6 +188,7 @@ class Job(object):
stderr=subprocess.STDOUT,
stdout=self._tempfile,
cwd=spec.cwd,
shell=spec.shell,
env=env)
self._state = _RUNNING
self._newline_on_success = newline_on_success

@ -346,8 +346,8 @@ if len(build_configs) > 1:
if platform.system() == 'Windows':
def make_jobspec(cfg, targets):
return jobset.JobSpec(['nmake', '/f', 'Grpc.mak', 'CONFIG=%s' % cfg] + targets,
cwd='vsprojects\\vs2013')
return jobset.JobSpec(['make.bat', 'CONFIG=%s' % cfg] + targets,
cwd='vsprojects', shell=True)
else:
def make_jobspec(cfg, targets):
return jobset.JobSpec(['make',

File diff suppressed because it is too large Load Diff

@ -6,3 +6,4 @@ test_bin
grpc.opensdf
grpc.sdf
third_party/*.user
/packages

@ -34,21 +34,24 @@ OUT_DIR=test_bin
CC=cl.exe
LINK=link.exe
INCLUDES=/I..\.. /I..\..\include /I..\..\third_party\zlib /I..\third_party /I..\..\third_party\openssl\inc32
REPO_ROOT=..
OPENSSL_INCLUDES = .\packages\grpc.dependencies.openssl.1.0.2.2\build\native\include\v120\Win32\Debug\static
ZLIB_INCLUDES = .\packages\grpc.dependencies.zlib.1.2.8.9\build\native\include
INCLUDES=/I$(REPO_ROOT) /I$(REPO_ROOT)\include /I$(OPENSSL_INCLUDES) /I$(ZLIB_INCLUDES)
DEFINES=/D WIN32 /D _LIB /D _USE_32BIT_TIME_T /D _UNICODE /D UNICODE /D _CRT_SECURE_NO_WARNINGS
CFLAGS=/c $(INCLUDES) /nologo /Z7 /W3 /WX- /sdl $(DEFINES) /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Gd /TC /analyze-
LFLAGS=/DEBUG /INCREMENTAL /NOLOGO /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86
OPENSSL_LIBS=..\..\third_party\openssl\out32\ssleay32.lib ..\..\third_party\openssl\out32\libeay32.lib
OPENSSL_LIBS=.\packages\grpc.dependencies.openssl.1.0.2.2\build\native\lib\v120\Win32\Debug\static\ssleay32.lib .\packages\grpc.dependencies.openssl.1.0.2.2\build\native\lib\v120\Win32\Debug\static\libeay32.lib
WINSOCK_LIBS=ws2_32.lib
ZLIB_LIBS=Debug\zlibwapi.lib
ZLIB_LIBS=.\packages\grpc.dependencies.zlib.1.2.8.9\build\native\lib\v120\Win32\Debug\static\cdecl\zlib.lib
LIBS=$(OPENSSL_LIBS) $(WINSOCK_LIBS) $(ZLIB_LIBS)
gpr_test_util:
MSBuild.exe gpr_test_util.vcxproj /p:Configuration=Debug
build_gpr_test_util:
msbuild grpc.sln /t:gpr_test_util /p:Configuration=Debug
grpc_test_util:
MSBuild.exe grpc_test_util.vcxproj /p:Configuration=Debug
build_grpc_test_util:
msbuild grpc.sln /t:grpc_test_util /p:Configuration=Debug
$(OUT_DIR):
mkdir $(OUT_DIR)
@ -61,641 +64,641 @@ buildtests_c: alarm_heap_test.exe alarm_list_test.exe alarm_test.exe alpn_test.e
buildtests_cxx:
echo All tests built.
alarm_heap_test.exe: grpc_test_util $(OUT_DIR)
alarm_heap_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building alarm_heap_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\alarm_heap_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\iomgr\alarm_heap_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\alarm_heap_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\alarm_heap_test.obj
alarm_heap_test: alarm_heap_test.exe
echo Running alarm_heap_test
$(OUT_DIR)\alarm_heap_test.exe
alarm_list_test.exe: grpc_test_util $(OUT_DIR)
alarm_list_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building alarm_list_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\alarm_list_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\iomgr\alarm_list_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\alarm_list_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\alarm_list_test.obj
alarm_list_test: alarm_list_test.exe
echo Running alarm_list_test
$(OUT_DIR)\alarm_list_test.exe
alarm_test.exe: grpc_test_util $(OUT_DIR)
alarm_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building alarm_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\alarm_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\iomgr\alarm_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\alarm_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\alarm_test.obj
alarm_test: alarm_test.exe
echo Running alarm_test
$(OUT_DIR)\alarm_test.exe
alpn_test.exe: grpc_test_util $(OUT_DIR)
alpn_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building alpn_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\alpn_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\transport\chttp2\alpn_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\alpn_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\alpn_test.obj
alpn_test: alpn_test.exe
echo Running alpn_test
$(OUT_DIR)\alpn_test.exe
bin_encoder_test.exe: grpc_test_util $(OUT_DIR)
bin_encoder_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building bin_encoder_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\bin_encoder_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\transport\chttp2\bin_encoder_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\bin_encoder_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\bin_encoder_test.obj
bin_encoder_test: bin_encoder_test.exe
echo Running bin_encoder_test
$(OUT_DIR)\bin_encoder_test.exe
census_hash_table_test.exe: grpc_test_util $(OUT_DIR)
census_hash_table_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building census_hash_table_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\hash_table_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\statistics\hash_table_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_hash_table_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\hash_table_test.obj
census_hash_table_test: census_hash_table_test.exe
echo Running census_hash_table_test
$(OUT_DIR)\census_hash_table_test.exe
census_statistics_multiple_writers_circular_buffer_test.exe: grpc_test_util $(OUT_DIR)
census_statistics_multiple_writers_circular_buffer_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building census_statistics_multiple_writers_circular_buffer_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\multiple_writers_circular_buffer_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\statistics\multiple_writers_circular_buffer_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_statistics_multiple_writers_circular_buffer_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\multiple_writers_circular_buffer_test.obj
census_statistics_multiple_writers_circular_buffer_test: census_statistics_multiple_writers_circular_buffer_test.exe
echo Running census_statistics_multiple_writers_circular_buffer_test
$(OUT_DIR)\census_statistics_multiple_writers_circular_buffer_test.exe
census_statistics_multiple_writers_test.exe: grpc_test_util $(OUT_DIR)
census_statistics_multiple_writers_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building census_statistics_multiple_writers_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\multiple_writers_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\statistics\multiple_writers_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_statistics_multiple_writers_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\multiple_writers_test.obj
census_statistics_multiple_writers_test: census_statistics_multiple_writers_test.exe
echo Running census_statistics_multiple_writers_test
$(OUT_DIR)\census_statistics_multiple_writers_test.exe
census_statistics_performance_test.exe: grpc_test_util $(OUT_DIR)
census_statistics_performance_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building census_statistics_performance_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\performance_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\statistics\performance_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_statistics_performance_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\performance_test.obj
census_statistics_performance_test: census_statistics_performance_test.exe
echo Running census_statistics_performance_test
$(OUT_DIR)\census_statistics_performance_test.exe
census_statistics_quick_test.exe: grpc_test_util $(OUT_DIR)
census_statistics_quick_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building census_statistics_quick_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\quick_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\statistics\quick_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_statistics_quick_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\quick_test.obj
census_statistics_quick_test: census_statistics_quick_test.exe
echo Running census_statistics_quick_test
$(OUT_DIR)\census_statistics_quick_test.exe
census_statistics_small_log_test.exe: grpc_test_util $(OUT_DIR)
census_statistics_small_log_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building census_statistics_small_log_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\small_log_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\statistics\small_log_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_statistics_small_log_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\small_log_test.obj
census_statistics_small_log_test: census_statistics_small_log_test.exe
echo Running census_statistics_small_log_test
$(OUT_DIR)\census_statistics_small_log_test.exe
census_stats_store_test.exe: grpc_test_util $(OUT_DIR)
census_stats_store_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building census_stats_store_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\rpc_stats_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\statistics\rpc_stats_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_stats_store_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\rpc_stats_test.obj
census_stats_store_test: census_stats_store_test.exe
echo Running census_stats_store_test
$(OUT_DIR)\census_stats_store_test.exe
census_stub_test.exe: grpc_test_util $(OUT_DIR)
census_stub_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building census_stub_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\census_stub_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\statistics\census_stub_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_stub_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\census_stub_test.obj
census_stub_test: census_stub_test.exe
echo Running census_stub_test
$(OUT_DIR)\census_stub_test.exe
census_trace_store_test.exe: grpc_test_util $(OUT_DIR)
census_trace_store_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building census_trace_store_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\trace_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\statistics\trace_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_trace_store_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\trace_test.obj
census_trace_store_test: census_trace_store_test.exe
echo Running census_trace_store_test
$(OUT_DIR)\census_trace_store_test.exe
census_window_stats_test.exe: grpc_test_util $(OUT_DIR)
census_window_stats_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building census_window_stats_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\window_stats_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\statistics\window_stats_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_window_stats_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\window_stats_test.obj
census_window_stats_test: census_window_stats_test.exe
echo Running census_window_stats_test
$(OUT_DIR)\census_window_stats_test.exe
chttp2_status_conversion_test.exe: grpc_test_util $(OUT_DIR)
chttp2_status_conversion_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building chttp2_status_conversion_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\status_conversion_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\transport\chttp2\status_conversion_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_status_conversion_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\status_conversion_test.obj
chttp2_status_conversion_test: chttp2_status_conversion_test.exe
echo Running chttp2_status_conversion_test
$(OUT_DIR)\chttp2_status_conversion_test.exe
chttp2_stream_encoder_test.exe: grpc_test_util $(OUT_DIR)
chttp2_stream_encoder_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building chttp2_stream_encoder_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\stream_encoder_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\transport\chttp2\stream_encoder_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_stream_encoder_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\stream_encoder_test.obj
chttp2_stream_encoder_test: chttp2_stream_encoder_test.exe
echo Running chttp2_stream_encoder_test
$(OUT_DIR)\chttp2_stream_encoder_test.exe
chttp2_stream_map_test.exe: grpc_test_util $(OUT_DIR)
chttp2_stream_map_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building chttp2_stream_map_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\stream_map_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\transport\chttp2\stream_map_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_stream_map_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\stream_map_test.obj
chttp2_stream_map_test: chttp2_stream_map_test.exe
echo Running chttp2_stream_map_test
$(OUT_DIR)\chttp2_stream_map_test.exe
echo_client.exe: grpc_test_util $(OUT_DIR)
echo_client.exe: build_grpc_test_util $(OUT_DIR)
echo Building echo_client
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\echo\client.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\echo\client.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\echo_client.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\client.obj
echo_client: echo_client.exe
echo Running echo_client
$(OUT_DIR)\echo_client.exe
echo_server.exe: grpc_test_util $(OUT_DIR)
echo_server.exe: build_grpc_test_util $(OUT_DIR)
echo Building echo_server
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\echo\server.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\echo\server.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\echo_server.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\server.obj
echo_server: echo_server.exe
echo Running echo_server
$(OUT_DIR)\echo_server.exe
echo_test.exe: grpc_test_util $(OUT_DIR)
echo_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building echo_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\echo\echo_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\echo\echo_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\echo_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\echo_test.obj
echo_test: echo_test.exe
echo Running echo_test
$(OUT_DIR)\echo_test.exe
fd_posix_test.exe: grpc_test_util $(OUT_DIR)
fd_posix_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building fd_posix_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\fd_posix_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\iomgr\fd_posix_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\fd_posix_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\fd_posix_test.obj
fd_posix_test: fd_posix_test.exe
echo Running fd_posix_test
$(OUT_DIR)\fd_posix_test.exe
fling_client.exe: grpc_test_util $(OUT_DIR)
fling_client.exe: build_grpc_test_util $(OUT_DIR)
echo Building fling_client
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\fling\client.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\fling\client.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\fling_client.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\client.obj
fling_client: fling_client.exe
echo Running fling_client
$(OUT_DIR)\fling_client.exe
fling_server.exe: grpc_test_util $(OUT_DIR)
fling_server.exe: build_grpc_test_util $(OUT_DIR)
echo Building fling_server
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\fling\server.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\fling\server.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\fling_server.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\server.obj
fling_server: fling_server.exe
echo Running fling_server
$(OUT_DIR)\fling_server.exe
fling_stream_test.exe: grpc_test_util $(OUT_DIR)
fling_stream_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building fling_stream_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\fling\fling_stream_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\fling\fling_stream_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\fling_stream_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\fling_stream_test.obj
fling_stream_test: fling_stream_test.exe
echo Running fling_stream_test
$(OUT_DIR)\fling_stream_test.exe
fling_test.exe: grpc_test_util $(OUT_DIR)
fling_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building fling_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\fling\fling_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\fling\fling_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\fling_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\fling_test.obj
fling_test: fling_test.exe
echo Running fling_test
$(OUT_DIR)\fling_test.exe
gen_hpack_tables.exe: grpc_test_util $(OUT_DIR)
gen_hpack_tables.exe: build_grpc_test_util $(OUT_DIR)
echo Building gen_hpack_tables
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\src\core\transport\chttp2\gen_hpack_tables.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\src\core\transport\chttp2\gen_hpack_tables.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gen_hpack_tables.exe" Debug\grpc_test_util.lib Debug\gpr.lib Debug\grpc.lib $(LIBS) $(OUT_DIR)\gen_hpack_tables.obj
gen_hpack_tables: gen_hpack_tables.exe
echo Running gen_hpack_tables
$(OUT_DIR)\gen_hpack_tables.exe
gpr_cancellable_test.exe: grpc_test_util $(OUT_DIR)
gpr_cancellable_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_cancellable_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\cancellable_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\cancellable_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_cancellable_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\cancellable_test.obj
gpr_cancellable_test: gpr_cancellable_test.exe
echo Running gpr_cancellable_test
$(OUT_DIR)\gpr_cancellable_test.exe
gpr_cmdline_test.exe: grpc_test_util $(OUT_DIR)
gpr_cmdline_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_cmdline_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\cmdline_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\cmdline_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_cmdline_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\cmdline_test.obj
gpr_cmdline_test: gpr_cmdline_test.exe
echo Running gpr_cmdline_test
$(OUT_DIR)\gpr_cmdline_test.exe
gpr_env_test.exe: grpc_test_util $(OUT_DIR)
gpr_env_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_env_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\env_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\env_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_env_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\env_test.obj
gpr_env_test: gpr_env_test.exe
echo Running gpr_env_test
$(OUT_DIR)\gpr_env_test.exe
gpr_file_test.exe: grpc_test_util $(OUT_DIR)
gpr_file_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_file_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\file_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\file_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_file_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\file_test.obj
gpr_file_test: gpr_file_test.exe
echo Running gpr_file_test
$(OUT_DIR)\gpr_file_test.exe
gpr_histogram_test.exe: grpc_test_util $(OUT_DIR)
gpr_histogram_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_histogram_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\histogram_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\histogram_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_histogram_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\histogram_test.obj
gpr_histogram_test: gpr_histogram_test.exe
echo Running gpr_histogram_test
$(OUT_DIR)\gpr_histogram_test.exe
gpr_host_port_test.exe: grpc_test_util $(OUT_DIR)
gpr_host_port_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_host_port_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\host_port_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\host_port_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_host_port_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\host_port_test.obj
gpr_host_port_test: gpr_host_port_test.exe
echo Running gpr_host_port_test
$(OUT_DIR)\gpr_host_port_test.exe
gpr_log_test.exe: grpc_test_util $(OUT_DIR)
gpr_log_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_log_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\log_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\log_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_log_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\log_test.obj
gpr_log_test: gpr_log_test.exe
echo Running gpr_log_test
$(OUT_DIR)\gpr_log_test.exe
gpr_slice_buffer_test.exe: grpc_test_util $(OUT_DIR)
gpr_slice_buffer_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_slice_buffer_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\slice_buffer_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\slice_buffer_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_slice_buffer_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\slice_buffer_test.obj
gpr_slice_buffer_test: gpr_slice_buffer_test.exe
echo Running gpr_slice_buffer_test
$(OUT_DIR)\gpr_slice_buffer_test.exe
gpr_slice_test.exe: grpc_test_util $(OUT_DIR)
gpr_slice_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_slice_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\slice_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\slice_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_slice_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\slice_test.obj
gpr_slice_test: gpr_slice_test.exe
echo Running gpr_slice_test
$(OUT_DIR)\gpr_slice_test.exe
gpr_string_test.exe: grpc_test_util $(OUT_DIR)
gpr_string_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_string_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\string_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\string_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_string_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\string_test.obj
gpr_string_test: gpr_string_test.exe
echo Running gpr_string_test
$(OUT_DIR)\gpr_string_test.exe
gpr_sync_test.exe: grpc_test_util $(OUT_DIR)
gpr_sync_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_sync_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\sync_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\sync_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_sync_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\sync_test.obj
gpr_sync_test: gpr_sync_test.exe
echo Running gpr_sync_test
$(OUT_DIR)\gpr_sync_test.exe
gpr_thd_test.exe: grpc_test_util $(OUT_DIR)
gpr_thd_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_thd_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\thd_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\thd_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_thd_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\thd_test.obj
gpr_thd_test: gpr_thd_test.exe
echo Running gpr_thd_test
$(OUT_DIR)\gpr_thd_test.exe
gpr_time_test.exe: grpc_test_util $(OUT_DIR)
gpr_time_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_time_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\time_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\time_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_time_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\time_test.obj
gpr_time_test: gpr_time_test.exe
echo Running gpr_time_test
$(OUT_DIR)\gpr_time_test.exe
gpr_tls_test.exe: grpc_test_util $(OUT_DIR)
gpr_tls_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_tls_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\tls_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\tls_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_tls_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\tls_test.obj
gpr_tls_test: gpr_tls_test.exe
echo Running gpr_tls_test
$(OUT_DIR)\gpr_tls_test.exe
gpr_useful_test.exe: grpc_test_util $(OUT_DIR)
gpr_useful_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building gpr_useful_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\useful_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\useful_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_useful_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\useful_test.obj
gpr_useful_test: gpr_useful_test.exe
echo Running gpr_useful_test
$(OUT_DIR)\gpr_useful_test.exe
grpc_base64_test.exe: grpc_test_util $(OUT_DIR)
grpc_base64_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building grpc_base64_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\base64_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\security\base64_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_base64_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\base64_test.obj
grpc_base64_test: grpc_base64_test.exe
echo Running grpc_base64_test
$(OUT_DIR)\grpc_base64_test.exe
grpc_byte_buffer_reader_test.exe: grpc_test_util $(OUT_DIR)
grpc_byte_buffer_reader_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building grpc_byte_buffer_reader_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\surface\byte_buffer_reader_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\surface\byte_buffer_reader_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_byte_buffer_reader_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\byte_buffer_reader_test.obj
grpc_byte_buffer_reader_test: grpc_byte_buffer_reader_test.exe
echo Running grpc_byte_buffer_reader_test
$(OUT_DIR)\grpc_byte_buffer_reader_test.exe
grpc_channel_stack_test.exe: grpc_test_util $(OUT_DIR)
grpc_channel_stack_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building grpc_channel_stack_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\channel\channel_stack_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\channel\channel_stack_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_channel_stack_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\channel_stack_test.obj
grpc_channel_stack_test: grpc_channel_stack_test.exe
echo Running grpc_channel_stack_test
$(OUT_DIR)\grpc_channel_stack_test.exe
grpc_completion_queue_benchmark.exe: grpc_test_util $(OUT_DIR)
grpc_completion_queue_benchmark.exe: build_grpc_test_util $(OUT_DIR)
echo Building grpc_completion_queue_benchmark
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\surface\completion_queue_benchmark.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\surface\completion_queue_benchmark.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_completion_queue_benchmark.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\completion_queue_benchmark.obj
grpc_completion_queue_benchmark: grpc_completion_queue_benchmark.exe
echo Running grpc_completion_queue_benchmark
$(OUT_DIR)\grpc_completion_queue_benchmark.exe
grpc_completion_queue_test.exe: grpc_test_util $(OUT_DIR)
grpc_completion_queue_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building grpc_completion_queue_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\surface\completion_queue_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\surface\completion_queue_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_completion_queue_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\completion_queue_test.obj
grpc_completion_queue_test: grpc_completion_queue_test.exe
echo Running grpc_completion_queue_test
$(OUT_DIR)\grpc_completion_queue_test.exe
grpc_create_jwt.exe: grpc_test_util $(OUT_DIR)
grpc_create_jwt.exe: build_grpc_test_util $(OUT_DIR)
echo Building grpc_create_jwt
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\create_jwt.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\security\create_jwt.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_create_jwt.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\create_jwt.obj
grpc_create_jwt: grpc_create_jwt.exe
echo Running grpc_create_jwt
$(OUT_DIR)\grpc_create_jwt.exe
grpc_credentials_test.exe: grpc_test_util $(OUT_DIR)
grpc_credentials_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building grpc_credentials_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\credentials_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\security\credentials_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_credentials_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\credentials_test.obj
grpc_credentials_test: grpc_credentials_test.exe
echo Running grpc_credentials_test
$(OUT_DIR)\grpc_credentials_test.exe
grpc_fetch_oauth2.exe: grpc_test_util $(OUT_DIR)
grpc_fetch_oauth2.exe: build_grpc_test_util $(OUT_DIR)
echo Building grpc_fetch_oauth2
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\fetch_oauth2.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\security\fetch_oauth2.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_fetch_oauth2.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\fetch_oauth2.obj
grpc_fetch_oauth2: grpc_fetch_oauth2.exe
echo Running grpc_fetch_oauth2
$(OUT_DIR)\grpc_fetch_oauth2.exe
grpc_json_token_test.exe: grpc_test_util $(OUT_DIR)
grpc_json_token_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building grpc_json_token_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\json_token_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\security\json_token_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_json_token_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\json_token_test.obj
grpc_json_token_test: grpc_json_token_test.exe
echo Running grpc_json_token_test
$(OUT_DIR)\grpc_json_token_test.exe
grpc_print_google_default_creds_token.exe: grpc_test_util $(OUT_DIR)
grpc_print_google_default_creds_token.exe: build_grpc_test_util $(OUT_DIR)
echo Building grpc_print_google_default_creds_token
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\print_google_default_creds_token.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\security\print_google_default_creds_token.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_print_google_default_creds_token.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\print_google_default_creds_token.obj
grpc_print_google_default_creds_token: grpc_print_google_default_creds_token.exe
echo Running grpc_print_google_default_creds_token
$(OUT_DIR)\grpc_print_google_default_creds_token.exe
grpc_stream_op_test.exe: grpc_test_util $(OUT_DIR)
grpc_stream_op_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building grpc_stream_op_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\stream_op_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\transport\stream_op_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_stream_op_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\stream_op_test.obj
grpc_stream_op_test: grpc_stream_op_test.exe
echo Running grpc_stream_op_test
$(OUT_DIR)\grpc_stream_op_test.exe
hpack_parser_test.exe: grpc_test_util $(OUT_DIR)
hpack_parser_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building hpack_parser_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\hpack_parser_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\transport\chttp2\hpack_parser_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\hpack_parser_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\hpack_parser_test.obj
hpack_parser_test: hpack_parser_test.exe
echo Running hpack_parser_test
$(OUT_DIR)\hpack_parser_test.exe
hpack_table_test.exe: grpc_test_util $(OUT_DIR)
hpack_table_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building hpack_table_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\hpack_table_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\transport\chttp2\hpack_table_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\hpack_table_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\hpack_table_test.obj
hpack_table_test: hpack_table_test.exe
echo Running hpack_table_test
$(OUT_DIR)\hpack_table_test.exe
httpcli_format_request_test.exe: grpc_test_util $(OUT_DIR)
httpcli_format_request_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building httpcli_format_request_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\httpcli\format_request_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\httpcli\format_request_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\httpcli_format_request_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\format_request_test.obj
httpcli_format_request_test: httpcli_format_request_test.exe
echo Running httpcli_format_request_test
$(OUT_DIR)\httpcli_format_request_test.exe
httpcli_parser_test.exe: grpc_test_util $(OUT_DIR)
httpcli_parser_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building httpcli_parser_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\httpcli\parser_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\httpcli\parser_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\httpcli_parser_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\parser_test.obj
httpcli_parser_test: httpcli_parser_test.exe
echo Running httpcli_parser_test
$(OUT_DIR)\httpcli_parser_test.exe
httpcli_test.exe: grpc_test_util $(OUT_DIR)
httpcli_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building httpcli_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\httpcli\httpcli_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\httpcli\httpcli_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\httpcli_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\httpcli_test.obj
httpcli_test: httpcli_test.exe
echo Running httpcli_test
$(OUT_DIR)\httpcli_test.exe
json_rewrite.exe: grpc_test_util $(OUT_DIR)
json_rewrite.exe: build_grpc_test_util $(OUT_DIR)
echo Building json_rewrite
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\json\json_rewrite.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\json\json_rewrite.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\json_rewrite.exe" Debug\grpc.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\json_rewrite.obj
json_rewrite: json_rewrite.exe
echo Running json_rewrite
$(OUT_DIR)\json_rewrite.exe
json_rewrite_test.exe: grpc_test_util $(OUT_DIR)
json_rewrite_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building json_rewrite_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\json\json_rewrite_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\json\json_rewrite_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\json_rewrite_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\json_rewrite_test.obj
json_rewrite_test: json_rewrite_test.exe
echo Running json_rewrite_test
$(OUT_DIR)\json_rewrite_test.exe
json_test.exe: grpc_test_util $(OUT_DIR)
json_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building json_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\json\json_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\json\json_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\json_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\json_test.obj
json_test: json_test.exe
echo Running json_test
$(OUT_DIR)\json_test.exe
lame_client_test.exe: grpc_test_util $(OUT_DIR)
lame_client_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building lame_client_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\surface\lame_client_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\surface\lame_client_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\lame_client_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\lame_client_test.obj
lame_client_test: lame_client_test.exe
echo Running lame_client_test
$(OUT_DIR)\lame_client_test.exe
low_level_ping_pong_benchmark.exe: grpc_test_util $(OUT_DIR)
low_level_ping_pong_benchmark.exe: build_grpc_test_util $(OUT_DIR)
echo Building low_level_ping_pong_benchmark
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\network_benchmarks\low_level_ping_pong.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\network_benchmarks\low_level_ping_pong.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\low_level_ping_pong_benchmark.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\low_level_ping_pong.obj
low_level_ping_pong_benchmark: low_level_ping_pong_benchmark.exe
echo Running low_level_ping_pong_benchmark
$(OUT_DIR)\low_level_ping_pong_benchmark.exe
message_compress_test.exe: grpc_test_util $(OUT_DIR)
message_compress_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building message_compress_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\compression\message_compress_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\compression\message_compress_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\message_compress_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\message_compress_test.obj
message_compress_test: message_compress_test.exe
echo Running message_compress_test
$(OUT_DIR)\message_compress_test.exe
multi_init_test.exe: grpc_test_util $(OUT_DIR)
multi_init_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building multi_init_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\surface\multi_init_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\surface\multi_init_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\multi_init_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\multi_init_test.obj
multi_init_test: multi_init_test.exe
echo Running multi_init_test
$(OUT_DIR)\multi_init_test.exe
murmur_hash_test.exe: grpc_test_util $(OUT_DIR)
murmur_hash_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building murmur_hash_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\murmur_hash_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\murmur_hash_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\murmur_hash_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\murmur_hash_test.obj
murmur_hash_test: murmur_hash_test.exe
echo Running murmur_hash_test
$(OUT_DIR)\murmur_hash_test.exe
no_server_test.exe: grpc_test_util $(OUT_DIR)
no_server_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building no_server_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\end2end\no_server_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\end2end\no_server_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\no_server_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\no_server_test.obj
no_server_test: no_server_test.exe
echo Running no_server_test
$(OUT_DIR)\no_server_test.exe
poll_kick_posix_test.exe: grpc_test_util $(OUT_DIR)
poll_kick_posix_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building poll_kick_posix_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\poll_kick_posix_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\iomgr\poll_kick_posix_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\poll_kick_posix_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\poll_kick_posix_test.obj
poll_kick_posix_test: poll_kick_posix_test.exe
echo Running poll_kick_posix_test
$(OUT_DIR)\poll_kick_posix_test.exe
resolve_address_test.exe: grpc_test_util $(OUT_DIR)
resolve_address_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building resolve_address_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\resolve_address_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\iomgr\resolve_address_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\resolve_address_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\resolve_address_test.obj
resolve_address_test: resolve_address_test.exe
echo Running resolve_address_test
$(OUT_DIR)\resolve_address_test.exe
secure_endpoint_test.exe: grpc_test_util $(OUT_DIR)
secure_endpoint_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building secure_endpoint_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\secure_endpoint_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\security\secure_endpoint_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\secure_endpoint_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\secure_endpoint_test.obj
secure_endpoint_test: secure_endpoint_test.exe
echo Running secure_endpoint_test
$(OUT_DIR)\secure_endpoint_test.exe
sockaddr_utils_test.exe: grpc_test_util $(OUT_DIR)
sockaddr_utils_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building sockaddr_utils_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\sockaddr_utils_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\iomgr\sockaddr_utils_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\sockaddr_utils_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\sockaddr_utils_test.obj
sockaddr_utils_test: sockaddr_utils_test.exe
echo Running sockaddr_utils_test
$(OUT_DIR)\sockaddr_utils_test.exe
tcp_client_posix_test.exe: grpc_test_util $(OUT_DIR)
tcp_client_posix_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building tcp_client_posix_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\tcp_client_posix_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\iomgr\tcp_client_posix_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\tcp_client_posix_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\tcp_client_posix_test.obj
tcp_client_posix_test: tcp_client_posix_test.exe
echo Running tcp_client_posix_test
$(OUT_DIR)\tcp_client_posix_test.exe
tcp_posix_test.exe: grpc_test_util $(OUT_DIR)
tcp_posix_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building tcp_posix_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\tcp_posix_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\iomgr\tcp_posix_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\tcp_posix_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\tcp_posix_test.obj
tcp_posix_test: tcp_posix_test.exe
echo Running tcp_posix_test
$(OUT_DIR)\tcp_posix_test.exe
tcp_server_posix_test.exe: grpc_test_util $(OUT_DIR)
tcp_server_posix_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building tcp_server_posix_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\tcp_server_posix_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\iomgr\tcp_server_posix_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\tcp_server_posix_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\tcp_server_posix_test.obj
tcp_server_posix_test: tcp_server_posix_test.exe
echo Running tcp_server_posix_test
$(OUT_DIR)\tcp_server_posix_test.exe
time_averaged_stats_test.exe: grpc_test_util $(OUT_DIR)
time_averaged_stats_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building time_averaged_stats_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\time_averaged_stats_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\iomgr\time_averaged_stats_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\time_averaged_stats_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\time_averaged_stats_test.obj
time_averaged_stats_test: time_averaged_stats_test.exe
echo Running time_averaged_stats_test
$(OUT_DIR)\time_averaged_stats_test.exe
time_test.exe: grpc_test_util $(OUT_DIR)
time_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building time_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\time_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\support\time_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\time_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\time_test.obj
time_test: time_test.exe
echo Running time_test
$(OUT_DIR)\time_test.exe
timeout_encoding_test.exe: grpc_test_util $(OUT_DIR)
timeout_encoding_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building timeout_encoding_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\timeout_encoding_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\transport\chttp2\timeout_encoding_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\timeout_encoding_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\timeout_encoding_test.obj
timeout_encoding_test: timeout_encoding_test.exe
echo Running timeout_encoding_test
$(OUT_DIR)\timeout_encoding_test.exe
timers_test.exe: grpc_test_util $(OUT_DIR)
timers_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building timers_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\profiling\timers_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\profiling\timers_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\timers_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\timers_test.obj
timers_test: timers_test.exe
echo Running timers_test
$(OUT_DIR)\timers_test.exe
transport_metadata_test.exe: grpc_test_util $(OUT_DIR)
transport_metadata_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building transport_metadata_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\metadata_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\transport\metadata_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\transport_metadata_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\metadata_test.obj
transport_metadata_test: transport_metadata_test.exe
echo Running transport_metadata_test
$(OUT_DIR)\transport_metadata_test.exe
transport_security_test.exe: grpc_test_util $(OUT_DIR)
transport_security_test.exe: build_grpc_test_util $(OUT_DIR)
echo Building transport_security_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\tsi\transport_security_test.c
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\test\core\tsi\transport_security_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\transport_security_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\transport_security_test.obj
transport_security_test: transport_security_test.exe
echo Running transport_security_test

@ -1 +0,0 @@
This directory contains MS Visual Studio project & solution files.

@ -0,0 +1,34 @@
This directory contains MS Visual Studio project & solution files.
#Supported Visual Studio versions
Currently supported versions are Visual Studio 2013 (our primary focus) and 2010.
#Building
We are using [NuGet](http://www.nuget.org) to pull zlib and openssl dependencies.
If you don't have Visual Studio NuGet plugin installed, you'll need to
download nuget.exe from the web and manually restore the NuGet packages.
```
> REM Run from this directory.
> REM No need to do this if you have NuGet visual studio extension.
> nuget restore
```
After that, you can build the solution using one of these options:
1. open `grpc.sln` with Visual Studio and hit "Build".
2. build from commandline using `msbuild grpc.sln /p:Configuration=Debug`
#Testing
Use `run_tests.py`, that also supports Windows (with a bit limited experience).
```
> REM Run from repository root.
> python tools\run_tests\run_tests.py -l c
```
Also, you can `make.bat` directly to build and run gRPC tests.
```
> REM Run from this directory.
> make.bat alarm_test
```

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)\..\..;$(SolutionDir)\..\..\include;$(SolutionDir)\..\..\third_party\zlib;$(SolutionDir)\..\third_party;$(SolutionDir)\..\..\third_party\openssl\inc32;$(SolutionDir)\..\..\third_party\protobuf\src</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)\..\..;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\third_party\protobuf\src</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

@ -14,31 +14,36 @@
<ProjectGuid>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration">
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="global.props" />
<Import Project="..\global.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="global.props" />
<Import Project="..\global.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save