Merge github.com:grpc/grpc into fuzzy

pull/12769/head
Craig Tiller 7 years ago
commit 48120c5b3c
  1. 6
      BUILD
  2. 2
      CMakeLists.txt
  3. 6
      Makefile
  4. 1
      binding.gyp
  5. 6
      build.yaml
  6. 1
      doc/g_stands_for.md
  7. 2
      examples/node/dynamic_codegen/greeter_server.js
  8. 13
      gRPC-Core.podspec
  9. 2
      gRPC-ProtoRPC.podspec
  10. 2
      gRPC-RxLibrary.podspec
  11. 2
      gRPC.podspec
  12. 1
      grpc.gyp
  13. 2
      include/grpc/grpc.h
  14. 63
      include/grpc/module.modulemap
  15. 2
      package.json
  16. 4
      package.xml
  17. 2
      src/core/lib/iomgr/tcp_client_uv.c
  18. 2
      src/core/lib/surface/version.c
  19. 2
      src/cpp/client/secure_credentials.h
  20. 2
      src/cpp/common/version_cc.cc
  21. 2
      src/csharp/Grpc.Core/Version.csproj.include
  22. 4
      src/csharp/Grpc.Core/VersionInfo.cs
  23. 2
      src/csharp/build_packages_dotnetcli.bat
  24. 4
      src/csharp/build_packages_dotnetcli.sh
  25. 4
      src/node/health_check/package.json
  26. 2
      src/node/tools/package.json
  27. 2
      src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
  28. 2
      src/objective-c/GRPCClient/private/version.h
  29. 2
      src/php/composer.json
  30. 2
      src/php/ext/grpc/version.h
  31. 2
      src/python/grpcio/grpc/_grpcio_metadata.py
  32. 2
      src/python/grpcio/grpc_version.py
  33. 2
      src/python/grpcio_health_checking/grpc_version.py
  34. 2
      src/python/grpcio_reflection/grpc_version.py
  35. 2
      src/python/grpcio_testing/grpc_version.py
  36. 2
      src/python/grpcio_tests/grpc_version.py
  37. 2
      src/ruby/lib/grpc/version.rb
  38. 16
      src/ruby/qps/proxy-worker.rb
  39. 2
      src/ruby/tools/version.rb
  40. 10
      templates/gRPC-Core.podspec.template
  41. 32
      templates/include/grpc/module.modulemap.template
  42. 1
      templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template
  43. 2
      test/core/end2end/tests/compressed_payload.c
  44. 2
      test/core/end2end/tests/stream_compression_compressed_payload.c
  45. 125
      test/cpp/util/grpc_tool.cc
  46. 55
      test/cpp/util/grpc_tool_test.cc
  47. 17
      tools/distrib/build_ruby_environment_macos.sh
  48. 80
      tools/distrib/pull_requests_interval.sh
  49. 2
      tools/distrib/python/grpcio_tools/grpc_version.py
  50. 18
      tools/dockerfile/test/multilang_jessie_x64/Dockerfile
  51. 2
      tools/doxygen/Doxyfile.c++
  52. 2
      tools/doxygen/Doxyfile.c++.internal
  53. 4
      tools/internal_ci/helper_scripts/prepare_build_macos_rc
  54. 24
      tools/internal_ci/linux/grpc_coverage.cfg
  55. 30
      tools/internal_ci/linux/grpc_coverage.sh
  56. 3
      tools/internal_ci/macos/grpc_build_artifacts.sh
  57. 3
      tools/internal_ci/macos/grpc_run_tests_matrix.sh
  58. 16
      tools/interop_matrix/README.md
  59. 2
      tools/jenkins/run_full_performance.sh
  60. 16
      tools/profiling/microbenchmarks/bm_diff/bm_main.py
  61. 9
      tools/profiling/microbenchmarks/bm_diff/bm_run.py
  62. 11
      tools/run_tests/performance/run_worker_php.sh
  63. 20
      tools/run_tests/performance/scenario_config.py
  64. 4
      tools/run_tests/run_tests.py

@ -34,11 +34,11 @@ load(
)
# This should be updated along with build.yaml
g_stands_for = "gambit"
g_stands_for = "generous"
core_version = "4.0.0-dev"
core_version = "5.0.0-dev"
version = "1.7.0-dev"
version = "1.8.0-dev"
GPR_PUBLIC_HDRS = [
"include/grpc/support/alloc.h",

@ -24,7 +24,7 @@
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "grpc")
set(PACKAGE_VERSION "1.7.0-dev")
set(PACKAGE_VERSION "1.8.0-dev")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")

@ -187,7 +187,7 @@ CXX_gcov = g++
LD_gcov = gcc
LDXX_gcov = g++
CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage -Wno-return-type
LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic
LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic -lstdc++
DEFINES_gcov = _DEBUG DEBUG GPR_GCOV
VALID_CONFIG_memcheck = 1
@ -411,8 +411,8 @@ Q = @
endif
CORE_VERSION = 5.0.0-dev
CPP_VERSION = 1.7.0-dev
CSHARP_VERSION = 1.7.0-dev
CPP_VERSION = 1.8.0-dev
CSHARP_VERSION = 1.8.0-dev
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)

@ -101,6 +101,7 @@
'-fprofile-arcs',
'-ftest-coverage',
'-rdynamic',
'-lstdc++',
],
}],
['grpc_alpine=="true"', {

@ -13,8 +13,8 @@ settings:
'#09': Per-language overrides are possible with (eg) ruby_version tag here
'#10': See the expand_version.py for all the quirks here
core_version: 5.0.0-dev
g_stands_for: gambit
version: 1.7.0-dev
g_stands_for: generous
version: 1.8.0-dev
filegroups:
- name: census
public_headers:
@ -4784,7 +4784,7 @@ configs:
CXX: g++
DEFINES: _DEBUG DEBUG GPR_GCOV
LD: gcc
LDFLAGS: -fprofile-arcs -ftest-coverage -rdynamic
LDFLAGS: -fprofile-arcs -ftest-coverage -rdynamic -lstdc++
LDXX: g++
helgrind:
CPPFLAGS: -O0

@ -11,3 +11,4 @@ future), and the corresponding version numbers that used them:
- 1.4 'g' stands for 'gregarious'
- 1.6 'g' stands for 'garcia'
- 1.7 'g' stands for 'gambit'
- 1.8 'g' stands for 'generous'

@ -34,7 +34,7 @@ function sayHello(call, callback) {
*/
function main() {
var server = new grpc.Server();
server.addProtoService(hello_proto.Greeter.service, {sayHello: sayHello});
server.addService(hello_proto.Greeter.service, {sayHello: sayHello});
server.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure());
server.start();
}

@ -22,7 +22,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-Core'
version = '1.7.0-dev'
version = '1.8.0-dev'
s.version = version
s.summary = 'Core cross-platform gRPC library, written in C'
s.homepage = 'https://grpc.io'
@ -105,8 +105,6 @@ Pod::Spec.new do |s|
ss.source_files = 'include/grpc/support/alloc.h',
'include/grpc/support/atm.h',
'include/grpc/support/atm_gcc_atomic.h',
'include/grpc/support/atm_gcc_sync.h',
'include/grpc/support/atm_windows.h',
'include/grpc/support/avl.h',
'include/grpc/support/cmdline.h',
'include/grpc/support/cpu.h',
@ -121,18 +119,13 @@ Pod::Spec.new do |s|
'include/grpc/support/sync_custom.h',
'include/grpc/support/sync_generic.h',
'include/grpc/support/sync_posix.h',
'include/grpc/support/sync_windows.h',
'include/grpc/support/thd.h',
'include/grpc/support/time.h',
'include/grpc/support/tls.h',
'include/grpc/support/tls_gcc.h',
'include/grpc/support/tls_msvc.h',
'include/grpc/support/tls_pthread.h',
'include/grpc/support/useful.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/gpr_slice.h',
'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h',
@ -140,7 +133,6 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/sync_custom.h',
'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/impl/codegen/byte_buffer.h',
'include/grpc/impl/codegen/byte_buffer_reader.h',
'include/grpc/impl/codegen/compression_types.h',
@ -152,8 +144,6 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/status.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/gpr_slice.h',
'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h',
@ -161,7 +151,6 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/sync_custom.h',
'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/grpc_security.h',
'include/grpc/byte_buffer.h',
'include/grpc/byte_buffer_reader.h',

@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-ProtoRPC'
version = '1.7.0-dev'
version = '1.8.0-dev'
s.version = version
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
s.homepage = 'https://grpc.io'

@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-RxLibrary'
version = '1.7.0-dev'
version = '1.8.0-dev'
s.version = version
s.summary = 'Reactive Extensions library for iOS/OSX.'
s.homepage = 'https://grpc.io'

@ -20,7 +20,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC'
version = '1.7.0-dev'
version = '1.8.0-dev'
s.version = version
s.summary = 'gRPC client library for iOS/OSX'
s.homepage = 'https://grpc.io'

@ -98,6 +98,7 @@
'-fprofile-arcs',
'-ftest-coverage',
'-rdynamic',
'-lstdc++',
],
}],
['grpc_alpine=="true"', {

@ -313,7 +313,7 @@ GRPCAPI grpc_call_error grpc_call_cancel_with_status(grpc_call *call,
void *reserved);
/** Ref a call.
THREAD SAFETY: grpc_call_unref is thread-compatible */
THREAD SAFETY: grpc_call_ref is thread-compatible */
GRPCAPI void grpc_call_ref(grpc_call *call);
/** Unref a call.

@ -1,12 +1,69 @@
framework module grpc {
umbrella header "grpc.h"
header "byte_buffer_reader.h"
header "grpc_security.h"
header "grpc_security_constants.h"
header "support/alloc.h"
header "support/atm.h"
header "support/atm_gcc_atomic.h"
header "support/avl.h"
header "support/cmdline.h"
header "support/cpu.h"
header "support/histogram.h"
header "support/host_port.h"
header "support/log.h"
header "support/log_windows.h"
header "support/port_platform.h"
header "support/string_util.h"
header "support/subprocess.h"
header "support/sync.h"
header "support/sync_custom.h"
header "support/sync_generic.h"
header "support/sync_posix.h"
header "support/thd.h"
header "support/time.h"
header "support/tls.h"
header "support/tls_pthread.h"
header "support/useful.h"
header "impl/codegen/atm.h"
header "impl/codegen/atm_gcc_atomic.h"
header "impl/codegen/gpr_slice.h"
header "impl/codegen/gpr_types.h"
header "impl/codegen/port_platform.h"
header "impl/codegen/sync.h"
header "impl/codegen/sync_custom.h"
header "impl/codegen/sync_generic.h"
header "impl/codegen/sync_posix.h"
header "impl/codegen/byte_buffer.h"
header "impl/codegen/byte_buffer_reader.h"
header "impl/codegen/compression_types.h"
header "impl/codegen/connectivity_state.h"
header "impl/codegen/exec_ctx_fwd.h"
header "impl/codegen/grpc_types.h"
header "impl/codegen/propagation_bits.h"
header "impl/codegen/slice.h"
header "impl/codegen/status.h"
header "impl/codegen/atm.h"
header "impl/codegen/atm_gcc_atomic.h"
header "impl/codegen/gpr_slice.h"
header "impl/codegen/gpr_types.h"
header "impl/codegen/port_platform.h"
header "impl/codegen/sync.h"
header "impl/codegen/sync_custom.h"
header "impl/codegen/sync_generic.h"
header "impl/codegen/sync_posix.h"
header "grpc_security.h"
header "byte_buffer.h"
header "byte_buffer_reader.h"
header "compression.h"
header "grpc.h"
header "grpc_posix.h"
header "grpc_security_constants.h"
header "load_reporting.h"
header "slice.h"
header "slice_buffer.h"
header "status.h"
header "support/workaround_list.h"
header "census.h"
export *
module * { export * }

@ -1,6 +1,6 @@
{
"name": "grpc",
"version": "1.7.0-dev",
"version": "1.8.0-dev",
"author": "Google Inc.",
"description": "gRPC Library for Node",
"homepage": "https://grpc.io/",

@ -13,8 +13,8 @@
<date>2017-08-24</date>
<time>16:06:07</time>
<version>
<release>1.7.0dev</release>
<api>1.7.0dev</api>
<release>1.8.0dev</release>
<api>1.8.0dev</api>
</version>
<stability>
<release>beta</release>

@ -145,7 +145,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
connect->resource_quota = resource_quota;
uv_tcp_init(uv_default_loop(), connect->tcp_handle);
connect->connect_req.data = connect;
connect->refs = 1;
connect->refs = 2; // One for the connect operation, one for the timer.
if (GRPC_TRACER_ON(grpc_tcp_trace)) {
gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: asynchronously connecting",

@ -23,4 +23,4 @@
const char *grpc_version_string(void) { return "5.0.0-dev"; }
const char *grpc_g_stands_for(void) { return "gambit"; }
const char *grpc_g_stands_for(void) { return "generous"; }

@ -73,7 +73,7 @@ class MetadataCredentialsPluginWrapper final : private GrpcLibraryCodegen {
grpc_auth_metadata_context context,
grpc_credentials_plugin_metadata_cb cb, void* user_data,
grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
size_t* num_creds_md, grpc_status_code* status,
size_t* num_creds_md, grpc_status_code* status_code,
const char** error_details);
std::unique_ptr<ThreadPoolInterface> thread_pool_;
std::unique_ptr<MetadataCredentialsPlugin> plugin_;

@ -22,5 +22,5 @@
#include <grpc++/grpc++.h>
namespace grpc {
grpc::string Version() { return "1.7.0-dev"; }
grpc::string Version() { return "1.8.0-dev"; }
}

@ -1,7 +1,7 @@
<!-- This file is generated -->
<Project>
<PropertyGroup>
<GrpcCsharpVersion>1.7.0-dev</GrpcCsharpVersion>
<GrpcCsharpVersion>1.8.0-dev</GrpcCsharpVersion>
<GoogleProtobufVersion>3.3.0</GoogleProtobufVersion>
</PropertyGroup>
</Project>

@ -33,11 +33,11 @@ namespace Grpc.Core
/// <summary>
/// Current <c>AssemblyFileVersion</c> of gRPC C# assemblies
/// </summary>
public const string CurrentAssemblyFileVersion = "1.7.0.0";
public const string CurrentAssemblyFileVersion = "1.8.0.0";
/// <summary>
/// Current version of gRPC C#
/// </summary>
public const string CurrentVersion = "1.7.0-dev";
public const string CurrentVersion = "1.8.0-dev";
}
}

@ -13,7 +13,7 @@
@rem limitations under the License.
@rem Current package versions
set VERSION=1.7.0-dev
set VERSION=1.8.0-dev
@rem Adjust the location of nuget.exe
set NUGET=C:\nuget\nuget.exe

@ -39,7 +39,7 @@ dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts
dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts
dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts
nuget pack Grpc.nuspec -Version "1.7.0-dev" -OutputDirectory ../../artifacts
nuget pack Grpc.Tools.nuspec -Version "1.7.0-dev" -OutputDirectory ../../artifacts
nuget pack Grpc.nuspec -Version "1.8.0-dev" -OutputDirectory ../../artifacts
nuget pack Grpc.Tools.nuspec -Version "1.8.0-dev" -OutputDirectory ../../artifacts
(cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg)

@ -1,6 +1,6 @@
{
"name": "grpc-health-check",
"version": "1.7.0-dev",
"version": "1.8.0-dev",
"author": "Google Inc.",
"description": "Health check service for use with gRPC",
"repository": {
@ -15,7 +15,7 @@
}
],
"dependencies": {
"grpc": "^1.7.0-dev",
"grpc": "^1.8.0-dev",
"lodash": "^3.9.3",
"google-protobuf": "^3.0.0"
},

@ -1,6 +1,6 @@
{
"name": "grpc-tools",
"version": "1.7.0-dev",
"version": "1.8.0-dev",
"author": "Google Inc.",
"description": "Tools for developing with gRPC on Node.js",
"homepage": "https://grpc.io/",

@ -42,7 +42,7 @@ Pod::Spec.new do |s|
# exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
# before them.
s.name = '!ProtoCompiler-gRPCPlugin'
v = '1.7.0-dev'
v = '1.8.0-dev'
s.version = v
s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.'
s.description = <<-DESC

@ -23,4 +23,4 @@
// `tools/buildgen/generate_projects.sh`.
#define GRPC_OBJC_VERSION_STRING @"1.7.0-dev"
#define GRPC_OBJC_VERSION_STRING @"1.8.0-dev"

@ -2,7 +2,7 @@
"name": "grpc/grpc-dev",
"description": "gRPC library for PHP - for Developement use only",
"license": "Apache-2.0",
"version": "1.7.0",
"version": "1.8.0",
"require": {
"php": ">=5.5.0",
"google/protobuf": "^v3.3.0"

@ -20,6 +20,6 @@
#ifndef VERSION_H
#define VERSION_H
#define PHP_GRPC_VERSION "1.7.0dev"
#define PHP_GRPC_VERSION "1.8.0dev"
#endif /* VERSION_H */

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc/_grpcio_metadata.py.template`!!!
__version__ = """1.7.0.dev0"""
__version__ = """1.8.0.dev0"""

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!!
VERSION='1.7.0.dev0'
VERSION='1.8.0.dev0'

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!!
VERSION='1.7.0.dev0'
VERSION='1.8.0.dev0'

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!!
VERSION='1.7.0.dev0'
VERSION='1.8.0.dev0'

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_testing/grpc_version.py.template`!!!
VERSION='1.7.0.dev0'
VERSION='1.8.0.dev0'

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!!
VERSION='1.7.0.dev0'
VERSION='1.8.0.dev0'

@ -14,5 +14,5 @@
# GRPC contains the General RPC module.
module GRPC
VERSION = '1.7.0.dev'
VERSION = '1.8.0.dev'
end

@ -31,8 +31,9 @@ require 'src/proto/grpc/testing/services_services_pb'
require 'src/proto/grpc/testing/proxy-service_services_pb'
class ProxyBenchmarkClientServiceImpl < Grpc::Testing::ProxyClientService::Service
def initialize(port)
def initialize(port, c_ext)
@mytarget = "localhost:" + port.to_s
@use_c_ext = c_ext
end
def setup(config)
@config = config
@ -41,7 +42,13 @@ class ProxyBenchmarkClientServiceImpl < Grpc::Testing::ProxyClientService::Servi
@histogram = Histogram.new(@histres, @histmax)
@start_time = Time.now
# TODO(vjpai): Support multiple client channels by spawning off a PHP client per channel
command = "php -d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/ext/grpc/modules/grpc.so " + File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/client.php " + @mytarget
if @use_c_ext
puts "Use protobuf c extension"
command = "php -d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/vendor/google/protobuf/php/ext/google/protobuf/modules/protobuf.so " + "-d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/ext/grpc/modules/grpc.so " + File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/client.php " + @mytarget
else
puts "Use protobuf php extension"
command = "php -d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/ext/grpc/modules/grpc.so " + File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/client.php " + @mytarget
end
puts "Starting command: " + command
@php_pid = spawn(command)
end
@ -128,6 +135,9 @@ def proxymain
opts.on('--driver_port PORT', '<port>') do |v|
options['driver_port'] = v
end
opts.on("-c", "--[no-]c_proto_ext", "Use protobuf C-extention") do |c|
options[:c_ext] = c
end
end.parse!
# Configure any errors with client or server child threads to surface
@ -136,7 +146,7 @@ def proxymain
s = GRPC::RpcServer.new
port = s.add_http2_port("0.0.0.0:" + options['driver_port'].to_s,
:this_port_is_insecure)
bmc = ProxyBenchmarkClientServiceImpl.new(port)
bmc = ProxyBenchmarkClientServiceImpl.new(port, options[:c_ext])
s.handle(bmc)
s.handle(ProxyWorkerServiceImpl.new(s, bmc))
s.run

@ -14,6 +14,6 @@
module GRPC
module Tools
VERSION = '1.7.0.dev'
VERSION = '1.8.0.dev'
end
end

@ -31,11 +31,19 @@
return [f for f in out if not f.startswith("third_party/nanopb/")]
def grpc_public_headers(libs):
excluded_files = ["include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_windows.h",
"include/grpc/support/sync_windows.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/sync_windows.h"]
out = []
for lib in libs:
if lib.name in ("grpc", "gpr"):
out += lib.get('public_headers', [])
return out
return [f for f in out if not f in excluded_files]
def grpc_private_headers(libs):
out = []

@ -0,0 +1,32 @@
%YAML 1.2
--- |
<%!
def grpc_public_headers_no_dir(libs):
excluded_files = ["include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_windows.h",
"include/grpc/support/sync_windows.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/sync_windows.h"]
out = []
for lib in libs:
if lib.name in ("grpc", "gpr"):
out += lib.get('public_headers', [])
out = [f for f in out if f not in excluded_files]
out = [hdr.split('/', 2)[2] for hdr in out]
return out
def header_lines(files):
return ('\n ').join('header "%s"' % f for f in files)
%>
framework module grpc {
umbrella header "grpc.h"
${header_lines(grpc_public_headers_no_dir(libs))}
export *
module * { export * }
}

@ -19,6 +19,7 @@
<%include file="../../apt_get_basic.include"/>
<%include file="../../gcp_api_libraries.include"/>
<%include file="../../csharp_deps.include"/>
<%include file="../../csharp_dotnetcli_deps.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../node_deps.include"/>
<%include file="../../php_deps.include"/>

@ -193,6 +193,7 @@ static void request_for_disabled_algorithm(
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(101), true);
CQ_EXPECT_COMPLETION(cqv, tag(1), true);
cq_verify(cqv);
op = ops;
@ -221,7 +222,6 @@ static void request_for_disabled_algorithm(
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(103), true);
CQ_EXPECT_COMPLETION(cqv, tag(1), true);
cq_verify(cqv);
/* call was cancelled (closed) ... */

@ -193,6 +193,7 @@ static void request_for_disabled_algorithm(
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(101), true);
CQ_EXPECT_COMPLETION(cqv, tag(1), true);
cq_verify(cqv);
op = ops;
@ -221,7 +222,6 @@ static void request_for_disabled_algorithm(
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(103), true);
CQ_EXPECT_COMPLETION(cqv, tag(1), true);
cq_verify(cqv);
/* call was cancelled (closed) ... */

@ -58,6 +58,11 @@ DEFINE_string(protofiles, "", "Name of the proto file.");
DEFINE_bool(binary_input, false, "Input in binary format");
DEFINE_bool(binary_output, false, "Output in binary format");
DEFINE_string(infile, "", "Input file (default is stdin)");
DEFINE_bool(batch, false,
"Input contains multiple requests. Please do not use this to send "
"more than a few RPCs. gRPC CLI has very different performance "
"characteristics compared with normal RPC calls which make it "
"unsuitable for loadtesting or significant production traffic.");
namespace {
@ -460,12 +465,17 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
return false;
}
if (argc == 3) {
request_text = argv[2];
}
if (parser->IsStreaming(method_name, true /* is_request */)) {
std::istream* input_stream;
std::ifstream input_file;
if (argc == 3) {
request_text = argv[2];
if (FLAGS_batch) {
fprintf(stderr, "Batch mode for streaming RPC is not supported.\n");
return false;
}
std::multimap<grpc::string, grpc::string> client_metadata;
@ -549,8 +559,115 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
}
} else { // parser->IsStreaming(method_name, true /* is_request */)
if (FLAGS_batch) {
if (parser->IsStreaming(method_name, false /* is_request */)) {
fprintf(stderr, "Batch mode for streaming RPC is not supported.\n");
return false;
}
std::istream* input_stream;
std::ifstream input_file;
if (FLAGS_infile.empty()) {
if (isatty(fileno(stdin))) {
print_mode = true;
fprintf(stderr, "reading request messages from stdin...\n");
}
input_stream = &std::cin;
} else {
input_file.open(FLAGS_infile, std::ios::in | std::ios::binary);
input_stream = &input_file;
}
std::multimap<grpc::string, grpc::string> client_metadata;
ParseMetadataFlag(&client_metadata);
if (print_mode) {
PrintMetadata(client_metadata, "Sending client initial metadata:");
}
std::stringstream request_ss;
grpc::string line;
while (!request_text.empty() ||
(!input_stream->eof() && getline(*input_stream, line))) {
if (!request_text.empty()) {
if (FLAGS_binary_input) {
serialized_request_proto = request_text;
request_text.clear();
} else {
serialized_request_proto = parser->GetSerializedProtoFromMethod(
method_name, request_text, true /* is_request */);
request_text.clear();
if (parser->HasError()) {
if (print_mode) {
fprintf(stderr, "Failed to parse request.\n");
}
continue;
}
}
grpc::string serialized_response_proto;
std::multimap<grpc::string_ref, grpc::string_ref>
server_initial_metadata, server_trailing_metadata;
CliCall call(channel, formatted_method_name, client_metadata);
call.Write(serialized_request_proto);
call.WritesDone();
if (!call.Read(&serialized_response_proto,
&server_initial_metadata)) {
fprintf(stderr, "Failed to read response.\n");
}
Status status = call.Finish(&server_trailing_metadata);
if (status.ok()) {
if (print_mode) {
fprintf(stderr, "Rpc succeeded with OK status.\n");
PrintMetadata(server_initial_metadata,
"Received initial metadata from server:");
PrintMetadata(server_trailing_metadata,
"Received trailing metadata from server:");
}
if (FLAGS_binary_output) {
if (!callback(serialized_response_proto)) {
break;
}
} else {
grpc::string response_text = parser->GetTextFormatFromMethod(
method_name, serialized_response_proto,
false /* is_request */);
if (parser->HasError() && print_mode) {
fprintf(stderr, "Failed to parse response.\n");
} else {
if (!callback(response_text)) {
break;
}
}
}
} else {
if (print_mode) {
fprintf(stderr,
"Rpc failed with status code %d, error message: %s\n",
status.error_code(), status.error_message().c_str());
}
}
} else {
if (line.length() == 0) {
request_text = request_ss.str();
request_ss.str(grpc::string());
request_ss.clear();
} else {
request_ss << line << ' ';
}
}
}
if (input_file.is_open()) {
input_file.close();
}
return true;
}
if (argc == 3) {
request_text = argv[2];
if (!FLAGS_infile.empty()) {
fprintf(stderr, "warning: request given in argv, ignoring --infile\n");
}
@ -571,9 +688,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
if (FLAGS_binary_input) {
serialized_request_proto = request_text;
// formatted_method_name = method_name;
} else {
// formatted_method_name = parser->GetFormattedMethodName(method_name);
serialized_request_proto = parser->GetSerializedProtoFromMethod(
method_name, request_text, true /* is_request */);
if (parser->HasError()) {

@ -84,6 +84,7 @@ namespace testing {
DECLARE_bool(binary_input);
DECLARE_bool(binary_output);
DECLARE_bool(l);
DECLARE_bool(batch);
namespace {
@ -399,6 +400,60 @@ TEST_F(GrpcToolTest, CallCommand) {
ShutdownServer();
}
TEST_F(GrpcToolTest, CallCommandBatch) {
// Test input "grpc_cli call Echo"
std::stringstream output_stream;
const grpc::string server_address = SetUpServer();
const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo",
"message: 'Hello0'"};
// Mock std::cin input "message: 'Hello1'\n\n message: 'Hello2'\n\n"
std::streambuf* orig = std::cin.rdbuf();
std::istringstream ss("message: 'Hello1'\n\n message: 'Hello2'\n\n");
std::cin.rdbuf(ss.rdbuf());
FLAGS_batch = true;
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
FLAGS_batch = false;
// Expected output: "message: "Hello0"\nmessage: "Hello1"\nmessage:
// "Hello2"\n"
EXPECT_TRUE(NULL != strstr(output_stream.str().c_str(),
"message: \"Hello0\"\nmessage: "
"\"Hello1\"\nmessage: \"Hello2\"\n"));
std::cin.rdbuf(orig);
ShutdownServer();
}
TEST_F(GrpcToolTest, CallCommandBatchWithBadRequest) {
// Test input "grpc_cli call Echo"
std::stringstream output_stream;
const grpc::string server_address = SetUpServer();
const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo",
"message: 'Hello0'"};
// Mock std::cin input "message: 1\n\n message: 'Hello2'\n\n"
std::streambuf* orig = std::cin.rdbuf();
std::istringstream ss("message: 1\n\n message: 'Hello2'\n\n");
std::cin.rdbuf(ss.rdbuf());
FLAGS_batch = true;
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
FLAGS_batch = false;
// Expected output: "message: "Hello0"\nmessage: "Hello2"\n"
EXPECT_TRUE(NULL != strstr(output_stream.str().c_str(),
"message: \"Hello0\"\nmessage: \"Hello2\"\n"));
std::cin.rdbuf(orig);
ShutdownServer();
}
TEST_F(GrpcToolTest, CallCommandRequestStream) {
// Test input: grpc_cli call localhost:<port> RequestStream "message:
// 'Hello0'"

@ -21,9 +21,10 @@ CROSS_RUBY=`mktemp tmpfile.XXXXXXXX`
curl https://raw.githubusercontent.com/rake-compiler/rake-compiler/v1.0.3/tasks/bin/cross-ruby.rake > $CROSS_RUBY
# See https://github.com/grpc/grpc/issues/12161 for verconf.h patch details
patch $CROSS_RUBY << EOF
--- cross-ruby.rake 2016-02-05 16:26:53.000000000 -0800
+++ cross-ruby.rake.patched 2016-02-05 16:27:33.000000000 -0800
--- cross-ruby.rake 2017-09-27 16:46:00.311020325 +0200
+++ patched 2017-09-27 16:49:46.127016895 +0200
@@ -133,7 +133,8 @@
"--host=#{MINGW_HOST}",
"--target=#{MINGW_TARGET}",
@ -32,8 +33,16 @@ patch $CROSS_RUBY << EOF
+ '--enable-static',
+ '--disable-shared',
'--disable-install-doc',
'--without-tk',
'--without-tcl'
'--with-ext='
]
@@ -151,6 +152,7 @@
# make
file "#{USER_HOME}/builds/#{MINGW_HOST}/#{RUBY_CC_VERSION}/ruby.exe" => ["#{USER_HOME}/builds/#{MINGW_HOST}/#{RUBY_CC_VERSION}/Makefile"] do |t|
chdir File.dirname(t.prerequisites.first) do
+ sh "test -s verconf.h || rm -f verconf.h" # if verconf.h has size 0, make sure it gets re-built by make
sh MAKE
end
end
EOF
MAKE="make -j8"

@ -0,0 +1,80 @@
#!/bin/bash
# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if [ "x$1" = "x" ] ; then
echo "Usage: $0 <first ref> [second ref]"
exit 1
else
first=$1
fi
if [ -n $2 ] ; then
second=HEAD
fi
if [ -e ~/github-credentials.vars ] ; then
. ~/github-credentials.vars
fi
if [ "x$github_client_id" = "x" ] || [ "x$github_client_secret" = "x" ] ; then
echo "Warning: you don't have github credentials set."
echo
echo "You may end up exceeding guest quota quickly."
echo "You can create an application for yourself,"
echo "and get its credentials. Go to"
echo
echo " https://github.com/settings/developers"
echo
echo "and click 'Register a new application'."
echo
echo "From the application's information, copy/paste"
echo "its Client ID and Client Secret, into the file"
echo
echo " ~/github-credentials.vars"
echo
echo "with the following format:"
echo
echo "github_client_id=0123456789abcdef0123"
echo "github_client_secret=0123456789abcdef0123456789abcdef"
echo
echo
addendum=""
else
addendum="?client_id=$github_client_id&client_secret=$github_client_secret"
fi
unset notfirst
echo "["
git log --pretty=oneline $1..$2 |
grep '[^ ]\+ Merge pull request #[0-9]\{4,6\} ' |
cut -f 2 -d# |
cut -f 1 -d\ |
sort -u |
while read id ; do
if [ "x$notfirst" = "x" ] ; then
notfirst=true
else
echo ","
fi
echo -n " {\"url\": \"https://github.com/grpc/grpc/pull/$id\","
out=`mktemp`
curl -s "https://api.github.com/repos/grpc/grpc/pulls/$id$addendum" > $out
echo -n " "`grep '"title"' $out`
echo -n " "`grep '"login"' $out | head -1`
echo -n " \"pr\": $id }"
rm $out
done
echo
echo "]"

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!!
VERSION='1.7.0.dev0'
VERSION='1.8.0.dev0'

@ -71,6 +71,24 @@ RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \
RUN nuget update -self
# Install dotnet SDK based on https://www.microsoft.com/net/core#debian
RUN apt-get update && apt-get install -y curl libunwind8 gettext
# dotnet-dev-1.0.0-preview2-003131
RUN curl -sSL -o dotnet100.tar.gz https://go.microsoft.com/fwlink/?LinkID=827530
RUN mkdir -p /opt/dotnet && tar zxf dotnet100.tar.gz -C /opt/dotnet
# dotnet-dev-1.0.1
RUN curl -sSL -o dotnet101.tar.gz https://go.microsoft.com/fwlink/?LinkID=843453
RUN mkdir -p /opt/dotnet && tar zxf dotnet101.tar.gz -C /opt/dotnet
RUN ln -s /opt/dotnet/dotnet /usr/local/bin
# Trigger the population of the local package cache
ENV NUGET_XMLDOC_MODE skip
RUN mkdir warmup \
&& cd warmup \
&& dotnet new \
&& cd .. \
&& rm -rf warmup
#=================
# C++ dependencies
RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean

@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 1.7.0-dev
PROJECT_NUMBER = 1.8.0-dev
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 1.7.0-dev
PROJECT_NUMBER = 1.8.0-dev
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

@ -51,7 +51,6 @@ export LANG=en_US.UTF-8
pod repo update # needed by python
# python
brew install coreutils # we need grealpath
pip install virtualenv --user python
pip install -U six tox setuptools twisted pyyaml --user python
export PYTHONPATH=/Library/Python/3.4/site-packages
@ -59,4 +58,7 @@ export PYTHONPATH=/Library/Python/3.4/site-packages
# set xcode version for Obj-C tests
sudo xcode-select -switch /Applications/Xcode_8.2.1.app/Contents/Developer
# TODO(jtattermusch): better debugging of clock skew, remove once not needed
date
git submodule update --init

@ -0,0 +1,24 @@
# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# 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_coverage.sh"
timeout_mins: 420
action {
define_artifacts {
regex: "github/grpc/reports/**"
}
}

@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
# Enter the gRPC repo root
cd $(dirname $0)/../../..
source tools/internal_ci/helper_scripts/prepare_build_linux_rc
python tools/run_tests/run_tests.py \
--use_docker \
-t \
-l all \
-c gcov \
-x report.xml \
-j 16

@ -27,8 +27,7 @@ python3.5 -m pip install cython setuptools wheel
python3.6 -m pip install cython setuptools wheel
# needed to build ruby artifacts
wget https://raw.githubusercontent.com/grpc/grpc/master/tools/distrib/build_ruby_environment_macos.sh
bash build_ruby_environment_macos.sh
time bash tools/distrib/build_ruby_environment_macos.sh
gem install rubygems-update
update_rubygems

@ -28,6 +28,9 @@ ps aux | grep port_server\\.py | awk '{print $2}' | xargs kill -9
# Reveal leftover processes that might be left behind by the build
ps aux | grep -i kbuilder
# TODO(jtattermusch): better debugging of clock skew, remove once not needed
date
echo 'Exiting gRPC main test script.'
if [ "$FAILED" != "" ]

@ -5,6 +5,21 @@ This directory contains scripts that facilitate building and running gRPC tests
The setup builds gRPC docker images for each language/runtime and upload it to Google Container Registry (GCR). These images, encapsulating gRPC stack
from specific releases/tag, are used to test version compatiblity between gRPC release versions.
## Step-by-step instructions for adding a new release to compatibility test
We have continuous nightly test setup to test gRPC backward compatibility between old clients and latest server. When a gRPC developer creates a new gRPC release, s/he is also responsible to add the just-released gRPC client to the nightly test. The steps are:
- Add (or update) an entry in ./client_matrix.py file to reference the github tag for the release.
- Build new client docker image(s). For example, for java release `v1.9.9`, do
- `tools/interop_matrix/create_matrix_images.py --git_checkout --release=v1.9.9 --language=java`
- Verify that the new docker image was built successfully and uploaded to GCR. For example,
- `gcloud beta container images list-tags gcr.io/grpc-testing/grpc_interop_java_oracle8`
- should show an image entry with tag `v1.9.9`.
- Verify the just-created docker client image would pass backward compatibility test (it should). For example,
- `gcloud docker -- pull gcr.io/grpc-testing/grpc_interop_java_oracle8:v1.9.9` followed by
- `docker_image=gcr.io/grpc-testing/grpc_interop_java_oracle8:v1.9.9 ./testcases/java__master`
- git commit the change and merge it to upstream/master.
- (Optional) clean up the tmp directory to where grpc source is cloned at `/export/hda3/tmp/grpc_matrix/`.
For more details on each step, refer to sections below.
## Instructions for creating GCR images
- Edit `./client_matrix.py` to include desired gRPC release.
- Run `tools/interop_matrix/create_matrix_images.py`. Useful options:
@ -45,3 +60,4 @@ For example:
Note:
- File path starting with `tools/` or `template/` are relative to the grpc repo root dir. File path starting with `./` are relative to current directory (`tools/interop_matrix`).
- Creating and referencing images in GCR require read and write permission to Google Container Registry path gcr.io/grpc-testing.

@ -21,7 +21,7 @@ cd $(dirname $0)/../..
# run 8core client vs 8core server
tools/run_tests/run_performance_tests.py \
-l c++ csharp node ruby java python go node_express php \
-l c++ csharp node ruby java python go node_express php_protobuf_php php_protobuf_c \
--netperf \
--category scalable \
--bq_result_table performance_test.performance_experiment \

@ -23,6 +23,7 @@ import bm_diff
import sys
import os
import random
import argparse
import multiprocessing
import subprocess
@ -32,6 +33,12 @@ sys.path.append(
os.path.dirname(sys.argv[0]), '..', '..', 'run_tests', 'python_utils'))
import comment_on_pr
sys.path.append(
os.path.join(
os.path.dirname(sys.argv[0]), '..', '..', '..', 'run_tests',
'python_utils'))
import jobset
def _args():
argp = argparse.ArgumentParser(
@ -125,8 +132,13 @@ def main(args):
subprocess.check_call(['git', 'checkout', where_am_i])
subprocess.check_call(['git', 'submodule', 'update'])
bm_run.run('new', args.benchmarks, args.jobs, args.loops, args.regex, args.counters)
bm_run.run(old, args.benchmarks, args.jobs, args.loops, args.regex, args.counters)
jobs_list = []
jobs_list += bm_run.create_jobs('new', args.benchmarks, args.loops, args.regex, args.counters)
jobs_list += bm_run.create_jobs(old, args.benchmarks, args.loops, args.regex, args.counters)
# shuffle all jobs to eliminate noise from GCE CPU drift
random.shuffle(jobs_list, random.SystemRandom().random)
jobset.run(jobs_list, maxjobs=args.jobs)
diff, note = bm_diff.diff(args.benchmarks, args.loops, args.regex, args.track, old,
'new', args.counters)

@ -95,11 +95,12 @@ def _collect_bm_data(bm, cfg, name, regex, idx, loops):
shortname='%s %s %s %s %d/%d' % (bm, line, cfg, name, idx + 1,
loops),
verbose_success=True,
cpu_cost=2,
timeout_seconds=60 * 60)) # one hour
return jobs_list
def run(name, benchmarks, jobs, loops, regex, counters):
def create_jobs(name, benchmarks, loops, regex, counters):
jobs_list = []
for loop in range(0, loops):
for bm in benchmarks:
@ -108,9 +109,11 @@ def run(name, benchmarks, jobs, loops, regex, counters):
jobs_list += _collect_bm_data(bm, 'counters', name, regex, loop,
loops)
random.shuffle(jobs_list, random.SystemRandom().random)
jobset.run(jobs_list, maxjobs=jobs)
return jobs_list
if __name__ == '__main__':
args = _args()
run(args.name, args.benchmarks, args.jobs, args.loops, args.regex, args.counters)
jobs_list = create_jobs(args.name, args.benchmarks, args.loops,
args.regex, args.counters)
jobset.run(jobs_list, maxjobs=args.jobs)

@ -16,13 +16,18 @@
source ~/.rvm/scripts/rvm
set -ex
repo=$(dirname $0)/../../..
cd $(dirname $0)/../../..
repo=$(pwd)
# First set up all dependences needed for PHP QPS test
cd $repo
cd src/php/tests/qps
composer install
# Install protobuf C-extension for php
cd vendor/google/protobuf/php/ext/google/protobuf
phpize
./configure
make
# The proxy worker for PHP is implemented in Ruby
cd ../../../..
cd $repo
ruby src/ruby/qps/proxy-worker.rb $@

@ -802,25 +802,32 @@ class RubyLanguage:
class PhpLanguage:
def __init__(self):
def __init__(self, use_protobuf_c_extension=False):
pass
self.use_protobuf_c_extension=use_protobuf_c_extension
self.safename = str(self)
def worker_cmdline(self):
if self.use_protobuf_c_extension:
return ['tools/run_tests/performance/run_worker_php.sh -c']
return ['tools/run_tests/performance/run_worker_php.sh']
def worker_port_offset(self):
return 800
def scenarios(self):
php_extension_mode='php_protobuf_php_extension'
if self.use_protobuf_c_extension:
php_extension_mode='php_protobuf_c_extension'
yield _ping_pong_scenario(
'php_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY',
client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
'%s_to_cpp_protobuf_sync_unary_ping_pong' % php_extension_mode,
rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
server_language='c++', async_server_threads=1)
yield _ping_pong_scenario(
'php_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING',
client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
'%s_to_cpp_protobuf_sync_streaming_ping_pong' % php_extension_mode,
rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
server_language='c++', async_server_threads=1)
def __str__(self):
@ -1024,7 +1031,8 @@ LANGUAGES = {
'node' : NodeLanguage(),
'node_express': NodeExpressLanguage(),
'ruby' : RubyLanguage(),
'php' : PhpLanguage(),
'php_protobuf_php' : PhpLanguage(),
'php_protobuf_c' : PhpLanguage(use_protobuf_c_extension=True),
'java' : JavaLanguage(),
'python' : PythonLanguage(),
'go' : GoLanguage(),

@ -701,7 +701,7 @@ class PythonLanguage(object):
return [config.build for config in self.pythons]
def post_tests_steps(self):
if self.config != 'gcov':
if self.config.build_config != 'gcov':
return []
else:
return [['tools/run_tests/helper_scripts/post_tests_python.sh']]
@ -1641,7 +1641,7 @@ def _build_and_run(
suite_name=args.report_suite_name)
number_failures, _ = jobset.run(
post_tests_steps, maxjobs=1, stop_on_failure=True,
post_tests_steps, maxjobs=1, stop_on_failure=False,
newline_on_success=newline_on_success, travis=args.travis)
out = []

Loading…
Cancel
Save