mirror of https://github.com/grpc/grpc.git
Merge pull request #11905 from markdroth/byte_stream_shutdown
Improvements to grpc_byte_stream API and handling.pull/11947/head
commit
c44f036ee2
18 changed files with 1306 additions and 421 deletions
@ -0,0 +1,279 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2017 gRPC authors. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
* |
||||
*/ |
||||
|
||||
#include "src/core/lib/transport/byte_stream.h" |
||||
|
||||
#include <grpc/support/alloc.h> |
||||
#include <grpc/support/log.h> |
||||
#include <grpc/support/useful.h> |
||||
|
||||
#include "src/core/lib/slice/slice_internal.h" |
||||
|
||||
#include "test/core/util/test_config.h" |
||||
|
||||
//
|
||||
// grpc_slice_buffer_stream tests
|
||||
//
|
||||
|
||||
static void not_called_closure(grpc_exec_ctx *exec_ctx, void *arg, |
||||
grpc_error *error) { |
||||
GPR_ASSERT(false); |
||||
} |
||||
|
||||
static void test_slice_buffer_stream_basic(void) { |
||||
gpr_log(GPR_DEBUG, "test_slice_buffer_stream_basic"); |
||||
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
||||
// Create and populate slice buffer.
|
||||
grpc_slice_buffer buffer; |
||||
grpc_slice_buffer_init(&buffer); |
||||
grpc_slice input[] = { |
||||
grpc_slice_from_static_string("foo"), |
||||
grpc_slice_from_static_string("bar"), |
||||
}; |
||||
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { |
||||
grpc_slice_buffer_add(&buffer, input[i]); |
||||
} |
||||
// Create byte stream.
|
||||
grpc_slice_buffer_stream stream; |
||||
grpc_slice_buffer_stream_init(&stream, &buffer, 0); |
||||
GPR_ASSERT(stream.base.length == 6); |
||||
grpc_closure closure; |
||||
GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, |
||||
grpc_schedule_on_exec_ctx); |
||||
// Read each slice. Note that next() always returns synchronously.
|
||||
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { |
||||
GPR_ASSERT( |
||||
grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); |
||||
grpc_slice output; |
||||
grpc_error *error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); |
||||
GPR_ASSERT(error == GRPC_ERROR_NONE); |
||||
GPR_ASSERT(grpc_slice_eq(input[i], output)); |
||||
grpc_slice_unref_internal(&exec_ctx, output); |
||||
} |
||||
// Clean up.
|
||||
grpc_byte_stream_destroy(&exec_ctx, &stream.base); |
||||
grpc_slice_buffer_destroy_internal(&exec_ctx, &buffer); |
||||
grpc_exec_ctx_finish(&exec_ctx); |
||||
} |
||||
|
||||
static void test_slice_buffer_stream_shutdown(void) { |
||||
gpr_log(GPR_DEBUG, "test_slice_buffer_stream_shutdown"); |
||||
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
||||
// Create and populate slice buffer.
|
||||
grpc_slice_buffer buffer; |
||||
grpc_slice_buffer_init(&buffer); |
||||
grpc_slice input[] = { |
||||
grpc_slice_from_static_string("foo"), |
||||
grpc_slice_from_static_string("bar"), |
||||
}; |
||||
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { |
||||
grpc_slice_buffer_add(&buffer, input[i]); |
||||
} |
||||
// Create byte stream.
|
||||
grpc_slice_buffer_stream stream; |
||||
grpc_slice_buffer_stream_init(&stream, &buffer, 0); |
||||
GPR_ASSERT(stream.base.length == 6); |
||||
grpc_closure closure; |
||||
GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, |
||||
grpc_schedule_on_exec_ctx); |
||||
// Read the first slice.
|
||||
GPR_ASSERT( |
||||
grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); |
||||
grpc_slice output; |
||||
grpc_error *error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); |
||||
GPR_ASSERT(error == GRPC_ERROR_NONE); |
||||
GPR_ASSERT(grpc_slice_eq(input[0], output)); |
||||
grpc_slice_unref_internal(&exec_ctx, output); |
||||
// Now shutdown.
|
||||
grpc_error *shutdown_error = |
||||
GRPC_ERROR_CREATE_FROM_STATIC_STRING("shutdown error"); |
||||
grpc_byte_stream_shutdown(&exec_ctx, &stream.base, |
||||
GRPC_ERROR_REF(shutdown_error)); |
||||
// After shutdown, the next pull() should return the error.
|
||||
GPR_ASSERT( |
||||
grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); |
||||
error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); |
||||
GPR_ASSERT(error == shutdown_error); |
||||
GRPC_ERROR_UNREF(error); |
||||
GRPC_ERROR_UNREF(shutdown_error); |
||||
// Clean up.
|
||||
grpc_byte_stream_destroy(&exec_ctx, &stream.base); |
||||
grpc_slice_buffer_destroy_internal(&exec_ctx, &buffer); |
||||
grpc_exec_ctx_finish(&exec_ctx); |
||||
} |
||||
|
||||
//
|
||||
// grpc_caching_byte_stream tests
|
||||
//
|
||||
|
||||
static void test_caching_byte_stream_basic(void) { |
||||
gpr_log(GPR_DEBUG, "test_caching_byte_stream_basic"); |
||||
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
||||
// Create and populate slice buffer byte stream.
|
||||
grpc_slice_buffer buffer; |
||||
grpc_slice_buffer_init(&buffer); |
||||
grpc_slice input[] = { |
||||
grpc_slice_from_static_string("foo"), |
||||
grpc_slice_from_static_string("bar"), |
||||
}; |
||||
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { |
||||
grpc_slice_buffer_add(&buffer, input[i]); |
||||
} |
||||
grpc_slice_buffer_stream underlying_stream; |
||||
grpc_slice_buffer_stream_init(&underlying_stream, &buffer, 0); |
||||
// Create cache and caching stream.
|
||||
grpc_byte_stream_cache cache; |
||||
grpc_byte_stream_cache_init(&cache, &underlying_stream.base); |
||||
grpc_caching_byte_stream stream; |
||||
grpc_caching_byte_stream_init(&stream, &cache); |
||||
grpc_closure closure; |
||||
GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, |
||||
grpc_schedule_on_exec_ctx); |
||||
// Read each slice. Note that next() always returns synchronously,
|
||||
// because the underlying byte stream always does.
|
||||
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { |
||||
GPR_ASSERT( |
||||
grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); |
||||
grpc_slice output; |
||||
grpc_error *error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); |
||||
GPR_ASSERT(error == GRPC_ERROR_NONE); |
||||
GPR_ASSERT(grpc_slice_eq(input[i], output)); |
||||
grpc_slice_unref_internal(&exec_ctx, output); |
||||
} |
||||
// Clean up.
|
||||
grpc_byte_stream_destroy(&exec_ctx, &stream.base); |
||||
grpc_byte_stream_cache_destroy(&exec_ctx, &cache); |
||||
grpc_slice_buffer_destroy_internal(&exec_ctx, &buffer); |
||||
grpc_exec_ctx_finish(&exec_ctx); |
||||
} |
||||
|
||||
static void test_caching_byte_stream_reset(void) { |
||||
gpr_log(GPR_DEBUG, "test_caching_byte_stream_reset"); |
||||
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
||||
// Create and populate slice buffer byte stream.
|
||||
grpc_slice_buffer buffer; |
||||
grpc_slice_buffer_init(&buffer); |
||||
grpc_slice input[] = { |
||||
grpc_slice_from_static_string("foo"), |
||||
grpc_slice_from_static_string("bar"), |
||||
}; |
||||
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { |
||||
grpc_slice_buffer_add(&buffer, input[i]); |
||||
} |
||||
grpc_slice_buffer_stream underlying_stream; |
||||
grpc_slice_buffer_stream_init(&underlying_stream, &buffer, 0); |
||||
// Create cache and caching stream.
|
||||
grpc_byte_stream_cache cache; |
||||
grpc_byte_stream_cache_init(&cache, &underlying_stream.base); |
||||
grpc_caching_byte_stream stream; |
||||
grpc_caching_byte_stream_init(&stream, &cache); |
||||
grpc_closure closure; |
||||
GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, |
||||
grpc_schedule_on_exec_ctx); |
||||
// Read one slice.
|
||||
GPR_ASSERT( |
||||
grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); |
||||
grpc_slice output; |
||||
grpc_error *error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); |
||||
GPR_ASSERT(error == GRPC_ERROR_NONE); |
||||
GPR_ASSERT(grpc_slice_eq(input[0], output)); |
||||
grpc_slice_unref_internal(&exec_ctx, output); |
||||
// Reset the caching stream. The reads should start over from the
|
||||
// first slice.
|
||||
grpc_caching_byte_stream_reset(&stream); |
||||
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { |
||||
GPR_ASSERT( |
||||
grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); |
||||
error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); |
||||
GPR_ASSERT(error == GRPC_ERROR_NONE); |
||||
GPR_ASSERT(grpc_slice_eq(input[i], output)); |
||||
grpc_slice_unref_internal(&exec_ctx, output); |
||||
} |
||||
// Clean up.
|
||||
grpc_byte_stream_destroy(&exec_ctx, &stream.base); |
||||
grpc_byte_stream_cache_destroy(&exec_ctx, &cache); |
||||
grpc_slice_buffer_destroy_internal(&exec_ctx, &buffer); |
||||
grpc_exec_ctx_finish(&exec_ctx); |
||||
} |
||||
|
||||
static void test_caching_byte_stream_shared_cache(void) { |
||||
gpr_log(GPR_DEBUG, "test_caching_byte_stream_shared_cache"); |
||||
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
||||
// Create and populate slice buffer byte stream.
|
||||
grpc_slice_buffer buffer; |
||||
grpc_slice_buffer_init(&buffer); |
||||
grpc_slice input[] = { |
||||
grpc_slice_from_static_string("foo"), |
||||
grpc_slice_from_static_string("bar"), |
||||
}; |
||||
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { |
||||
grpc_slice_buffer_add(&buffer, input[i]); |
||||
} |
||||
grpc_slice_buffer_stream underlying_stream; |
||||
grpc_slice_buffer_stream_init(&underlying_stream, &buffer, 0); |
||||
// Create cache and two caching streams.
|
||||
grpc_byte_stream_cache cache; |
||||
grpc_byte_stream_cache_init(&cache, &underlying_stream.base); |
||||
grpc_caching_byte_stream stream1; |
||||
grpc_caching_byte_stream_init(&stream1, &cache); |
||||
grpc_caching_byte_stream stream2; |
||||
grpc_caching_byte_stream_init(&stream2, &cache); |
||||
grpc_closure closure; |
||||
GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, |
||||
grpc_schedule_on_exec_ctx); |
||||
// Read one slice from stream1.
|
||||
GPR_ASSERT( |
||||
grpc_byte_stream_next(&exec_ctx, &stream1.base, ~(size_t)0, &closure)); |
||||
grpc_slice output; |
||||
grpc_error *error = grpc_byte_stream_pull(&exec_ctx, &stream1.base, &output); |
||||
GPR_ASSERT(error == GRPC_ERROR_NONE); |
||||
GPR_ASSERT(grpc_slice_eq(input[0], output)); |
||||
grpc_slice_unref_internal(&exec_ctx, output); |
||||
// Read all slices from stream2.
|
||||
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { |
||||
GPR_ASSERT( |
||||
grpc_byte_stream_next(&exec_ctx, &stream2.base, ~(size_t)0, &closure)); |
||||
error = grpc_byte_stream_pull(&exec_ctx, &stream2.base, &output); |
||||
GPR_ASSERT(error == GRPC_ERROR_NONE); |
||||
GPR_ASSERT(grpc_slice_eq(input[i], output)); |
||||
grpc_slice_unref_internal(&exec_ctx, output); |
||||
} |
||||
// Now read the second slice from stream1.
|
||||
GPR_ASSERT( |
||||
grpc_byte_stream_next(&exec_ctx, &stream1.base, ~(size_t)0, &closure)); |
||||
error = grpc_byte_stream_pull(&exec_ctx, &stream1.base, &output); |
||||
GPR_ASSERT(error == GRPC_ERROR_NONE); |
||||
GPR_ASSERT(grpc_slice_eq(input[1], output)); |
||||
grpc_slice_unref_internal(&exec_ctx, output); |
||||
// Clean up.
|
||||
grpc_byte_stream_destroy(&exec_ctx, &stream1.base); |
||||
grpc_byte_stream_destroy(&exec_ctx, &stream2.base); |
||||
grpc_byte_stream_cache_destroy(&exec_ctx, &cache); |
||||
grpc_slice_buffer_destroy_internal(&exec_ctx, &buffer); |
||||
grpc_exec_ctx_finish(&exec_ctx); |
||||
} |
||||
|
||||
int main(int argc, char **argv) { |
||||
grpc_test_init(argc, argv); |
||||
test_slice_buffer_stream_basic(); |
||||
test_slice_buffer_stream_shutdown(); |
||||
test_caching_byte_stream_basic(); |
||||
test_caching_byte_stream_reset(); |
||||
test_caching_byte_stream_shared_cache(); |
||||
return 0; |
||||
} |
@ -0,0 +1,199 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" /> |
||||
<ItemGroup Label="ProjectConfigurations"> |
||||
<ProjectConfiguration Include="Debug|Win32"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Debug|x64"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|Win32"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|x64"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
</ItemGroup> |
||||
<PropertyGroup Label="Globals"> |
||||
<ProjectGuid>{9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}</ProjectGuid> |
||||
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected> |
||||
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir> |
||||
</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="'$(VisualStudioVersion)' == '14.0'" Label="Configuration"> |
||||
<PlatformToolset>v140</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>true</UseDebugLibraries> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>false</UseDebugLibraries> |
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||
<ImportGroup Label="ExtensionSettings"> |
||||
</ImportGroup> |
||||
<ImportGroup Label="PropertySheets"> |
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\global.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\openssl.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" /> |
||||
</ImportGroup> |
||||
<PropertyGroup Label="UserMacros" /> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> |
||||
<TargetName>byte_stream_test</TargetName> |
||||
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib> |
||||
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl> |
||||
<Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'"> |
||||
<TargetName>byte_stream_test</TargetName> |
||||
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib> |
||||
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl> |
||||
<Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl> |
||||
</PropertyGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemGroup> |
||||
<ClCompile Include="$(SolutionDir)\..\test\core\transport\byte_stream_test.c"> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_test_util\grpc_test_util.vcxproj"> |
||||
<Project>{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}</Project> |
||||
</ProjectReference> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc\grpc.vcxproj"> |
||||
<Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project> |
||||
</ProjectReference> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr_test_util\gpr_test_util.vcxproj"> |
||||
<Project>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</Project> |
||||
</ProjectReference> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj"> |
||||
<Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project> |
||||
</ProjectReference> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<None Include="packages.config" /> |
||||
</ItemGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||
<ImportGroup Label="ExtensionTargets"> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||
</ImportGroup> |
||||
<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('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" /> |
||||
</Target> |
||||
</Project> |
||||
|
@ -0,0 +1,21 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup> |
||||
<ClCompile Include="$(SolutionDir)\..\test\core\transport\byte_stream_test.c"> |
||||
<Filter>test\core\transport</Filter> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
|
||||
<ItemGroup> |
||||
<Filter Include="test"> |
||||
<UniqueIdentifier>{f172d292-4ad6-342a-f27a-096c06d43a31}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core"> |
||||
<UniqueIdentifier>{d7f690de-dfe0-56fc-ff3b-38eec3931699}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core\transport"> |
||||
<UniqueIdentifier>{f78f56ef-47df-c99d-18f0-86277f7013f3}</UniqueIdentifier> |
||||
</Filter> |
||||
</ItemGroup> |
||||
</Project> |
||||
|
Loading…
Reference in new issue