From 78683f700d6ad423b846fb2c6125cb9848ca1874 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 29 Nov 2017 18:08:22 -0800 Subject: Fix ObjC++ build error --- src/objective-c/tests/CronetUnitTests/CronetUnitTests.m | 8 ++++---- src/objective-c/tests/Tests.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/objective-c') diff --git a/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m b/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m index 0d295fb3c0..92bc20e5b9 100644 --- a/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m +++ b/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m @@ -56,7 +56,7 @@ static void drain_cq(grpc_completion_queue *cq) { + (void)setUp { [super setUp]; - char *argv[] = {"CoreCronetEnd2EndTests"}; + char *argv[] = {(char *)"CoreCronetEnd2EndTests"}; grpc_test_init(1, argv); grpc_init(); @@ -100,7 +100,7 @@ void init_ctx(SSL_CTX *ctx) { // Install server certificate BIO *pem = BIO_new_mem_buf((void *)test_server1_cert, (int)strlen(test_server1_cert)); - X509 *cert = PEM_read_bio_X509_AUX(pem, NULL, NULL, ""); + X509 *cert = PEM_read_bio_X509_AUX(pem, NULL, NULL, (char *)""); SSL_CTX_use_certificate(ctx, cert); X509_free(cert); BIO_free(pem); @@ -108,7 +108,7 @@ void init_ctx(SSL_CTX *ctx) { // Install server private key pem = BIO_new_mem_buf((void *)test_server1_key, (int)strlen(test_server1_key)); - EVP_PKEY *key = PEM_read_bio_PrivateKey(pem, NULL, NULL, ""); + EVP_PKEY *key = PEM_read_bio_PrivateKey(pem, NULL, NULL, (char *)""); SSL_CTX_use_PrivateKey(ctx, key); EVP_PKEY_free(key); BIO_free(pem); @@ -258,7 +258,7 @@ unsigned int parse_h2_length(const char *field) { - (void)packetCoalescing:(BOOL)useCoalescing { grpc_arg arg; - arg.key = GRPC_ARG_USE_CRONET_PACKET_COALESCING; + arg.key = (char *)GRPC_ARG_USE_CRONET_PACKET_COALESCING; arg.type = GRPC_ARG_INTEGER; arg.value.integer = useCoalescing ? 1 : 0; grpc_channel_args *args = grpc_channel_args_copy_and_add(NULL, &arg, 1); diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj index 52631b4dce..9a6cb0e7d7 100644 --- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj +++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj @@ -1518,6 +1518,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; + GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = CronetUnitTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -1567,6 +1568,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; + GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = CronetUnitTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -1582,6 +1584,7 @@ buildSettings = { CLANG_ANALYZER_NONNULL = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = CronetUnitTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -1597,6 +1600,7 @@ buildSettings = { CLANG_ANALYZER_NONNULL = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; INFOPLIST_FILE = CronetUnitTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; -- cgit v1.2.3 From 81f8be347e70cf729e03d5191d08a9d4fe1b82ac Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 29 Nov 2017 18:15:20 -0800 Subject: Upgrade protobuf version in podspec --- src/objective-c/!ProtoCompiler.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/objective-c') diff --git a/src/objective-c/!ProtoCompiler.podspec b/src/objective-c/!ProtoCompiler.podspec index 25c437911f..12598e616a 100644 --- a/src/objective-c/!ProtoCompiler.podspec +++ b/src/objective-c/!ProtoCompiler.podspec @@ -36,7 +36,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' - v = '3.4.0' + v = '3.5.0' s.version = v s.summary = 'The Protobuf Compiler (protoc) generates Objective-C files from .proto files' s.description = <<-DESC -- cgit v1.2.3 From e641196e45486215b4ddd3c17ed6c0a6d465a9b0 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 29 Nov 2017 18:22:01 -0800 Subject: Fix in one more file --- src/objective-c/!ProtoCompiler-gRPCPlugin.podspec | 2 +- templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/objective-c') diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index 80e1069ddd..22501765f9 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -101,7 +101,7 @@ Pod::Spec.new do |s| s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.4.0' + s.dependency '!ProtoCompiler', '3.5.0' # For the Protobuf dependency not to complain: s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' diff --git a/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template b/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template index 196c405468..5c1358f7c3 100644 --- a/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template +++ b/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template @@ -103,7 +103,7 @@ s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.4.0' + s.dependency '!ProtoCompiler', '3.5.0' # For the Protobuf dependency not to complain: s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' -- cgit v1.2.3 From 4b947d3b165ad4e02326b03d03035bebfed529fe Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 30 Nov 2017 09:36:29 -0800 Subject: Verbose log of start of each test suite --- src/objective-c/tests/GRPCClientTests.m | 4 ++++ src/objective-c/tests/InteropTests.m | 1 + src/objective-c/tests/RxLibraryUnitTests.m | 4 ++++ 3 files changed, 9 insertions(+) (limited to 'src/objective-c') diff --git a/src/objective-c/tests/GRPCClientTests.m b/src/objective-c/tests/GRPCClientTests.m index 5672bdad4c..3bab7f6671 100644 --- a/src/objective-c/tests/GRPCClientTests.m +++ b/src/objective-c/tests/GRPCClientTests.m @@ -95,6 +95,10 @@ static GRPCProtoMethod *kFullDuplexCallMethod; @implementation GRPCClientTests ++ (void)setUp { + NSLog(@"GRPCClientTests Started"); +} + - (void)setUp { // Add a custom user agent prefix that will be used in test [GRPCCall setUserAgentPrefix:@"Foo" forHost:kHostAddress]; diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index e5fcab26d8..0be8669aa2 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests.m @@ -86,6 +86,7 @@ } + (void)setUp { + NSLog(@"InteropTest Started, class: %@", [[self class] description]); #ifdef GRPC_COMPILE_WITH_CRONET // Cronet setup [Cronet setHttp2Enabled:YES]; diff --git a/src/objective-c/tests/RxLibraryUnitTests.m b/src/objective-c/tests/RxLibraryUnitTests.m index 3a5adbbf37..aa178f8d45 100644 --- a/src/objective-c/tests/RxLibraryUnitTests.m +++ b/src/objective-c/tests/RxLibraryUnitTests.m @@ -58,6 +58,10 @@ @implementation RxLibraryUnitTests ++ (void)setUp { + NSLog(@"GRPCClientTests Started"); +} + #pragma mark Writeable - (void)testWriteableSingleHandlerIsCalledForValue { -- cgit v1.2.3 From 01bc32c5003ffb745a2e98b07f43fb94b6ac7d26 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 30 Nov 2017 09:49:50 -0800 Subject: Fine tune test output better --- src/objective-c/tests/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/objective-c') diff --git a/src/objective-c/tests/run_tests.sh b/src/objective-c/tests/run_tests.sh index 608ae6884b..62c4e10b99 100755 --- a/src/objective-c/tests/run_tests.sh +++ b/src/objective-c/tests/run_tests.sh @@ -38,7 +38,7 @@ trap 'kill -9 `jobs -p` ; echo "EXIT TIME: $(date)"' EXIT # element of the pipe fails. # TODO(jcanizales): Use xctool instead? Issue #2540. set -o pipefail -XCODEBUILD_FILTER='(^CompileC |^Ld |^.*clang |^ *cd |^ *export |^Libtool |^.*libtool |^CpHeader |^ *builtin-copy )' +XCODEBUILD_FILTER='(^CompileC |^Ld |^ *[^ ]*clang |^ *cd |^ *export |^Libtool |^ *[^ ]*libtool |^CpHeader |^ *builtin-copy )' echo "TIME: $(date)" xcodebuild \ -workspace Tests.xcworkspace \ -- cgit v1.2.3