mirror of https://github.com/grpc/grpc.git
commit
69cf771a67
79 changed files with 2722 additions and 1246 deletions
@ -0,0 +1,62 @@ |
|||||||
|
/*
|
||||||
|
* |
||||||
|
* 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. |
||||||
|
* |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef GRPCXX_EXT_HEALTH_CHECK_SERVICE_SERVER_BUILDER_OPTION_H |
||||||
|
#define GRPCXX_EXT_HEALTH_CHECK_SERVICE_SERVER_BUILDER_OPTION_H |
||||||
|
|
||||||
|
#include <memory> |
||||||
|
|
||||||
|
#include <grpc++/health_check_service_interface.h> |
||||||
|
#include <grpc++/impl/server_builder_option.h> |
||||||
|
#include <grpc++/support/config.h> |
||||||
|
|
||||||
|
namespace grpc { |
||||||
|
|
||||||
|
class HealthCheckServiceServerBuilderOption : public ServerBuilderOption { |
||||||
|
public: |
||||||
|
// The ownership of hc will be taken and transferred to the grpc server.
|
||||||
|
// To explicitly disable default service, pass in a nullptr.
|
||||||
|
explicit HealthCheckServiceServerBuilderOption( |
||||||
|
std::unique_ptr<HealthCheckServiceInterface> hc); |
||||||
|
~HealthCheckServiceServerBuilderOption() override {} |
||||||
|
void UpdateArguments(ChannelArguments* args) override; |
||||||
|
void UpdatePlugins( |
||||||
|
std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) override; |
||||||
|
|
||||||
|
private: |
||||||
|
std::unique_ptr<HealthCheckServiceInterface> hc_; |
||||||
|
}; |
||||||
|
|
||||||
|
} // namespace grpc
|
||||||
|
|
||||||
|
#endif // GRPCXX_EXT_HEALTH_CHECK_SERVICE_SERVER_BUILDER_OPTION_H
|
@ -0,0 +1,166 @@ |
|||||||
|
/*
|
||||||
|
* |
||||||
|
* 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 <memory> |
||||||
|
#include <mutex> |
||||||
|
|
||||||
|
#include <grpc++/impl/codegen/method_handler_impl.h> |
||||||
|
#include <grpc/support/alloc.h> |
||||||
|
#include <grpc/support/log.h> |
||||||
|
|
||||||
|
#include "src/cpp/server/health/default_health_check_service.h" |
||||||
|
#include "src/cpp/server/health/health.pb.h" |
||||||
|
#include "third_party/nanopb/pb_decode.h" |
||||||
|
#include "third_party/nanopb/pb_encode.h" |
||||||
|
|
||||||
|
namespace grpc { |
||||||
|
namespace { |
||||||
|
const char kHealthCheckMethodName[] = "/grpc.health.v1.Health/Check"; |
||||||
|
} // namespace
|
||||||
|
|
||||||
|
DefaultHealthCheckService::HealthCheckServiceImpl::HealthCheckServiceImpl( |
||||||
|
DefaultHealthCheckService* service) |
||||||
|
: service_(service), method_(nullptr) { |
||||||
|
MethodHandler* handler = |
||||||
|
new RpcMethodHandler<HealthCheckServiceImpl, ByteBuffer, ByteBuffer>( |
||||||
|
std::mem_fn(&HealthCheckServiceImpl::Check), this); |
||||||
|
method_ = new RpcServiceMethod(kHealthCheckMethodName, RpcMethod::NORMAL_RPC, |
||||||
|
handler); |
||||||
|
AddMethod(method_); |
||||||
|
} |
||||||
|
|
||||||
|
Status DefaultHealthCheckService::HealthCheckServiceImpl::Check( |
||||||
|
ServerContext* context, const ByteBuffer* request, ByteBuffer* response) { |
||||||
|
// Decode request.
|
||||||
|
std::vector<Slice> slices; |
||||||
|
request->Dump(&slices); |
||||||
|
uint8_t* request_bytes = nullptr; |
||||||
|
bool request_bytes_owned = false; |
||||||
|
size_t request_size = 0; |
||||||
|
grpc_health_v1_HealthCheckRequest request_struct; |
||||||
|
if (slices.empty()) { |
||||||
|
request_struct.has_service = false; |
||||||
|
} else if (slices.size() == 1) { |
||||||
|
request_bytes = const_cast<uint8_t*>(slices[0].begin()); |
||||||
|
request_size = slices[0].size(); |
||||||
|
} else { |
||||||
|
request_bytes_owned = true; |
||||||
|
request_bytes = static_cast<uint8_t*>(gpr_malloc(request->Length())); |
||||||
|
uint8_t* copy_to = request_bytes; |
||||||
|
for (size_t i = 0; i < slices.size(); i++) { |
||||||
|
memcpy(copy_to, slices[i].begin(), slices[i].size()); |
||||||
|
copy_to += slices[i].size(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (request_bytes != nullptr) { |
||||||
|
pb_istream_t istream = pb_istream_from_buffer(request_bytes, request_size); |
||||||
|
bool decode_status = pb_decode( |
||||||
|
&istream, grpc_health_v1_HealthCheckRequest_fields, &request_struct); |
||||||
|
if (request_bytes_owned) { |
||||||
|
gpr_free(request_bytes); |
||||||
|
} |
||||||
|
if (!decode_status) { |
||||||
|
return Status(StatusCode::INVALID_ARGUMENT, ""); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// Check status from the associated default health checking service.
|
||||||
|
DefaultHealthCheckService::ServingStatus serving_status = |
||||||
|
service_->GetServingStatus( |
||||||
|
request_struct.has_service ? request_struct.service : ""); |
||||||
|
if (serving_status == DefaultHealthCheckService::NOT_FOUND) { |
||||||
|
return Status(StatusCode::NOT_FOUND, ""); |
||||||
|
} |
||||||
|
|
||||||
|
// Encode response
|
||||||
|
grpc_health_v1_HealthCheckResponse response_struct; |
||||||
|
response_struct.has_status = true; |
||||||
|
response_struct.status = |
||||||
|
serving_status == DefaultHealthCheckService::SERVING |
||||||
|
? grpc_health_v1_HealthCheckResponse_ServingStatus_SERVING |
||||||
|
: grpc_health_v1_HealthCheckResponse_ServingStatus_NOT_SERVING; |
||||||
|
pb_ostream_t ostream; |
||||||
|
memset(&ostream, 0, sizeof(ostream)); |
||||||
|
pb_encode(&ostream, grpc_health_v1_HealthCheckResponse_fields, |
||||||
|
&response_struct); |
||||||
|
grpc_slice response_slice = grpc_slice_malloc(ostream.bytes_written); |
||||||
|
ostream = pb_ostream_from_buffer(GRPC_SLICE_START_PTR(response_slice), |
||||||
|
GRPC_SLICE_LENGTH(response_slice)); |
||||||
|
bool encode_status = pb_encode( |
||||||
|
&ostream, grpc_health_v1_HealthCheckResponse_fields, &response_struct); |
||||||
|
if (!encode_status) { |
||||||
|
return Status(StatusCode::INTERNAL, "Failed to encode response."); |
||||||
|
} |
||||||
|
Slice encoded_response(response_slice, Slice::STEAL_REF); |
||||||
|
ByteBuffer response_buffer(&encoded_response, 1); |
||||||
|
response->Swap(&response_buffer); |
||||||
|
return Status::OK; |
||||||
|
} |
||||||
|
|
||||||
|
DefaultHealthCheckService::DefaultHealthCheckService() { |
||||||
|
services_map_.emplace("", true); |
||||||
|
} |
||||||
|
|
||||||
|
void DefaultHealthCheckService::SetServingStatus( |
||||||
|
const grpc::string& service_name, bool serving) { |
||||||
|
std::lock_guard<std::mutex> lock(mu_); |
||||||
|
services_map_[service_name] = serving; |
||||||
|
} |
||||||
|
|
||||||
|
void DefaultHealthCheckService::SetServingStatus(bool serving) { |
||||||
|
std::lock_guard<std::mutex> lock(mu_); |
||||||
|
for (auto iter = services_map_.begin(); iter != services_map_.end(); ++iter) { |
||||||
|
iter->second = serving; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
DefaultHealthCheckService::ServingStatus |
||||||
|
DefaultHealthCheckService::GetServingStatus( |
||||||
|
const grpc::string& service_name) const { |
||||||
|
std::lock_guard<std::mutex> lock(mu_); |
||||||
|
const auto& iter = services_map_.find(service_name); |
||||||
|
if (iter == services_map_.end()) { |
||||||
|
return NOT_FOUND; |
||||||
|
} |
||||||
|
return iter->second ? SERVING : NOT_SERVING; |
||||||
|
} |
||||||
|
|
||||||
|
DefaultHealthCheckService::HealthCheckServiceImpl* |
||||||
|
DefaultHealthCheckService::GetHealthCheckService() { |
||||||
|
GPR_ASSERT(impl_ == nullptr); |
||||||
|
impl_.reset(new HealthCheckServiceImpl(this)); |
||||||
|
return impl_.get(); |
||||||
|
} |
||||||
|
|
||||||
|
} // namespace grpc
|
@ -0,0 +1,78 @@ |
|||||||
|
/*
|
||||||
|
* |
||||||
|
* 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. |
||||||
|
* |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef GRPC_INTERNAL_CPP_SERVER_DEFAULT_HEALTH_CHECK_SERVICE_H |
||||||
|
#define GRPC_INTERNAL_CPP_SERVER_DEFAULT_HEALTH_CHECK_SERVICE_H |
||||||
|
|
||||||
|
#include <mutex> |
||||||
|
|
||||||
|
#include <grpc++/health_check_service_interface.h> |
||||||
|
#include <grpc++/impl/codegen/service_type.h> |
||||||
|
#include <grpc++/support/byte_buffer.h> |
||||||
|
|
||||||
|
namespace grpc { |
||||||
|
|
||||||
|
// Default implementation of HealthCheckServiceInterface. Server will create and
|
||||||
|
// own it.
|
||||||
|
class DefaultHealthCheckService final : public HealthCheckServiceInterface { |
||||||
|
public: |
||||||
|
// The service impl to register with the server.
|
||||||
|
class HealthCheckServiceImpl : public Service { |
||||||
|
public: |
||||||
|
explicit HealthCheckServiceImpl(DefaultHealthCheckService* service); |
||||||
|
|
||||||
|
Status Check(ServerContext* context, const ByteBuffer* request, |
||||||
|
ByteBuffer* response); |
||||||
|
|
||||||
|
private: |
||||||
|
const DefaultHealthCheckService* const service_; |
||||||
|
RpcServiceMethod* method_; |
||||||
|
}; |
||||||
|
|
||||||
|
DefaultHealthCheckService(); |
||||||
|
void SetServingStatus(const grpc::string& service_name, |
||||||
|
bool serving) override; |
||||||
|
void SetServingStatus(bool serving) override; |
||||||
|
enum ServingStatus { NOT_FOUND, SERVING, NOT_SERVING }; |
||||||
|
ServingStatus GetServingStatus(const grpc::string& service_name) const; |
||||||
|
HealthCheckServiceImpl* GetHealthCheckService(); |
||||||
|
|
||||||
|
private: |
||||||
|
mutable std::mutex mu_; |
||||||
|
std::map<grpc::string, bool> services_map_; |
||||||
|
std::unique_ptr<HealthCheckServiceImpl> impl_; |
||||||
|
}; |
||||||
|
|
||||||
|
} // namespace grpc
|
||||||
|
|
||||||
|
#endif // GRPC_INTERNAL_CPP_SERVER_DEFAULT_HEALTH_CHECK_SERVICE_H
|
@ -0,0 +1,24 @@ |
|||||||
|
/* Automatically generated nanopb constant definitions */ |
||||||
|
/* Generated by nanopb-0.3.7-dev */ |
||||||
|
|
||||||
|
#include "src/cpp/server/health/health.pb.h" |
||||||
|
|
||||||
|
/* @@protoc_insertion_point(includes) */ |
||||||
|
#if PB_PROTO_HEADER_VERSION != 30 |
||||||
|
#error Regenerate this file with the current version of nanopb generator. |
||||||
|
#endif |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const pb_field_t grpc_health_v1_HealthCheckRequest_fields[2] = { |
||||||
|
PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_health_v1_HealthCheckRequest, service, service, 0), |
||||||
|
PB_LAST_FIELD |
||||||
|
}; |
||||||
|
|
||||||
|
const pb_field_t grpc_health_v1_HealthCheckResponse_fields[2] = { |
||||||
|
PB_FIELD( 1, UENUM , OPTIONAL, STATIC , FIRST, grpc_health_v1_HealthCheckResponse, status, status, 0), |
||||||
|
PB_LAST_FIELD |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/* @@protoc_insertion_point(eof) */ |
@ -0,0 +1,72 @@ |
|||||||
|
/* Automatically generated nanopb header */ |
||||||
|
/* Generated by nanopb-0.3.7-dev */ |
||||||
|
|
||||||
|
#ifndef PB_GRPC_HEALTH_V1_HEALTH_PB_H_INCLUDED |
||||||
|
#define PB_GRPC_HEALTH_V1_HEALTH_PB_H_INCLUDED |
||||||
|
#include "third_party/nanopb/pb.h" |
||||||
|
/* @@protoc_insertion_point(includes) */ |
||||||
|
#if PB_PROTO_HEADER_VERSION != 30 |
||||||
|
#error Regenerate this file with the current version of nanopb generator. |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifdef __cplusplus |
||||||
|
extern "C" { |
||||||
|
#endif |
||||||
|
|
||||||
|
/* Enum definitions */ |
||||||
|
typedef enum _grpc_health_v1_HealthCheckResponse_ServingStatus { |
||||||
|
grpc_health_v1_HealthCheckResponse_ServingStatus_UNKNOWN = 0, |
||||||
|
grpc_health_v1_HealthCheckResponse_ServingStatus_SERVING = 1, |
||||||
|
grpc_health_v1_HealthCheckResponse_ServingStatus_NOT_SERVING = 2 |
||||||
|
} grpc_health_v1_HealthCheckResponse_ServingStatus; |
||||||
|
#define _grpc_health_v1_HealthCheckResponse_ServingStatus_MIN grpc_health_v1_HealthCheckResponse_ServingStatus_UNKNOWN |
||||||
|
#define _grpc_health_v1_HealthCheckResponse_ServingStatus_MAX grpc_health_v1_HealthCheckResponse_ServingStatus_NOT_SERVING |
||||||
|
#define _grpc_health_v1_HealthCheckResponse_ServingStatus_ARRAYSIZE ((grpc_health_v1_HealthCheckResponse_ServingStatus)(grpc_health_v1_HealthCheckResponse_ServingStatus_NOT_SERVING+1)) |
||||||
|
|
||||||
|
/* Struct definitions */ |
||||||
|
typedef struct _grpc_health_v1_HealthCheckRequest { |
||||||
|
bool has_service; |
||||||
|
char service[200]; |
||||||
|
/* @@protoc_insertion_point(struct:grpc_health_v1_HealthCheckRequest) */ |
||||||
|
} grpc_health_v1_HealthCheckRequest; |
||||||
|
|
||||||
|
typedef struct _grpc_health_v1_HealthCheckResponse { |
||||||
|
bool has_status; |
||||||
|
grpc_health_v1_HealthCheckResponse_ServingStatus status; |
||||||
|
/* @@protoc_insertion_point(struct:grpc_health_v1_HealthCheckResponse) */ |
||||||
|
} grpc_health_v1_HealthCheckResponse; |
||||||
|
|
||||||
|
/* Default values for struct fields */ |
||||||
|
|
||||||
|
/* Initializer values for message structs */ |
||||||
|
#define grpc_health_v1_HealthCheckRequest_init_default {false, ""} |
||||||
|
#define grpc_health_v1_HealthCheckResponse_init_default {false, (grpc_health_v1_HealthCheckResponse_ServingStatus)0} |
||||||
|
#define grpc_health_v1_HealthCheckRequest_init_zero {false, ""} |
||||||
|
#define grpc_health_v1_HealthCheckResponse_init_zero {false, (grpc_health_v1_HealthCheckResponse_ServingStatus)0} |
||||||
|
|
||||||
|
/* Field tags (for use in manual encoding/decoding) */ |
||||||
|
#define grpc_health_v1_HealthCheckRequest_service_tag 1 |
||||||
|
#define grpc_health_v1_HealthCheckResponse_status_tag 1 |
||||||
|
|
||||||
|
/* Struct field encoding specification for nanopb */ |
||||||
|
extern const pb_field_t grpc_health_v1_HealthCheckRequest_fields[2]; |
||||||
|
extern const pb_field_t grpc_health_v1_HealthCheckResponse_fields[2]; |
||||||
|
|
||||||
|
/* Maximum encoded size of messages (where known) */ |
||||||
|
#define grpc_health_v1_HealthCheckRequest_size 203 |
||||||
|
#define grpc_health_v1_HealthCheckResponse_size 2 |
||||||
|
|
||||||
|
/* Message IDs (where set with "msgid" option) */ |
||||||
|
#ifdef PB_MSGID |
||||||
|
|
||||||
|
#define HEALTH_MESSAGES \ |
||||||
|
|
||||||
|
|
||||||
|
#endif |
||||||
|
|
||||||
|
#ifdef __cplusplus |
||||||
|
} /* extern "C" */ |
||||||
|
#endif |
||||||
|
/* @@protoc_insertion_point(eof) */ |
||||||
|
|
||||||
|
#endif |
@ -0,0 +1,50 @@ |
|||||||
|
/*
|
||||||
|
* |
||||||
|
* 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 <grpc++/ext/health_check_service_server_builder_option.h> |
||||||
|
|
||||||
|
namespace grpc { |
||||||
|
|
||||||
|
HealthCheckServiceServerBuilderOption::HealthCheckServiceServerBuilderOption( |
||||||
|
std::unique_ptr<HealthCheckServiceInterface> hc) |
||||||
|
: hc_(std::move(hc)) {} |
||||||
|
// Hand over hc_ to the server.
|
||||||
|
void HealthCheckServiceServerBuilderOption::UpdateArguments( |
||||||
|
ChannelArguments* args) { |
||||||
|
args->SetPointer(kHealthCheckServiceInterfaceArg, hc_.release()); |
||||||
|
} |
||||||
|
|
||||||
|
void HealthCheckServiceServerBuilderOption::UpdatePlugins( |
||||||
|
std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) {} |
||||||
|
|
||||||
|
} // namespace grpc
|
@ -0,0 +1 @@ |
|||||||
|
grpc.health.v1.HealthCheckRequest.service max_size:200 |
@ -0,0 +1,54 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
|
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") |
||||||
|
|
||||||
|
grpc_fuzzer( |
||||||
|
name = "uri_fuzzer_test", |
||||||
|
srcs = ["uri_fuzzer_test.c"], |
||||||
|
deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], |
||||||
|
corpus = "uri_corpus", |
||||||
|
copts = ["-std=c99"], |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "lb_policies_test", |
||||||
|
srcs = ["lb_policies_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:cq_verifier"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "set_initial_connect_string_test", |
||||||
|
srcs = ["set_initial_connect_string_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
@ -0,0 +1,51 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "dns_resolver_connectivity_test", |
||||||
|
srcs = ["dns_resolver_connectivity_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "dns_resolver_test", |
||||||
|
srcs = ["dns_resolver_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "sockaddr_resolver_test", |
||||||
|
srcs = ["sockaddr_resolver_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
@ -0,0 +1,62 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
|
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") |
||||||
|
|
||||||
|
cc_binary( |
||||||
|
name = "client", |
||||||
|
srcs = ["client.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:ssl_test_data"], |
||||||
|
testonly = 1, |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_binary( |
||||||
|
name = "server", |
||||||
|
srcs = ["server.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:ssl_test_data"], |
||||||
|
testonly = 1, |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "fling", |
||||||
|
srcs = ["fling_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:ssl_test_data"], |
||||||
|
data = [":client", ":server"] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "fling_stream", |
||||||
|
srcs = ["fling_stream_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:ssl_test_data"], |
||||||
|
data = [":client", ":server"] |
||||||
|
) |
@ -1,118 +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. |
|
||||||
* |
|
||||||
*/ |
|
||||||
|
|
||||||
#include "src/core/lib/iomgr/iomgr.h" |
|
||||||
#include "src/core/lib/iomgr/closure.h" |
|
||||||
#include "src/core/lib/iomgr/endpoint.h" |
|
||||||
#include "src/core/lib/iomgr/exec_ctx.h" |
|
||||||
#include "src/core/lib/iomgr/executor.h" |
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* NOTE: If this test fails to compile, then the api changes are likely to cause |
|
||||||
* merge failures downstream. Please pay special attention to reviewing |
|
||||||
* these changes, and solicit help as appropriate when merging downstream. |
|
||||||
* |
|
||||||
* This test is NOT expected to be run directly. |
|
||||||
******************************************************************************/ |
|
||||||
|
|
||||||
static void test_code(void) { |
|
||||||
/* iomgr.h */ |
|
||||||
grpc_iomgr_init(); |
|
||||||
grpc_iomgr_shutdown(NULL); |
|
||||||
|
|
||||||
/* closure.h */ |
|
||||||
grpc_closure closure; |
|
||||||
closure.cb = NULL; |
|
||||||
closure.cb_arg = NULL; |
|
||||||
closure.next_data.scratch = 0; |
|
||||||
|
|
||||||
grpc_closure_list closure_list = GRPC_CLOSURE_LIST_INIT; |
|
||||||
closure_list.head = NULL; |
|
||||||
closure_list.tail = NULL; |
|
||||||
|
|
||||||
grpc_closure_init(&closure, NULL, NULL, grpc_schedule_on_exec_ctx); |
|
||||||
|
|
||||||
grpc_closure_create(NULL, NULL, grpc_schedule_on_exec_ctx); |
|
||||||
|
|
||||||
grpc_closure_list_move(NULL, NULL); |
|
||||||
grpc_closure_list_append(NULL, NULL, GRPC_ERROR_CREATE("Foo")); |
|
||||||
grpc_closure_list_empty(closure_list); |
|
||||||
|
|
||||||
/* exec_ctx.h */ |
|
||||||
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
|
||||||
grpc_exec_ctx_flush(&exec_ctx); |
|
||||||
grpc_exec_ctx_finish(&exec_ctx); |
|
||||||
grpc_closure_sched(&exec_ctx, &closure, GRPC_ERROR_CREATE("Foo")); |
|
||||||
grpc_closure_list_sched(&exec_ctx, &closure_list); |
|
||||||
|
|
||||||
/* endpoint.h */ |
|
||||||
grpc_endpoint endpoint; |
|
||||||
grpc_endpoint_vtable vtable = {grpc_endpoint_read, |
|
||||||
grpc_endpoint_write, |
|
||||||
grpc_endpoint_get_workqueue, |
|
||||||
grpc_endpoint_add_to_pollset, |
|
||||||
grpc_endpoint_add_to_pollset_set, |
|
||||||
grpc_endpoint_shutdown, |
|
||||||
grpc_endpoint_destroy, |
|
||||||
grpc_endpoint_get_resource_user, |
|
||||||
grpc_endpoint_get_peer, |
|
||||||
grpc_endpoint_get_fd}; |
|
||||||
endpoint.vtable = &vtable; |
|
||||||
|
|
||||||
grpc_endpoint_read(&exec_ctx, &endpoint, NULL, NULL); |
|
||||||
grpc_endpoint_get_peer(&endpoint); |
|
||||||
grpc_endpoint_write(&exec_ctx, &endpoint, NULL, NULL); |
|
||||||
grpc_endpoint_shutdown(&exec_ctx, &endpoint, GRPC_ERROR_CANCELLED); |
|
||||||
grpc_endpoint_destroy(&exec_ctx, &endpoint); |
|
||||||
grpc_endpoint_add_to_pollset(&exec_ctx, &endpoint, NULL); |
|
||||||
grpc_endpoint_add_to_pollset_set(&exec_ctx, &endpoint, NULL); |
|
||||||
|
|
||||||
/* executor.h */ |
|
||||||
grpc_executor_init(); |
|
||||||
grpc_executor_shutdown(NULL); |
|
||||||
|
|
||||||
/* pollset.h */ |
|
||||||
grpc_pollset_size(); |
|
||||||
grpc_pollset_init(NULL, NULL); |
|
||||||
grpc_pollset_shutdown(NULL, NULL, NULL); |
|
||||||
grpc_pollset_destroy(NULL); |
|
||||||
GRPC_ERROR_UNREF(grpc_pollset_work(NULL, NULL, NULL, |
|
||||||
gpr_now(GPR_CLOCK_REALTIME), |
|
||||||
gpr_now(GPR_CLOCK_MONOTONIC))); |
|
||||||
GRPC_ERROR_UNREF(grpc_pollset_kick(NULL, NULL)); |
|
||||||
} |
|
||||||
|
|
||||||
int main(void) { |
|
||||||
if (false) test_code(); |
|
||||||
return 0; |
|
||||||
} |
|
@ -1,81 +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. |
|
||||||
* |
|
||||||
*/ |
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* NOTE: If this test fails to compile, then the api changes are likely to cause |
|
||||||
* merge failures downstream. Please pay special attention to reviewing |
|
||||||
* these changes, and solicit help as appropriate when merging downstream. |
|
||||||
* |
|
||||||
* This test is NOT expected to be run directly. |
|
||||||
******************************************************************************/ |
|
||||||
|
|
||||||
#include "src/core/lib/transport/transport.h" |
|
||||||
#include "src/core/lib/transport/transport_impl.h" |
|
||||||
|
|
||||||
static void test_code(void) { |
|
||||||
/* transport_impl.h */ |
|
||||||
grpc_transport transport; |
|
||||||
grpc_transport_vtable vtable = {12345, |
|
||||||
grpc_transport_init_stream, |
|
||||||
grpc_transport_set_pollset, |
|
||||||
grpc_transport_perform_stream_op, |
|
||||||
grpc_transport_perform_op, |
|
||||||
grpc_transport_destroy_stream, |
|
||||||
grpc_transport_destroy, |
|
||||||
grpc_transport_get_peer}; |
|
||||||
transport.vtable = &vtable; |
|
||||||
|
|
||||||
/* transport.h */ |
|
||||||
GRPC_STREAM_REF_INIT(NULL, 0, NULL, NULL, "xyz"); |
|
||||||
GPR_ASSERT(0 == grpc_transport_stream_size(NULL)); |
|
||||||
GPR_ASSERT(grpc_transport_init_stream(&transport, NULL, NULL, NULL, NULL)); |
|
||||||
grpc_transport_set_pollset(&transport, NULL, NULL, NULL); |
|
||||||
grpc_transport_destroy_stream(&transport, NULL, NULL); |
|
||||||
grpc_transport_stream_op_finish_with_failure(NULL, NULL); |
|
||||||
grpc_transport_stream_op_add_cancellation(NULL, GRPC_STATUS_UNAVAILABLE); |
|
||||||
grpc_transport_stream_op_add_close(NULL, GRPC_STATUS_UNAVAILABLE, |
|
||||||
grpc_transport_op_string(NULL)); |
|
||||||
grpc_transport_perform_stream_op(&transport, NULL, NULL, NULL); |
|
||||||
grpc_transport_perform_op(&transport, NULL, NULL); |
|
||||||
grpc_transport_ping(&transport, NULL); |
|
||||||
grpc_transport_goaway(&transport, GRPC_STATUS_UNAVAILABLE, |
|
||||||
grpc_slice_malloc(0)); |
|
||||||
grpc_transport_close(&transport); |
|
||||||
grpc_transport_destroy(&transport, NULL); |
|
||||||
GPR_ASSERT("xyz" == grpc_transport_get_peer(&transport, NULL)); |
|
||||||
} |
|
||||||
|
|
||||||
int main(void) { |
|
||||||
if (false) test_code(); |
|
||||||
return 0; |
|
||||||
} |
|
@ -0,0 +1,181 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
|
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") |
||||||
|
|
||||||
|
cc_library( |
||||||
|
name = "endpoint_tests", |
||||||
|
srcs = ["endpoint_tests.c"], |
||||||
|
hdrs = ["endpoint_tests.h"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
visibility = ["//test:__subpackages__"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "combiner_test", |
||||||
|
srcs = ["combiner_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "endpoint_pair_test", |
||||||
|
srcs = ["endpoint_pair_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", ":endpoint_tests"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "ev_epoll_linux_test", |
||||||
|
srcs = ["ev_epoll_linux_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "fd_conservation_posix_test", |
||||||
|
srcs = ["fd_conservation_posix_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "fd_posix_test", |
||||||
|
srcs = ["fd_posix_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "load_file_test", |
||||||
|
srcs = ["load_file_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "pollset_set_test", |
||||||
|
srcs = ["pollset_set_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "resolve_address_posix_test", |
||||||
|
srcs = ["resolve_address_posix_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "resolve_address_test", |
||||||
|
srcs = ["resolve_address_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "resource_quota_test", |
||||||
|
srcs = ["resource_quota_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "sockaddr_utils_test", |
||||||
|
srcs = ["sockaddr_utils_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "socket_utils_test", |
||||||
|
srcs = ["socket_utils_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "tcp_client_posix_test", |
||||||
|
srcs = ["tcp_client_posix_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "tcp_posix_test", |
||||||
|
srcs = ["tcp_posix_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", ":endpoint_tests"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "tcp_server_posix_test", |
||||||
|
srcs = ["tcp_server_posix_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "time_averaged_stats_test", |
||||||
|
srcs = ["time_averaged_stats_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "timer_heap_test", |
||||||
|
srcs = ["timer_heap_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "timer_list_test", |
||||||
|
srcs = ["timer_list_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "udp_server_test", |
||||||
|
srcs = ["udp_server_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "wakeup_fd_cv_test", |
||||||
|
srcs = ["wakeup_fd_cv_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
@ -0,0 +1,37 @@ |
|||||||
|
# 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. |
||||||
|
|
||||||
|
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
|
cc_binary( |
||||||
|
name = "low_level_ping_pong", |
||||||
|
srcs = ["low_level_ping_pong.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
@ -0,0 +1,104 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
|
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") |
||||||
|
|
||||||
|
grpc_fuzzer( |
||||||
|
name = "ssl_server_fuzzer", |
||||||
|
srcs = ["ssl_server_fuzzer.c"], |
||||||
|
deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], |
||||||
|
corpus = "corpus", |
||||||
|
copts = ["-std=c99"], |
||||||
|
) |
||||||
|
|
||||||
|
cc_library( |
||||||
|
name = "oauth2_utils", |
||||||
|
srcs = ["oauth2_utils.c"], |
||||||
|
hdrs = ["oauth2_utils.h"], |
||||||
|
deps = ["//:grpc"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "auth_context_test", |
||||||
|
srcs = ["auth_context_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "b64_test", |
||||||
|
srcs = ["b64_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "credentials_test", |
||||||
|
srcs = ["credentials_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "secure_endpoint_test", |
||||||
|
srcs = ["secure_endpoint_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/iomgr:endpoint_tests"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "security_connector_test", |
||||||
|
srcs = ["security_connector_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_binary( |
||||||
|
name = "create_jwt", |
||||||
|
srcs = ["create_jwt.c"], |
||||||
|
deps = ["//:grpc", "//:gpr"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_binary( |
||||||
|
name = "fetch_oauth2", |
||||||
|
srcs = ["fetch_oauth2.c"], |
||||||
|
deps = ["//:grpc", "//:gpr", ":oauth2_utils"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_binary( |
||||||
|
name = "verify_jwt", |
||||||
|
srcs = ["verify_jwt.c"], |
||||||
|
deps = ["//:grpc", "//:gpr"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
@ -0,0 +1,54 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
|
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") |
||||||
|
|
||||||
|
grpc_fuzzer( |
||||||
|
name = "percent_decode_fuzzer", |
||||||
|
srcs = ["percent_decode_fuzzer.c"], |
||||||
|
deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], |
||||||
|
corpus = "response_corpus", |
||||||
|
copts = ["-std=c99"], |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "percent_encoding_test", |
||||||
|
srcs = ["percent_encoding_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "slice_buffer_test", |
||||||
|
srcs = ["slice_string_helpers_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
@ -0,0 +1,72 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "bdp_estimator_test", |
||||||
|
srcs = ["bdp_estimator_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "connectivity_state_test", |
||||||
|
srcs = ["connectivity_state_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "metadata_test", |
||||||
|
srcs = ["metadata_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "pid_controller_test", |
||||||
|
srcs = ["pid_controller_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "status_conversion_test", |
||||||
|
srcs = ["status_conversion_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "timeout_encoding_test", |
||||||
|
srcs = ["timeout_encoding_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
@ -0,0 +1,37 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "transport_security_test", |
||||||
|
srcs = ["transport_security_test.c"], |
||||||
|
deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], |
||||||
|
copts = ['-std=c99'] |
||||||
|
) |
@ -0,0 +1,36 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
|
cc_test( |
||||||
|
name = "alarm_cpp_test", |
||||||
|
srcs = ["alarm_cpp_test.cc"], |
||||||
|
deps = ["//:grpc++", "//external:gtest", "//test/core/util:gpr_test_util"], |
||||||
|
) |
@ -0,0 +1,323 @@ |
|||||||
|
/*
|
||||||
|
* |
||||||
|
* 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 <memory> |
||||||
|
#include <mutex> |
||||||
|
#include <thread> |
||||||
|
#include <vector> |
||||||
|
|
||||||
|
#include <grpc++/channel.h> |
||||||
|
#include <grpc++/client_context.h> |
||||||
|
#include <grpc++/create_channel.h> |
||||||
|
#include <grpc++/ext/health_check_service_server_builder_option.h> |
||||||
|
#include <grpc++/health_check_service_interface.h> |
||||||
|
#include <grpc++/server.h> |
||||||
|
#include <grpc++/server_builder.h> |
||||||
|
#include <grpc++/server_context.h> |
||||||
|
#include <grpc/grpc.h> |
||||||
|
#include <grpc/support/log.h> |
||||||
|
#include <gtest/gtest.h> |
||||||
|
|
||||||
|
#include "src/proto/grpc/health/v1/health.grpc.pb.h" |
||||||
|
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" |
||||||
|
#include "src/proto/grpc/testing/echo.grpc.pb.h" |
||||||
|
#include "test/core/util/port.h" |
||||||
|
#include "test/core/util/test_config.h" |
||||||
|
#include "test/cpp/end2end/test_service_impl.h" |
||||||
|
|
||||||
|
using grpc::health::v1::Health; |
||||||
|
using grpc::health::v1::HealthCheckRequest; |
||||||
|
using grpc::health::v1::HealthCheckResponse; |
||||||
|
|
||||||
|
namespace grpc { |
||||||
|
namespace testing { |
||||||
|
namespace { |
||||||
|
|
||||||
|
// A sample sync implementation of the health checking service. This does the
|
||||||
|
// same thing as the default one.
|
||||||
|
class HealthCheckServiceImpl : public ::grpc::health::v1::Health::Service { |
||||||
|
public: |
||||||
|
Status Check(ServerContext* context, const HealthCheckRequest* request, |
||||||
|
HealthCheckResponse* response) override { |
||||||
|
std::lock_guard<std::mutex> lock(mu_); |
||||||
|
auto iter = status_map_.find(request->service()); |
||||||
|
if (iter == status_map_.end()) { |
||||||
|
return Status(StatusCode::NOT_FOUND, ""); |
||||||
|
} |
||||||
|
response->set_status(iter->second); |
||||||
|
return Status::OK; |
||||||
|
} |
||||||
|
|
||||||
|
void SetStatus(const grpc::string& service_name, |
||||||
|
HealthCheckResponse::ServingStatus status) { |
||||||
|
std::lock_guard<std::mutex> lock(mu_); |
||||||
|
status_map_[service_name] = status; |
||||||
|
} |
||||||
|
|
||||||
|
void SetAll(HealthCheckResponse::ServingStatus status) { |
||||||
|
std::lock_guard<std::mutex> lock(mu_); |
||||||
|
for (auto iter = status_map_.begin(); iter != status_map_.end(); ++iter) { |
||||||
|
iter->second = status; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private: |
||||||
|
std::mutex mu_; |
||||||
|
std::map<const grpc::string, HealthCheckResponse::ServingStatus> status_map_; |
||||||
|
}; |
||||||
|
|
||||||
|
// A custom implementation of the health checking service interface. This is
|
||||||
|
// used to test that it prevents the server from creating a default service and
|
||||||
|
// also serves as an example of how to override the default service.
|
||||||
|
class CustomHealthCheckService : public HealthCheckServiceInterface { |
||||||
|
public: |
||||||
|
explicit CustomHealthCheckService(HealthCheckServiceImpl* impl) |
||||||
|
: impl_(impl) { |
||||||
|
impl_->SetStatus("", HealthCheckResponse::SERVING); |
||||||
|
} |
||||||
|
void SetServingStatus(const grpc::string& service_name, |
||||||
|
bool serving) override { |
||||||
|
impl_->SetStatus(service_name, serving ? HealthCheckResponse::SERVING |
||||||
|
: HealthCheckResponse::NOT_SERVING); |
||||||
|
} |
||||||
|
|
||||||
|
void SetServingStatus(bool serving) override { |
||||||
|
impl_->SetAll(serving ? HealthCheckResponse::SERVING |
||||||
|
: HealthCheckResponse::NOT_SERVING); |
||||||
|
} |
||||||
|
|
||||||
|
private: |
||||||
|
HealthCheckServiceImpl* impl_; // not owned
|
||||||
|
}; |
||||||
|
|
||||||
|
void LoopCompletionQueue(ServerCompletionQueue* cq) { |
||||||
|
void* tag; |
||||||
|
bool ok; |
||||||
|
while (cq->Next(&tag, &ok)) { |
||||||
|
abort(); // Nothing should come out of the cq.
|
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
class HealthServiceEnd2endTest : public ::testing::Test { |
||||||
|
protected: |
||||||
|
HealthServiceEnd2endTest() {} |
||||||
|
|
||||||
|
void SetUpServer(bool register_sync_test_service, bool add_async_cq, |
||||||
|
bool explicit_health_service, |
||||||
|
std::unique_ptr<HealthCheckServiceInterface> service) { |
||||||
|
int port = grpc_pick_unused_port_or_die(); |
||||||
|
server_address_ << "localhost:" << port; |
||||||
|
|
||||||
|
bool register_sync_health_service_impl = |
||||||
|
explicit_health_service && service != nullptr; |
||||||
|
|
||||||
|
// Setup server
|
||||||
|
ServerBuilder builder; |
||||||
|
if (explicit_health_service) { |
||||||
|
std::unique_ptr<ServerBuilderOption> option( |
||||||
|
new HealthCheckServiceServerBuilderOption(std::move(service))); |
||||||
|
builder.SetOption(std::move(option)); |
||||||
|
} |
||||||
|
builder.AddListeningPort(server_address_.str(), |
||||||
|
grpc::InsecureServerCredentials()); |
||||||
|
if (register_sync_test_service) { |
||||||
|
// Register a sync service.
|
||||||
|
builder.RegisterService(&echo_test_service_); |
||||||
|
} |
||||||
|
if (register_sync_health_service_impl) { |
||||||
|
builder.RegisterService(&health_check_service_impl_); |
||||||
|
} |
||||||
|
if (add_async_cq) { |
||||||
|
cq_ = builder.AddCompletionQueue(); |
||||||
|
} |
||||||
|
server_ = builder.BuildAndStart(); |
||||||
|
} |
||||||
|
|
||||||
|
void TearDown() override { |
||||||
|
if (server_) { |
||||||
|
server_->Shutdown(); |
||||||
|
if (cq_ != nullptr) { |
||||||
|
cq_->Shutdown(); |
||||||
|
} |
||||||
|
if (cq_thread_.joinable()) { |
||||||
|
cq_thread_.join(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void ResetStubs() { |
||||||
|
std::shared_ptr<Channel> channel = |
||||||
|
CreateChannel(server_address_.str(), InsecureChannelCredentials()); |
||||||
|
hc_stub_ = grpc::health::v1::Health::NewStub(channel); |
||||||
|
} |
||||||
|
|
||||||
|
// When the expected_status is NOT OK, we do not care about the response.
|
||||||
|
void SendHealthCheckRpc(const grpc::string& service_name, |
||||||
|
const Status& expected_status) { |
||||||
|
EXPECT_FALSE(expected_status.ok()); |
||||||
|
SendHealthCheckRpc(service_name, expected_status, |
||||||
|
HealthCheckResponse::UNKNOWN); |
||||||
|
} |
||||||
|
|
||||||
|
void SendHealthCheckRpc( |
||||||
|
const grpc::string& service_name, const Status& expected_status, |
||||||
|
HealthCheckResponse::ServingStatus expected_serving_status) { |
||||||
|
HealthCheckRequest request; |
||||||
|
request.set_service(service_name); |
||||||
|
HealthCheckResponse response; |
||||||
|
ClientContext context; |
||||||
|
Status s = hc_stub_->Check(&context, request, &response); |
||||||
|
EXPECT_EQ(expected_status.error_code(), s.error_code()); |
||||||
|
if (s.ok()) { |
||||||
|
EXPECT_EQ(expected_serving_status, response.status()); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void VerifyHealthCheckService() { |
||||||
|
HealthCheckServiceInterface* service = server_->GetHealthCheckService(); |
||||||
|
EXPECT_TRUE(service != nullptr); |
||||||
|
const grpc::string kHealthyService("healthy_service"); |
||||||
|
const grpc::string kUnhealthyService("unhealthy_service"); |
||||||
|
const grpc::string kNotRegisteredService("not_registered"); |
||||||
|
service->SetServingStatus(kHealthyService, true); |
||||||
|
service->SetServingStatus(kUnhealthyService, false); |
||||||
|
|
||||||
|
ResetStubs(); |
||||||
|
|
||||||
|
SendHealthCheckRpc("", Status::OK, HealthCheckResponse::SERVING); |
||||||
|
SendHealthCheckRpc(kHealthyService, Status::OK, |
||||||
|
HealthCheckResponse::SERVING); |
||||||
|
SendHealthCheckRpc(kUnhealthyService, Status::OK, |
||||||
|
HealthCheckResponse::NOT_SERVING); |
||||||
|
SendHealthCheckRpc(kNotRegisteredService, |
||||||
|
Status(StatusCode::NOT_FOUND, "")); |
||||||
|
|
||||||
|
service->SetServingStatus(false); |
||||||
|
SendHealthCheckRpc("", Status::OK, HealthCheckResponse::NOT_SERVING); |
||||||
|
SendHealthCheckRpc(kHealthyService, Status::OK, |
||||||
|
HealthCheckResponse::NOT_SERVING); |
||||||
|
SendHealthCheckRpc(kUnhealthyService, Status::OK, |
||||||
|
HealthCheckResponse::NOT_SERVING); |
||||||
|
SendHealthCheckRpc(kNotRegisteredService, |
||||||
|
Status(StatusCode::NOT_FOUND, "")); |
||||||
|
} |
||||||
|
|
||||||
|
TestServiceImpl echo_test_service_; |
||||||
|
HealthCheckServiceImpl health_check_service_impl_; |
||||||
|
std::unique_ptr<Health::Stub> hc_stub_; |
||||||
|
std::unique_ptr<ServerCompletionQueue> cq_; |
||||||
|
std::unique_ptr<Server> server_; |
||||||
|
std::ostringstream server_address_; |
||||||
|
std::thread cq_thread_; |
||||||
|
}; |
||||||
|
|
||||||
|
TEST_F(HealthServiceEnd2endTest, DefaultHealthServiceDisabled) { |
||||||
|
EnableDefaultHealthCheckService(false); |
||||||
|
EXPECT_FALSE(DefaultHealthCheckServiceEnabled()); |
||||||
|
SetUpServer(true, false, false, nullptr); |
||||||
|
HealthCheckServiceInterface* default_service = |
||||||
|
server_->GetHealthCheckService(); |
||||||
|
EXPECT_TRUE(default_service == nullptr); |
||||||
|
|
||||||
|
ResetStubs(); |
||||||
|
|
||||||
|
SendHealthCheckRpc("", Status(StatusCode::UNIMPLEMENTED, "")); |
||||||
|
} |
||||||
|
|
||||||
|
TEST_F(HealthServiceEnd2endTest, DefaultHealthService) { |
||||||
|
EnableDefaultHealthCheckService(true); |
||||||
|
EXPECT_TRUE(DefaultHealthCheckServiceEnabled()); |
||||||
|
SetUpServer(true, false, false, nullptr); |
||||||
|
VerifyHealthCheckService(); |
||||||
|
|
||||||
|
// The default service has a size limit of the service name.
|
||||||
|
const grpc::string kTooLongServiceName(201, 'x'); |
||||||
|
SendHealthCheckRpc(kTooLongServiceName, |
||||||
|
Status(StatusCode::INVALID_ARGUMENT, "")); |
||||||
|
} |
||||||
|
|
||||||
|
// The server has no sync service.
|
||||||
|
TEST_F(HealthServiceEnd2endTest, DefaultHealthServiceAsyncOnly) { |
||||||
|
EnableDefaultHealthCheckService(true); |
||||||
|
EXPECT_TRUE(DefaultHealthCheckServiceEnabled()); |
||||||
|
SetUpServer(false, true, false, nullptr); |
||||||
|
cq_thread_ = std::thread(LoopCompletionQueue, cq_.get()); |
||||||
|
|
||||||
|
HealthCheckServiceInterface* default_service = |
||||||
|
server_->GetHealthCheckService(); |
||||||
|
EXPECT_TRUE(default_service == nullptr); |
||||||
|
|
||||||
|
ResetStubs(); |
||||||
|
|
||||||
|
SendHealthCheckRpc("", Status(StatusCode::UNIMPLEMENTED, "")); |
||||||
|
} |
||||||
|
|
||||||
|
// Provide an empty service to disable the default service.
|
||||||
|
TEST_F(HealthServiceEnd2endTest, ExplicitlyDisableViaOverride) { |
||||||
|
EnableDefaultHealthCheckService(true); |
||||||
|
EXPECT_TRUE(DefaultHealthCheckServiceEnabled()); |
||||||
|
std::unique_ptr<HealthCheckServiceInterface> empty_service; |
||||||
|
SetUpServer(true, false, true, std::move(empty_service)); |
||||||
|
HealthCheckServiceInterface* service = server_->GetHealthCheckService(); |
||||||
|
EXPECT_TRUE(service == nullptr); |
||||||
|
|
||||||
|
ResetStubs(); |
||||||
|
|
||||||
|
SendHealthCheckRpc("", Status(StatusCode::UNIMPLEMENTED, "")); |
||||||
|
} |
||||||
|
|
||||||
|
// Provide an explicit override of health checking service interface.
|
||||||
|
TEST_F(HealthServiceEnd2endTest, ExplicitlyOverride) { |
||||||
|
EnableDefaultHealthCheckService(true); |
||||||
|
EXPECT_TRUE(DefaultHealthCheckServiceEnabled()); |
||||||
|
std::unique_ptr<HealthCheckServiceInterface> override_service( |
||||||
|
new CustomHealthCheckService(&health_check_service_impl_)); |
||||||
|
HealthCheckServiceInterface* underlying_service = override_service.get(); |
||||||
|
SetUpServer(false, false, true, std::move(override_service)); |
||||||
|
HealthCheckServiceInterface* service = server_->GetHealthCheckService(); |
||||||
|
EXPECT_TRUE(service == underlying_service); |
||||||
|
|
||||||
|
ResetStubs(); |
||||||
|
|
||||||
|
VerifyHealthCheckService(); |
||||||
|
} |
||||||
|
|
||||||
|
} // namespace
|
||||||
|
} // namespace testing
|
||||||
|
} // namespace grpc
|
||||||
|
|
||||||
|
int main(int argc, char** argv) { |
||||||
|
grpc_test_init(argc, argv); |
||||||
|
::testing::InitGoogleTest(&argc, argv); |
||||||
|
return RUN_ALL_TESTS(); |
||||||
|
} |
@ -0,0 +1,63 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
licenses(["notice"]) # 3-clause BSD |
||||||
|
|
||||||
|
cc_library( |
||||||
|
name = "test_config", |
||||||
|
srcs = [ |
||||||
|
"test_config_cc.cc", |
||||||
|
], |
||||||
|
hdrs = [ |
||||||
|
"test_config.h", |
||||||
|
], |
||||||
|
deps = ["//:gpr"], |
||||||
|
visibility = ["//test:__subpackages__"], |
||||||
|
) |
||||||
|
|
||||||
|
cc_library( |
||||||
|
name = "test_util", |
||||||
|
srcs = [ |
||||||
|
# "test/cpp/end2end/test_service_impl.cc", |
||||||
|
"byte_buffer_proto_helper.cc", |
||||||
|
"create_test_channel.cc", |
||||||
|
"string_ref_helper.cc", |
||||||
|
"subprocess.cc", |
||||||
|
"test_credentials_provider.cc", |
||||||
|
], |
||||||
|
hdrs = [ |
||||||
|
"byte_buffer_proto_helper.h", |
||||||
|
"create_test_channel.h", |
||||||
|
"string_ref_helper.h", |
||||||
|
"subprocess.h", |
||||||
|
"test_credentials_provider.h", |
||||||
|
], |
||||||
|
deps = ["//test/core/util:gpr_test_util", "//:grpc++", "//test/core/end2end:ssl_test_data"], |
||||||
|
visibility = ["//test:__subpackages__"], |
||||||
|
) |
@ -0,0 +1,14 @@ |
|||||||
|
cc_library( |
||||||
|
name = "gtest", |
||||||
|
srcs = [ |
||||||
|
"src/gtest-all.cc", |
||||||
|
], |
||||||
|
hdrs = glob(["include/**/*.h", "src/*.cc", "src/*.h"]), |
||||||
|
includes = [ |
||||||
|
"include", "." |
||||||
|
], |
||||||
|
linkstatic = 1, |
||||||
|
visibility = [ |
||||||
|
"//visibility:public", |
||||||
|
], |
||||||
|
) |
@ -0,0 +1,40 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
# Config file for the internal CI (in protobuf text format) |
||||||
|
|
||||||
|
# Location of the continuous shell script in repository. |
||||||
|
build_file: "grpc/tools/internal_ci/linux/grpc_interop_badserver_python.sh" |
||||||
|
# grpc_interop tests can take 6+ hours to complete. |
||||||
|
timeout_mins: 480 |
||||||
|
action { |
||||||
|
define_artifacts { |
||||||
|
regex: "**/report.xml" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,41 @@ |
|||||||
|
#!/usr/bin/env bash |
||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
set -ex |
||||||
|
|
||||||
|
export LANG=en_US.UTF-8 |
||||||
|
|
||||||
|
# Enter the gRPC repo root |
||||||
|
cd $(dirname $0)/../../.. |
||||||
|
|
||||||
|
git submodule update --init |
||||||
|
|
||||||
|
tools/run_tests/run_interop_tests.py -l python --use_docker --http2_badserver_interop $@ |
||||||
|
|
@ -0,0 +1,40 @@ |
|||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
# Config file for the internal CI (in protobuf text format) |
||||||
|
|
||||||
|
# Location of the continuous shell script in repository. |
||||||
|
build_file: "grpc/tools/internal_ci/linux/grpc_interop_tocloud.sh" |
||||||
|
# grpc_interop tests can take 6+ hours to complete. |
||||||
|
timeout_mins: 480 |
||||||
|
action { |
||||||
|
define_artifacts { |
||||||
|
regex: "**/report.xml" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,40 @@ |
|||||||
|
#!/usr/bin/env bash |
||||||
|
# Copyright 2017, 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. |
||||||
|
|
||||||
|
set -ex |
||||||
|
|
||||||
|
export LANG=en_US.UTF-8 |
||||||
|
|
||||||
|
# Enter the gRPC repo root |
||||||
|
cd $(dirname $0)/../../.. |
||||||
|
|
||||||
|
git submodule update --init |
||||||
|
|
||||||
|
tools/run_tests/run_interop_tests.py -l all -s all --use_docker --http2_interop -t -j 12 $@ |
@ -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\cpp\end2end\health_service_end2end_test.cc"> |
||||||
|
<Filter>test\cpp\end2end</Filter> |
||||||
|
</ClCompile> |
||||||
|
</ItemGroup> |
||||||
|
|
||||||
|
<ItemGroup> |
||||||
|
<Filter Include="test"> |
||||||
|
<UniqueIdentifier>{00d750b2-db02-2106-d9b7-1d3b2ca58604}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="test\cpp"> |
||||||
|
<UniqueIdentifier>{02e29b2f-d68a-4474-8483-621ecfd7fa9d}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
<Filter Include="test\cpp\end2end"> |
||||||
|
<UniqueIdentifier>{b0de697a-d73a-23e1-c9af-fa0edf011d4d}</UniqueIdentifier> |
||||||
|
</Filter> |
||||||
|
</ItemGroup> |
||||||
|
</Project> |
||||||
|
|
@ -1,21 +0,0 @@ |
|||||||
<?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\internal_api_canaries\iomgr.c"> |
|
||||||
<Filter>test\core\internal_api_canaries</Filter> |
|
||||||
</ClCompile> |
|
||||||
</ItemGroup> |
|
||||||
|
|
||||||
<ItemGroup> |
|
||||||
<Filter Include="test"> |
|
||||||
<UniqueIdentifier>{881986d1-d1fe-b377-cf26-b3377af95009}</UniqueIdentifier> |
|
||||||
</Filter> |
|
||||||
<Filter Include="test\core"> |
|
||||||
<UniqueIdentifier>{4f9a544e-5680-18ee-30d7-38179bf82cee}</UniqueIdentifier> |
|
||||||
</Filter> |
|
||||||
<Filter Include="test\core\internal_api_canaries"> |
|
||||||
<UniqueIdentifier>{6ab29f78-ec9d-d63a-8e8f-0d7552b3edd4}</UniqueIdentifier> |
|
||||||
</Filter> |
|
||||||
</ItemGroup> |
|
||||||
</Project> |
|
||||||
|
|
@ -1,199 +0,0 @@ |
|||||||
<?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>{D53575C6-713C-E6E3-FD74-E65F20916498}</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>internal_api_canary_support_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>internal_api_canary_support_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\internal_api_canaries\iomgr.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> |
|
||||||
|
|
@ -1,21 +0,0 @@ |
|||||||
<?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\internal_api_canaries\iomgr.c"> |
|
||||||
<Filter>test\core\internal_api_canaries</Filter> |
|
||||||
</ClCompile> |
|
||||||
</ItemGroup> |
|
||||||
|
|
||||||
<ItemGroup> |
|
||||||
<Filter Include="test"> |
|
||||||
<UniqueIdentifier>{a6c31cba-af9d-78ea-8980-8b77c9fc4485}</UniqueIdentifier> |
|
||||||
</Filter> |
|
||||||
<Filter Include="test\core"> |
|
||||||
<UniqueIdentifier>{d84283b8-4529-6c09-18bf-20a69f14f7ab}</UniqueIdentifier> |
|
||||||
</Filter> |
|
||||||
<Filter Include="test\core\internal_api_canaries"> |
|
||||||
<UniqueIdentifier>{ea379f93-9285-7180-0d69-24a56da2b201}</UniqueIdentifier> |
|
||||||
</Filter> |
|
||||||
</ItemGroup> |
|
||||||
</Project> |
|
||||||
|
|
@ -1,199 +0,0 @@ |
|||||||
<?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>{ED24E700-964E-B426-6A6A-1944E2EF7BCB}</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>internal_api_canary_transport_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>internal_api_canary_transport_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\internal_api_canaries\iomgr.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> |
|
||||||
|
|
@ -1,21 +0,0 @@ |
|||||||
<?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\internal_api_canaries\iomgr.c"> |
|
||||||
<Filter>test\core\internal_api_canaries</Filter> |
|
||||||
</ClCompile> |
|
||||||
</ItemGroup> |
|
||||||
|
|
||||||
<ItemGroup> |
|
||||||
<Filter Include="test"> |
|
||||||
<UniqueIdentifier>{38e59e26-aad9-60fd-a1a7-c8fd9b606e2f}</UniqueIdentifier> |
|
||||||
</Filter> |
|
||||||
<Filter Include="test\core"> |
|
||||||
<UniqueIdentifier>{79aad60f-59b8-09e2-2cad-5b5e083ac008}</UniqueIdentifier> |
|
||||||
</Filter> |
|
||||||
<Filter Include="test\core\internal_api_canaries"> |
|
||||||
<UniqueIdentifier>{e4f0214e-e3ec-b5b8-c00b-2932b5ec2422}</UniqueIdentifier> |
|
||||||
</Filter> |
|
||||||
</ItemGroup> |
|
||||||
</Project> |
|
||||||
|
|
Loading…
Reference in new issue