mirror of https://github.com/grpc/grpc.git
commit
5ee157cd11
79 changed files with 2476 additions and 854 deletions
@ -1,17 +1,14 @@ |
||||
{ |
||||
"name": "grpc/grpc-demo", |
||||
"description": "gRPC example for PHP", |
||||
"minimum-stability": "dev", |
||||
"repositories": [ |
||||
{ |
||||
"type": "vcs", |
||||
"url": "https://github.com/stanley-cheung/Protobuf-PHP" |
||||
} |
||||
], |
||||
"name": "grpc/grpc-demo", |
||||
"description": "gRPC example for PHP", |
||||
"minimum-stability": "dev", |
||||
"require": { |
||||
"php": ">=5.5.0", |
||||
"datto/protobuf-php": "dev-master", |
||||
"google/auth": "dev-master", |
||||
"grpc/grpc": "dev-release-0_11" |
||||
"grpc/grpc": "dev-release-0_13" |
||||
} |
||||
} |
||||
|
@ -0,0 +1,77 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2016, 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 <Foundation/Foundation.h> |
||||
#import <SystemConfiguration/SystemConfiguration.h> |
||||
|
||||
@interface GRPCReachabilityFlags : NSObject |
||||
|
||||
+ (nonnull instancetype)flagsWithFlags:(SCNetworkReachabilityFlags)flags; |
||||
|
||||
/**
|
||||
* One accessor method to query each of the different flags. Example: |
||||
|
||||
@property(nonatomic, readonly) BOOL isCell; |
||||
|
||||
*/ |
||||
#define GRPC_XMACRO_ITEM(methodName, FlagName) \ |
||||
@property(nonatomic, readonly) BOOL methodName; |
||||
|
||||
#include "GRPCReachabilityFlagNames.xmacro.h" |
||||
#undef GRPC_XMACRO_ITEM |
||||
|
||||
@property(nonatomic, readonly) BOOL isHostReachable; |
||||
@end |
||||
|
||||
|
||||
@interface GRPCConnectivityMonitor : NSObject |
||||
|
||||
+ (nullable instancetype)monitorWithHost:(nonnull NSString *)hostName; |
||||
|
||||
- (nonnull instancetype)init NS_UNAVAILABLE; |
||||
|
||||
/**
|
||||
* Queue on which callbacks will be dispatched. Default is the main queue. Set it before calling |
||||
* handleLossWithHandler:. |
||||
*/ |
||||
// TODO(jcanizales): Default to a serial background queue instead.
|
||||
@property(nonatomic, strong, null_resettable) dispatch_queue_t queue; |
||||
|
||||
/**
|
||||
* Calls handler every time the connectivity to this instance's host is lost. If this instance is |
||||
* released before that happens, the handler won't be called. |
||||
* Only one handler is active at a time, so if this method is called again before the previous |
||||
* handler has been called, it might never be called at all (or yes, if it has already been queued). |
||||
*/ |
||||
- (void)handleLossWithHandler:(nonnull void (^)())handler; |
||||
@end |
@ -0,0 +1,192 @@ |
||||
/* |
||||
* |
||||
* Copyright 2016, 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 "GRPCConnectivityMonitor.h" |
||||
|
||||
#pragma mark Flags |
||||
|
||||
@implementation GRPCReachabilityFlags { |
||||
SCNetworkReachabilityFlags _flags; |
||||
} |
||||
|
||||
+ (instancetype)flagsWithFlags:(SCNetworkReachabilityFlags)flags { |
||||
return [[self alloc] initWithFlags:flags]; |
||||
} |
||||
|
||||
- (instancetype)initWithFlags:(SCNetworkReachabilityFlags)flags { |
||||
if ((self = [super init])) { |
||||
_flags = flags; |
||||
} |
||||
return self; |
||||
} |
||||
|
||||
/* |
||||
* One accessor method implementation per flag. Example: |
||||
|
||||
- (BOOL)isCell { \ |
||||
return !!(_flags & kSCNetworkReachabilityFlagsIsWWAN); \ |
||||
} |
||||
|
||||
*/ |
||||
#define GRPC_XMACRO_ITEM(methodName, FlagName) \ |
||||
- (BOOL)methodName { \ |
||||
return !!(_flags & kSCNetworkReachabilityFlags ## FlagName); \ |
||||
} |
||||
#include "GRPCReachabilityFlagNames.xmacro.h" |
||||
#undef GRPC_XMACRO_ITEM |
||||
|
||||
- (BOOL)isHostReachable { |
||||
// Note: connectionOnDemand means it'll be reachable only if using the CFSocketStream API or APIs |
||||
// on top of it. |
||||
// connectionRequired means we can't tell until a connection is attempted (e.g. for VPN on |
||||
// demand). |
||||
return self.reachable && !self.interventionRequired && !self.connectionOnDemand; |
||||
} |
||||
|
||||
- (NSString *)description { |
||||
NSMutableArray *activeOptions = [NSMutableArray arrayWithCapacity:9]; |
||||
|
||||
/* |
||||
* For each flag, add its name to the array if it's ON. Example: |
||||
|
||||
if (self.isCell) { |
||||
[activeOptions addObject:@"isCell"]; |
||||
} |
||||
|
||||
*/ |
||||
#define GRPC_XMACRO_ITEM(methodName, FlagName) \ |
||||
if (self.methodName) { \ |
||||
[activeOptions addObject:@#methodName]; \ |
||||
} |
||||
#include "GRPCReachabilityFlagNames.xmacro.h" |
||||
#undef GRPC_XMACRO_ITEM |
||||
|
||||
return activeOptions.count == 0 ? @"(none)" : [activeOptions componentsJoinedByString:@", "]; |
||||
} |
||||
|
||||
- (BOOL)isEqual:(id)object { |
||||
return [object isKindOfClass:[GRPCReachabilityFlags class]] && |
||||
_flags == ((GRPCReachabilityFlags *)object)->_flags; |
||||
} |
||||
|
||||
- (NSUInteger)hash { |
||||
return _flags; |
||||
} |
||||
@end |
||||
|
||||
#pragma mark Connectivity Monitor |
||||
|
||||
// Assumes the third argument is a block that accepts a GRPCReachabilityFlags object, and passes the |
||||
// received ones to it. |
||||
static void PassFlagsToContextInfoBlock(SCNetworkReachabilityRef target, |
||||
SCNetworkReachabilityFlags flags, |
||||
void *info) { |
||||
#pragma unused (target) |
||||
// This can be called many times with the same info. The info is retained by SCNetworkReachability |
||||
// while this function is being executed. |
||||
void (^handler)(GRPCReachabilityFlags *) = (__bridge void (^)(GRPCReachabilityFlags *))info; |
||||
handler([[GRPCReachabilityFlags alloc] initWithFlags:flags]); |
||||
} |
||||
|
||||
@implementation GRPCConnectivityMonitor { |
||||
SCNetworkReachabilityRef _reachabilityRef; |
||||
} |
||||
|
||||
- (nullable instancetype)initWithReachability:(nullable SCNetworkReachabilityRef)reachability { |
||||
if (!reachability) { |
||||
return nil; |
||||
} |
||||
if ((self = [super init])) { |
||||
_reachabilityRef = CFRetain(reachability); |
||||
_queue = dispatch_get_main_queue(); |
||||
} |
||||
return self; |
||||
} |
||||
|
||||
+ (nullable instancetype)monitorWithHost:(nonnull NSString *)host { |
||||
const char *hostName = host.UTF8String; |
||||
if (!hostName) { |
||||
[NSException raise:NSInvalidArgumentException |
||||
format:@"host.UTF8String returns NULL for %@", host]; |
||||
} |
||||
SCNetworkReachabilityRef reachability = |
||||
SCNetworkReachabilityCreateWithName(NULL, hostName); |
||||
|
||||
GRPCConnectivityMonitor *returnValue = [[self alloc] initWithReachability:reachability]; |
||||
if (reachability) { |
||||
CFRelease(reachability); |
||||
} |
||||
return returnValue; |
||||
} |
||||
|
||||
- (void)handleLossWithHandler:(void (^)())handler { |
||||
[self startListeningWithHandler:^(GRPCReachabilityFlags *flags) { |
||||
if (!flags.isHostReachable) { |
||||
handler(); |
||||
} |
||||
}]; |
||||
} |
||||
|
||||
- (void)startListeningWithHandler:(void (^)(GRPCReachabilityFlags *))handler { |
||||
// Copy to ensure the handler block is in the heap (and so can't be deallocated when this method |
||||
// returns). |
||||
void (^copiedHandler)(GRPCReachabilityFlags *) = [handler copy]; |
||||
SCNetworkReachabilityContext context = { |
||||
.version = 0, |
||||
.info = (__bridge void *)copiedHandler, |
||||
.retain = CFRetain, |
||||
.release = CFRelease, |
||||
}; |
||||
// The following will retain context.info, and release it when the callback is set to NULL. |
||||
SCNetworkReachabilitySetCallback(_reachabilityRef, PassFlagsToContextInfoBlock, &context); |
||||
SCNetworkReachabilitySetDispatchQueue(_reachabilityRef, _queue); |
||||
} |
||||
|
||||
- (void)stopListening { |
||||
// This releases the block on context.info. |
||||
SCNetworkReachabilitySetCallback(_reachabilityRef, NULL, NULL); |
||||
SCNetworkReachabilitySetDispatchQueue(_reachabilityRef, NULL); |
||||
} |
||||
|
||||
- (void)setQueue:(dispatch_queue_t)queue { |
||||
_queue = queue ?: dispatch_get_main_queue(); |
||||
} |
||||
|
||||
- (void)dealloc { |
||||
if (_reachabilityRef) { |
||||
[self stopListening]; |
||||
CFRelease(_reachabilityRef); |
||||
} |
||||
} |
||||
|
||||
@end |
@ -0,0 +1,65 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2016, 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. |
||||
* |
||||
*/ |
||||
|
||||
/**
|
||||
* "X-macro" file that lists the flags names of Apple's Network Reachability API, along with a nice |
||||
* Objective-C method name used to query each of them. |
||||
* |
||||
* Example usage: To generate a dictionary from flag value to name, one can do: |
||||
|
||||
NSDictionary *flagNames = @{ |
||||
#define GRPC_XMACRO_ITEM(methodName, FlagName) \ |
||||
@(kSCNetworkReachabilityFlags ## FlagName): @#methodName, |
||||
#include "GRXReachabilityFlagNames.xmacro.h" |
||||
#undef GRPC_XMACRO_ITEM |
||||
}; |
||||
|
||||
XCTAssertEqualObjects(flagNames[@(kSCNetworkReachabilityFlagsIsWWAN)], @"isCell"); |
||||
|
||||
*/ |
||||
|
||||
#ifndef GRPC_XMACRO_ITEM |
||||
#error This file is to be used with the "X-macro" pattern: Please #define \ |
||||
GRPC_XMACRO_ITEM(methodName, FlagName), then #include this file, and then #undef \
|
||||
GRPC_XMACRO_ITEM. |
||||
#endif |
||||
|
||||
GRPC_XMACRO_ITEM(isCell, IsWWAN) |
||||
GRPC_XMACRO_ITEM(reachable, Reachable) |
||||
GRPC_XMACRO_ITEM(transientConnection, TransientConnection) |
||||
GRPC_XMACRO_ITEM(connectionRequired, ConnectionRequired) |
||||
GRPC_XMACRO_ITEM(connectionOnTraffic, ConnectionOnTraffic) |
||||
GRPC_XMACRO_ITEM(interventionRequired, InterventionRequired) |
||||
GRPC_XMACRO_ITEM(connectionOnDemand, ConnectionOnDemand) |
||||
GRPC_XMACRO_ITEM(isLocalAddress, IsLocalAddress) |
||||
GRPC_XMACRO_ITEM(isDirect, IsDirect) |
@ -1,67 +0,0 @@ |
||||
gRPC PHP Extension |
||||
================== |
||||
|
||||
# Requirements |
||||
|
||||
* PHP 5.5+ |
||||
* [gRPC core library](https://github.com/grpc/grpc) 0.11.0 |
||||
|
||||
# Installation |
||||
|
||||
## Install PHP 5 |
||||
|
||||
``` |
||||
$ sudo apt-get install git php5 php5-dev php-pear unzip |
||||
``` |
||||
|
||||
## Compile gRPC Core Library |
||||
|
||||
Clone the gRPC source code repository |
||||
|
||||
``` |
||||
$ git clone https://github.com/grpc/grpc.git |
||||
``` |
||||
|
||||
Build and install the gRPC C core libraries |
||||
|
||||
```sh |
||||
$ cd grpc |
||||
$ git checkout --track origin/release-0_11 |
||||
$ git pull --recurse-submodules && git submodule update --init --recursive |
||||
$ make |
||||
$ sudo make install |
||||
``` |
||||
|
||||
Note: you may encounter a warning about the Protobuf compiler `protoc` 3.0.0+ not being installed. The following might help, and will be useful later on when we need to compile the `protoc-gen-php` tool. |
||||
|
||||
```sh |
||||
$ cd grpc/third_party/protobuf |
||||
$ sudo make install # 'make' should have been run by core grpc |
||||
``` |
||||
|
||||
## Install the gRPC PHP extension |
||||
|
||||
Quick install |
||||
|
||||
```sh |
||||
$ sudo pecl install grpc |
||||
``` |
||||
|
||||
Note: before a stable release, you may need to do |
||||
|
||||
```sh |
||||
$ sudo pecl install grpc-beta |
||||
``` |
||||
|
||||
OR |
||||
|
||||
Compile from source |
||||
|
||||
```sh |
||||
$ # from grpc |
||||
$ cd src/php/ext/grpc |
||||
$ phpize |
||||
$ ./configure |
||||
$ make |
||||
$ sudo make install |
||||
``` |
@ -1,381 +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. |
||||
|
||||
"""Test code for the Face layer of RPC Framework.""" |
||||
|
||||
import abc |
||||
import unittest |
||||
|
||||
# test_interfaces is referenced from specification in this module. |
||||
from grpc.framework.interfaces.face import face |
||||
from tests.unit.framework.common import test_constants |
||||
from tests.unit.framework.common import test_control |
||||
from tests.unit.framework.common import test_coverage |
||||
from tests.unit.framework.interfaces.face import _3069_test_constant |
||||
from tests.unit.framework.interfaces.face import _digest |
||||
from tests.unit.framework.interfaces.face import _receiver |
||||
from tests.unit.framework.interfaces.face import _stock_service |
||||
from tests.unit.framework.interfaces.face import test_interfaces # pylint: disable=unused-import |
||||
|
||||
|
||||
class TestCase(test_coverage.Coverage, unittest.TestCase): |
||||
"""A test of the Face layer of RPC Framework. |
||||
|
||||
Concrete subclasses must have an "implementation" attribute of type |
||||
test_interfaces.Implementation and an "invoker_constructor" attribute of type |
||||
_invocation.InvokerConstructor. |
||||
""" |
||||
__metaclass__ = abc.ABCMeta |
||||
|
||||
NAME = 'EventInvocationSynchronousEventServiceTest' |
||||
|
||||
def setUp(self): |
||||
"""See unittest.TestCase.setUp for full specification. |
||||
|
||||
Overriding implementations must call this implementation. |
||||
""" |
||||
self._control = test_control.PauseFailControl() |
||||
self._digest = _digest.digest( |
||||
_stock_service.STOCK_TEST_SERVICE, self._control, None) |
||||
|
||||
generic_stub, dynamic_stubs, self._memo = self.implementation.instantiate( |
||||
self._digest.methods, self._digest.event_method_implementations, None) |
||||
self._invoker = self.invoker_constructor.construct_invoker( |
||||
generic_stub, dynamic_stubs, self._digest.methods) |
||||
|
||||
def tearDown(self): |
||||
"""See unittest.TestCase.tearDown for full specification. |
||||
|
||||
Overriding implementations must call this implementation. |
||||
""" |
||||
self._invoker = None |
||||
self.implementation.destantiate(self._memo) |
||||
|
||||
def testSuccessfulUnaryRequestUnaryResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.unary_unary_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
request = test_messages.request() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
self._invoker.event(group, method)( |
||||
request, receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
receiver.block_until_terminated() |
||||
response = receiver.unary_response() |
||||
|
||||
test_messages.verify(request, response, self) |
||||
|
||||
def testSuccessfulUnaryRequestStreamResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.unary_stream_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
request = test_messages.request() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
self._invoker.event(group, method)( |
||||
request, receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
receiver.block_until_terminated() |
||||
responses = receiver.stream_responses() |
||||
|
||||
test_messages.verify(request, responses, self) |
||||
|
||||
def testSuccessfulStreamRequestUnaryResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.stream_unary_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
requests = test_messages.requests() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
call_consumer = self._invoker.event(group, method)( |
||||
receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
for request in requests: |
||||
call_consumer.consume(request) |
||||
call_consumer.terminate() |
||||
receiver.block_until_terminated() |
||||
response = receiver.unary_response() |
||||
|
||||
test_messages.verify(requests, response, self) |
||||
|
||||
def testSuccessfulStreamRequestStreamResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.stream_stream_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
requests = test_messages.requests() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
call_consumer = self._invoker.event(group, method)( |
||||
receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
for request in requests: |
||||
call_consumer.consume(request) |
||||
call_consumer.terminate() |
||||
receiver.block_until_terminated() |
||||
responses = receiver.stream_responses() |
||||
|
||||
test_messages.verify(requests, responses, self) |
||||
|
||||
def testSequentialInvocations(self): |
||||
# pylint: disable=cell-var-from-loop |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.unary_unary_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
first_request = test_messages.request() |
||||
second_request = test_messages.request() |
||||
second_receiver = _receiver.Receiver() |
||||
|
||||
def make_second_invocation(): |
||||
self._invoker.event(group, method)( |
||||
second_request, second_receiver, second_receiver.abort, |
||||
test_constants.LONG_TIMEOUT) |
||||
|
||||
class FirstReceiver(_receiver.Receiver): |
||||
|
||||
def complete(self, terminal_metadata, code, details): |
||||
super(FirstReceiver, self).complete( |
||||
terminal_metadata, code, details) |
||||
make_second_invocation() |
||||
|
||||
first_receiver = FirstReceiver() |
||||
|
||||
self._invoker.event(group, method)( |
||||
first_request, first_receiver, first_receiver.abort, |
||||
test_constants.LONG_TIMEOUT) |
||||
second_receiver.block_until_terminated() |
||||
|
||||
first_response = first_receiver.unary_response() |
||||
second_response = second_receiver.unary_response() |
||||
test_messages.verify(first_request, first_response, self) |
||||
test_messages.verify(second_request, second_response, self) |
||||
|
||||
def testParallelInvocations(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.unary_unary_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
first_request = test_messages.request() |
||||
first_receiver = _receiver.Receiver() |
||||
second_request = test_messages.request() |
||||
second_receiver = _receiver.Receiver() |
||||
|
||||
self._invoker.event(group, method)( |
||||
first_request, first_receiver, first_receiver.abort, |
||||
test_constants.LONG_TIMEOUT) |
||||
self._invoker.event(group, method)( |
||||
second_request, second_receiver, second_receiver.abort, |
||||
test_constants.LONG_TIMEOUT) |
||||
first_receiver.block_until_terminated() |
||||
second_receiver.block_until_terminated() |
||||
|
||||
first_response = first_receiver.unary_response() |
||||
second_response = second_receiver.unary_response() |
||||
test_messages.verify(first_request, first_response, self) |
||||
test_messages.verify(second_request, second_response, self) |
||||
|
||||
@unittest.skip('TODO(nathaniel): implement.') |
||||
def testWaitingForSomeButNotAllParallelInvocations(self): |
||||
raise NotImplementedError() |
||||
|
||||
def testCancelledUnaryRequestUnaryResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.unary_unary_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
request = test_messages.request() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
with self._control.pause(): |
||||
call = self._invoker.event(group, method)( |
||||
request, receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
call.cancel() |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs(face.Abortion.Kind.CANCELLED, receiver.abortion().kind) |
||||
|
||||
def testCancelledUnaryRequestStreamResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.unary_stream_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
request = test_messages.request() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
call = self._invoker.event(group, method)( |
||||
request, receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
call.cancel() |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs(face.Abortion.Kind.CANCELLED, receiver.abortion().kind) |
||||
|
||||
def testCancelledStreamRequestUnaryResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.stream_unary_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
requests = test_messages.requests() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
call_consumer = self._invoker.event(group, method)( |
||||
receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
for request in requests: |
||||
call_consumer.consume(request) |
||||
call_consumer.cancel() |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs(face.Abortion.Kind.CANCELLED, receiver.abortion().kind) |
||||
|
||||
def testCancelledStreamRequestStreamResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.stream_stream_messages_sequences.iteritems()): |
||||
for unused_test_messages in test_messages_sequence: |
||||
receiver = _receiver.Receiver() |
||||
|
||||
call_consumer = self._invoker.event(group, method)( |
||||
receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
call_consumer.cancel() |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs(face.Abortion.Kind.CANCELLED, receiver.abortion().kind) |
||||
|
||||
def testExpiredUnaryRequestUnaryResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.unary_unary_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
request = test_messages.request() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
with self._control.pause(): |
||||
self._invoker.event(group, method)( |
||||
request, receiver, receiver.abort, |
||||
_3069_test_constant.REALLY_SHORT_TIMEOUT) |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs(face.Abortion.Kind.EXPIRED, receiver.abortion().kind) |
||||
|
||||
def testExpiredUnaryRequestStreamResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.unary_stream_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
request = test_messages.request() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
with self._control.pause(): |
||||
self._invoker.event(group, method)( |
||||
request, receiver, receiver.abort, |
||||
_3069_test_constant.REALLY_SHORT_TIMEOUT) |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs(face.Abortion.Kind.EXPIRED, receiver.abortion().kind) |
||||
|
||||
def testExpiredStreamRequestUnaryResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.stream_unary_messages_sequences.iteritems()): |
||||
for unused_test_messages in test_messages_sequence: |
||||
receiver = _receiver.Receiver() |
||||
|
||||
self._invoker.event(group, method)( |
||||
receiver, receiver.abort, _3069_test_constant.REALLY_SHORT_TIMEOUT) |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs(face.Abortion.Kind.EXPIRED, receiver.abortion().kind) |
||||
|
||||
def testExpiredStreamRequestStreamResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.stream_stream_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
requests = test_messages.requests() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
call_consumer = self._invoker.event(group, method)( |
||||
receiver, receiver.abort, _3069_test_constant.REALLY_SHORT_TIMEOUT) |
||||
for request in requests: |
||||
call_consumer.consume(request) |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs(face.Abortion.Kind.EXPIRED, receiver.abortion().kind) |
||||
|
||||
def testFailedUnaryRequestUnaryResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.unary_unary_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
request = test_messages.request() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
with self._control.fail(): |
||||
self._invoker.event(group, method)( |
||||
request, receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs( |
||||
face.Abortion.Kind.REMOTE_FAILURE, receiver.abortion().kind) |
||||
|
||||
def testFailedUnaryRequestStreamResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.unary_stream_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
request = test_messages.request() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
with self._control.fail(): |
||||
self._invoker.event(group, method)( |
||||
request, receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs( |
||||
face.Abortion.Kind.REMOTE_FAILURE, receiver.abortion().kind) |
||||
|
||||
def testFailedStreamRequestUnaryResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.stream_unary_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
requests = test_messages.requests() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
with self._control.fail(): |
||||
call_consumer = self._invoker.event(group, method)( |
||||
receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
for request in requests: |
||||
call_consumer.consume(request) |
||||
call_consumer.terminate() |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs( |
||||
face.Abortion.Kind.REMOTE_FAILURE, receiver.abortion().kind) |
||||
|
||||
def testFailedStreamRequestStreamResponse(self): |
||||
for (group, method), test_messages_sequence in ( |
||||
self._digest.stream_stream_messages_sequences.iteritems()): |
||||
for test_messages in test_messages_sequence: |
||||
requests = test_messages.requests() |
||||
receiver = _receiver.Receiver() |
||||
|
||||
with self._control.fail(): |
||||
call_consumer = self._invoker.event(group, method)( |
||||
receiver, receiver.abort, test_constants.LONG_TIMEOUT) |
||||
for request in requests: |
||||
call_consumer.consume(request) |
||||
call_consumer.terminate() |
||||
receiver.block_until_terminated() |
||||
|
||||
self.assertIs( |
||||
face.Abortion.Kind.REMOTE_FAILURE, receiver.abortion().kind) |
@ -0,0 +1,39 @@ |
||||
%YAML 1.2 |
||||
--- | |
||||
# Copyright 2015-2016, 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. |
||||
|
||||
FROM ubuntu:14.04 |
||||
|
||||
<%include file="../../apt_get_basic.include"/> |
||||
<%include file="../../cxx_deps.include"/> |
||||
<%include file="../../run_tests_addons.include"/> |
||||
# Define the default command. |
||||
CMD ["bash"] |
||||
|
@ -0,0 +1,43 @@ |
||||
%YAML 1.2 |
||||
--- | |
||||
# Copyright 2016, 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. |
||||
|
||||
FROM debian:jessie |
||||
|
||||
<%include file="../../apt_get_basic.include"/> |
||||
<%include file="../../csharp_deps.include"/> |
||||
<%include file="../../cxx_deps.include"/> |
||||
<%include file="../../node_deps.include"/> |
||||
<%include file="../../php_deps.include"/> |
||||
<%include file="../../ruby_deps.include"/> |
||||
<%include file="../../python_deps.include"/> |
||||
<%include file="../../run_tests_addons.include"/> |
||||
# Define the default command. |
||||
CMD ["bash"] |
@ -0,0 +1,148 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015-2016, 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. |
||||
* |
||||
*/ |
||||
|
||||
#include "src/core/client_config/resolvers/dns_resolver.h" |
||||
|
||||
#include <string.h> |
||||
|
||||
#include <grpc/grpc.h> |
||||
#include <grpc/support/alloc.h> |
||||
|
||||
#include "src/core/iomgr/resolve_address.h" |
||||
#include "src/core/iomgr/timer.h" |
||||
#include "test/core/util/test_config.h" |
||||
|
||||
static void subchannel_factory_ref(grpc_subchannel_factory *scv) {} |
||||
static void subchannel_factory_unref(grpc_exec_ctx *exec_ctx, |
||||
grpc_subchannel_factory *scv) {} |
||||
static grpc_subchannel *subchannel_factory_create_subchannel( |
||||
grpc_exec_ctx *exec_ctx, grpc_subchannel_factory *factory, |
||||
grpc_subchannel_args *args) { |
||||
return NULL; |
||||
} |
||||
|
||||
static const grpc_subchannel_factory_vtable sc_vtable = { |
||||
subchannel_factory_ref, subchannel_factory_unref, |
||||
subchannel_factory_create_subchannel}; |
||||
|
||||
static grpc_subchannel_factory sc_factory = {&sc_vtable}; |
||||
|
||||
static gpr_mu g_mu; |
||||
static bool g_fail_resolution = true; |
||||
|
||||
static grpc_resolved_addresses *my_resolve_address(const char *name, |
||||
const char *addr) { |
||||
gpr_mu_lock(&g_mu); |
||||
GPR_ASSERT(0 == strcmp("test", name)); |
||||
if (g_fail_resolution) { |
||||
g_fail_resolution = false; |
||||
gpr_mu_unlock(&g_mu); |
||||
return NULL; |
||||
} else { |
||||
gpr_mu_unlock(&g_mu); |
||||
grpc_resolved_addresses *addrs = gpr_malloc(sizeof(*addrs)); |
||||
addrs->naddrs = 1; |
||||
addrs->addrs = gpr_malloc(sizeof(*addrs->addrs)); |
||||
addrs->addrs[0].len = 123; |
||||
return addrs; |
||||
} |
||||
} |
||||
|
||||
static grpc_resolver *create_resolver(const char *name) { |
||||
grpc_resolver_factory *factory = grpc_dns_resolver_factory_create(); |
||||
grpc_uri *uri = grpc_uri_parse(name, 0); |
||||
GPR_ASSERT(uri); |
||||
grpc_resolver_args args; |
||||
memset(&args, 0, sizeof(args)); |
||||
args.uri = uri; |
||||
args.subchannel_factory = &sc_factory; |
||||
grpc_resolver *resolver = |
||||
grpc_resolver_factory_create_resolver(factory, &args); |
||||
grpc_resolver_factory_unref(factory); |
||||
grpc_uri_destroy(uri); |
||||
return resolver; |
||||
} |
||||
|
||||
static void on_done(grpc_exec_ctx *exec_ctx, void *ev, bool success) { |
||||
gpr_event_set(ev, (void *)1); |
||||
} |
||||
|
||||
// interleave waiting for an event with a timer check
|
||||
static bool wait_loop(int deadline_seconds, gpr_event *ev) { |
||||
while (deadline_seconds) { |
||||
gpr_log(GPR_DEBUG, "Test: waiting for %d more seconds", deadline_seconds); |
||||
if (gpr_event_wait(ev, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1))) return true; |
||||
deadline_seconds--; |
||||
|
||||
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
||||
grpc_timer_check(&exec_ctx, gpr_now(GPR_CLOCK_MONOTONIC), NULL); |
||||
grpc_exec_ctx_finish(&exec_ctx); |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
int main(int argc, char **argv) { |
||||
grpc_test_init(argc, argv); |
||||
|
||||
grpc_init(); |
||||
gpr_mu_init(&g_mu); |
||||
grpc_blocking_resolve_address = my_resolve_address; |
||||
|
||||
grpc_resolver *resolver = create_resolver("dns:test"); |
||||
|
||||
grpc_client_config *config = (grpc_client_config *)1; |
||||
|
||||
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
||||
gpr_event ev1; |
||||
gpr_event_init(&ev1); |
||||
grpc_resolver_next(&exec_ctx, resolver, &config, |
||||
grpc_closure_create(on_done, &ev1)); |
||||
grpc_exec_ctx_flush(&exec_ctx); |
||||
GPR_ASSERT(wait_loop(5, &ev1)); |
||||
GPR_ASSERT(config == NULL); |
||||
|
||||
gpr_event ev2; |
||||
gpr_event_init(&ev2); |
||||
grpc_resolver_next(&exec_ctx, resolver, &config, |
||||
grpc_closure_create(on_done, &ev2)); |
||||
grpc_exec_ctx_flush(&exec_ctx); |
||||
GPR_ASSERT(wait_loop(30, &ev2)); |
||||
GPR_ASSERT(config != NULL); |
||||
|
||||
grpc_client_config_unref(&exec_ctx, config); |
||||
GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test"); |
||||
grpc_exec_ctx_finish(&exec_ctx); |
||||
|
||||
grpc_shutdown(); |
||||
gpr_mu_destroy(&g_mu); |
||||
} |
@ -0,0 +1,83 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2016, 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. |
||||
* |
||||
*/ |
||||
|
||||
#include <stdio.h> |
||||
|
||||
#include <grpc/grpc.h> |
||||
#include <grpc/support/alloc.h> |
||||
#include <grpc/support/log.h> |
||||
#include <grpc/support/thd.h> |
||||
#include "test/core/util/test_config.h" |
||||
|
||||
#define NUM_THREADS 100 |
||||
static grpc_channel* channels[NUM_THREADS]; |
||||
static grpc_completion_queue* queues[NUM_THREADS]; |
||||
|
||||
void create_loop_destroy(void* actually_an_int) { |
||||
int thread_index = (int)(intptr_t)(actually_an_int); |
||||
for (int i = 0; i < 10; ++i) { |
||||
grpc_completion_queue* cq = grpc_completion_queue_create(NULL); |
||||
grpc_channel* chan = grpc_insecure_channel_create("localhost", NULL, NULL); |
||||
|
||||
channels[thread_index] = chan; |
||||
queues[thread_index] = cq; |
||||
|
||||
for (int j = 0; j < 10; ++j) { |
||||
gpr_timespec later_time = GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10); |
||||
grpc_connectivity_state state = |
||||
grpc_channel_check_connectivity_state(chan, 1); |
||||
grpc_channel_watch_connectivity_state(chan, state, later_time, cq, NULL); |
||||
GPR_ASSERT(grpc_completion_queue_next(cq, |
||||
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), |
||||
NULL).type == GRPC_OP_COMPLETE); |
||||
} |
||||
grpc_channel_destroy(channels[thread_index]); |
||||
grpc_completion_queue_destroy(queues[thread_index]); |
||||
} |
||||
} |
||||
|
||||
int main(int argc, char** argv) { |
||||
grpc_test_init(argc, argv); |
||||
grpc_init(); |
||||
gpr_thd_id threads[NUM_THREADS]; |
||||
for (intptr_t i = 0; i < NUM_THREADS; ++i) { |
||||
gpr_thd_options options = gpr_thd_options_default(); |
||||
gpr_thd_options_set_joinable(&options); |
||||
gpr_thd_new(&threads[i], create_loop_destroy, (void*)i, &options); |
||||
} |
||||
for (int i = 0; i < NUM_THREADS; ++i) { |
||||
gpr_thd_join(threads[i]); |
||||
} |
||||
grpc_shutdown(); |
||||
return 0; |
||||
} |
@ -0,0 +1,86 @@ |
||||
# Copyright 2015-2016, 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. |
||||
|
||||
FROM ubuntu:14.04 |
||||
|
||||
# Install Git and basic packages. |
||||
RUN apt-get update && apt-get install -y \ |
||||
autoconf \ |
||||
autotools-dev \ |
||||
build-essential \ |
||||
bzip2 \ |
||||
ccache \ |
||||
curl \ |
||||
gcc \ |
||||
gcc-multilib \ |
||||
git \ |
||||
golang \ |
||||
gyp \ |
||||
lcov \ |
||||
libc6 \ |
||||
libc6-dbg \ |
||||
libc6-dev \ |
||||
libgtest-dev \ |
||||
libtool \ |
||||
make \ |
||||
perl \ |
||||
strace \ |
||||
python-dev \ |
||||
python-setuptools \ |
||||
python-yaml \ |
||||
telnet \ |
||||
unzip \ |
||||
wget \ |
||||
zip && apt-get clean |
||||
|
||||
#================ |
||||
# Build profiling |
||||
RUN apt-get update && apt-get install -y time && apt-get clean |
||||
|
||||
#================= |
||||
# C++ dependencies |
||||
RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean |
||||
|
||||
# Prepare ccache |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/g++ |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/cc |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/c++ |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/clang |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ |
||||
|
||||
#====================== |
||||
# Zookeeper dependencies |
||||
# TODO(jtattermusch): is zookeeper still needed? |
||||
RUN apt-get install -y libzookeeper-mt-dev |
||||
|
||||
RUN mkdir /var/local/jenkins |
||||
|
||||
# Define the default command. |
||||
CMD ["bash"] |
@ -0,0 +1,155 @@ |
||||
# Copyright 2016, 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. |
||||
|
||||
FROM debian:jessie |
||||
|
||||
# Install Git and basic packages. |
||||
RUN apt-get update && apt-get install -y \ |
||||
autoconf \ |
||||
autotools-dev \ |
||||
build-essential \ |
||||
bzip2 \ |
||||
ccache \ |
||||
curl \ |
||||
gcc \ |
||||
gcc-multilib \ |
||||
git \ |
||||
golang \ |
||||
gyp \ |
||||
lcov \ |
||||
libc6 \ |
||||
libc6-dbg \ |
||||
libc6-dev \ |
||||
libgtest-dev \ |
||||
libtool \ |
||||
make \ |
||||
perl \ |
||||
strace \ |
||||
python-dev \ |
||||
python-setuptools \ |
||||
python-yaml \ |
||||
telnet \ |
||||
unzip \ |
||||
wget \ |
||||
zip && apt-get clean |
||||
|
||||
#================ |
||||
# Build profiling |
||||
RUN apt-get update && apt-get install -y time && apt-get clean |
||||
|
||||
#================ |
||||
# C# dependencies |
||||
|
||||
# Update to a newer version of mono |
||||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF |
||||
RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list |
||||
RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list |
||||
RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list |
||||
RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list |
||||
|
||||
# Install dependencies |
||||
RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \ |
||||
mono-devel \ |
||||
ca-certificates-mono \ |
||||
nuget \ |
||||
&& apt-get clean |
||||
|
||||
#================= |
||||
# C++ dependencies |
||||
RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean |
||||
|
||||
#================== |
||||
# Node dependencies |
||||
|
||||
# Install nvm |
||||
RUN touch .profile |
||||
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash |
||||
RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache" |
||||
|
||||
#================= |
||||
# PHP dependencies |
||||
|
||||
# Install dependencies |
||||
|
||||
RUN /bin/bash -l -c "echo 'deb http://packages.dotdeb.org wheezy-php55 all' \ |
||||
>> /etc/apt/sources.list.d/dotdeb.list" |
||||
RUN /bin/bash -l -c "echo 'deb-src http://packages.dotdeb.org wheezy-php55 all' \ |
||||
>> /etc/apt/sources.list.d/dotdeb.list" |
||||
RUN wget http://www.dotdeb.org/dotdeb.gpg -O- | apt-key add - |
||||
|
||||
RUN apt-get update && apt-get install -y \ |
||||
git php5 php5-dev phpunit unzip |
||||
|
||||
#================== |
||||
# Ruby dependencies |
||||
|
||||
# Install rvm |
||||
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 |
||||
RUN \curl -sSL https://get.rvm.io | bash -s stable |
||||
|
||||
# Install Ruby 2.1 |
||||
RUN /bin/bash -l -c "rvm install ruby-2.1" |
||||
RUN /bin/bash -l -c "rvm use --default ruby-2.1" |
||||
RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" |
||||
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" |
||||
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" |
||||
RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" |
||||
|
||||
#==================== |
||||
# Python dependencies |
||||
|
||||
# Install dependencies |
||||
|
||||
RUN apt-get update && apt-get install -y \ |
||||
python-all-dev \ |
||||
python3-all-dev \ |
||||
python-pip |
||||
|
||||
# Install Python packages from PyPI |
||||
RUN pip install pip --upgrade |
||||
RUN pip install virtualenv |
||||
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 tox |
||||
|
||||
# Prepare ccache |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/g++ |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/cc |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/c++ |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/clang |
||||
RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ |
||||
|
||||
#====================== |
||||
# Zookeeper dependencies |
||||
# TODO(jtattermusch): is zookeeper still needed? |
||||
RUN apt-get install -y libzookeeper-mt-dev |
||||
|
||||
RUN mkdir /var/local/jenkins |
||||
|
||||
# Define the default command. |
||||
CMD ["bash"] |
@ -0,0 +1,37 @@ |
||||
#!/usr/bin/env bash |
||||
# Copyright 2016, Google Inc. |
||||
# All rights reserved. |
||||
# |
||||
# Redistribution and use in source and binary forms, with or without |
||||
# modification, are permitted provided that the following conditions are |
||||
# met: |
||||
# |
||||
# * Redistributions of source code must retain the above copyright |
||||
# notice, this list of conditions and the following disclaimer. |
||||
# * Redistributions in binary form must reproduce the above |
||||
# copyright notice, this list of conditions and the following disclaimer |
||||
# in the documentation and/or other materials provided with the |
||||
# distribution. |
||||
# * Neither the name of Google Inc. nor the names of its |
||||
# contributors may be used to endorse or promote products derived from |
||||
# this software without specific prior written permission. |
||||
# |
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
# |
||||
# This script is invoked by Jenkins and runs interop test suite. |
||||
set -ex |
||||
|
||||
# Enter the gRPC repo root |
||||
cd $(dirname $0)/../.. |
||||
|
||||
tools/run_tests/run_interop_tests.py -l all -s all --cloud_to_prod --cloud_to_prod_auth --prod_servers default cloud_gateway gateway_v2 cloud_gateway_v2 gateway_v4 cloud_gateway_v4 --use_docker --http2_interop -t -j 12 $@ || true |
@ -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>{391B366C-D916-45AA-3FE5-67363A46193B}</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>concurrent_connectivity_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>concurrent_connectivity_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\surface\concurrent_connectivity_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\surface\concurrent_connectivity_test.c"> |
||||
<Filter>test\core\surface</Filter> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
|
||||
<ItemGroup> |
||||
<Filter Include="test"> |
||||
<UniqueIdentifier>{1320b717-a107-004b-c517-074e6a7baf97}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core"> |
||||
<UniqueIdentifier>{f205219c-cee2-c0e8-a922-5486f2d31026}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core\surface"> |
||||
<UniqueIdentifier>{6804b6ae-88f4-acf9-b3fc-6b12f8e28d4d}</UniqueIdentifier> |
||||
</Filter> |
||||
</ItemGroup> |
||||
</Project> |
||||
|
@ -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>{F7B6FE68-E847-D7CA-4062-E737E542BCC3}</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>dns_resolver_connectivity_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>dns_resolver_connectivity_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\client_config\resolvers\dns_resolver_connectivity_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,24 @@ |
||||
<?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\client_config\resolvers\dns_resolver_connectivity_test.c"> |
||||
<Filter>test\core\client_config\resolvers</Filter> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
|
||||
<ItemGroup> |
||||
<Filter Include="test"> |
||||
<UniqueIdentifier>{7743e287-3311-1206-2766-32381628ff07}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core"> |
||||
<UniqueIdentifier>{cc06b800-cd26-f7a8-7ecf-ec789e78881b}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core\client_config"> |
||||
<UniqueIdentifier>{4fbd5c0a-d1e3-6658-5788-2fc6f2cc9071}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core\client_config\resolvers"> |
||||
<UniqueIdentifier>{eab637a2-7ac1-f6be-4fc2-c8989c66070b}</UniqueIdentifier> |
||||
</Filter> |
||||
</ItemGroup> |
||||
</Project> |
||||
|
Loading…
Reference in new issue