diff --git a/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.m b/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.m index 0f07b6682e67d6a47bf3bbc59002442d3130724f..1703b5265e53e6d530c21093e941c3d419c64e43 100644 --- a/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.m +++ b/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.m @@ -1,10 +1,35 @@ -// -// CoreCronetEnd2EndTests.m -// CoreCronetEnd2EndTests -// -// Created by Muxi Yan on 7/14/16. -// Copyright © 2016 gRPC. All rights reserved. -// +/* + * + * 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. + * + */ #import <XCTest/XCTest.h> @@ -12,6 +37,8 @@ @end +int main(int argc, char **argv); + @implementation CoreCronetEnd2EndTests - (void)setUp { @@ -24,16 +51,11 @@ [super tearDown]; } -- (void)testExample { +- (void)testCoreCronetEnd2End { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. -} - -- (void)testPerformanceExample { - // This is an example of a performance test case. - [self measureBlock:^{ - // Put the code you want to measure the time of here. - }]; + char *argv[] = {"h2_ssl"}; + main(1, argv); } @end diff --git a/src/objective-c/tests/End2EndTest/End2EndTest/Info.plist b/src/objective-c/tests/CoreCronetEnd2EndTests/Info.plist similarity index 55% rename from src/objective-c/tests/End2EndTest/End2EndTest/Info.plist rename to src/objective-c/tests/CoreCronetEnd2EndTests/Info.plist index 6905cc67bbf738499f2accb4b56f5f1ddc8ce444..fbeeb96ba6cb24080092b014db710833e4c62b62 100644 --- a/src/objective-c/tests/End2EndTest/End2EndTest/Info.plist +++ b/src/objective-c/tests/CoreCronetEnd2EndTests/Info.plist @@ -7,34 +7,18 @@ <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <string>gRPC.$(PRODUCT_NAME:rfc1034identifier)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> - <string>APPL</string> + <string>BNDL</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1</string> - <key>LSRequiresIPhoneOS</key> - <true/> - <key>UILaunchStoryboardName</key> - <string>LaunchScreen</string> - <key>UIMainStoryboardFile</key> - <string>Main</string> - <key>UIRequiredDeviceCapabilities</key> - <array> - <string>armv7</string> - </array> - <key>UISupportedInterfaceOrientations</key> - <array> - <string>UIInterfaceOrientationPortrait</string> - <string>UIInterfaceOrientationLandscapeLeft</string> - <string>UIInterfaceOrientationLandscapeRight</string> - </array> </dict> </plist> diff --git a/src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl.m b/src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl.m index 800dd56649a1eb6a9a61dd034f08d9b6d371ad59..68010f341b32e9b3cd147d974f4aa82943b423d4 100644 --- a/src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl.m +++ b/src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl.m @@ -59,9 +59,6 @@ #include <grpc/grpc_cronet.h> #import <Cronet/Cronet.h> -#import <UIKit/UIKit.h> -#import "AppDelegate.h" - typedef struct fullstack_secure_fixture_data { char *localaddr; } fullstack_secure_fixture_data; @@ -202,5 +199,5 @@ int main(int argc, char **argv) { remove(roots_filename); gpr_free(roots_filename); - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + return 0; } diff --git a/src/objective-c/tests/End2EndTest/End2EndTest.xcodeproj/project.pbxproj b/src/objective-c/tests/End2EndTest/End2EndTest.xcodeproj/project.pbxproj deleted file mode 100644 index bf412187f43d810a54a79209699e6023d1c4d801..0000000000000000000000000000000000000000 --- a/src/objective-c/tests/End2EndTest/End2EndTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,405 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1518576073757E501D232EDA /* Pods_End2EndTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4035DBC43CDC1A29CB0EB05D /* Pods_End2EndTest.framework */; }; - 5E201A771D3452D500A81F3A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E201A761D3452D500A81F3A /* AppDelegate.m */; }; - 5E201A7A1D3452D500A81F3A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E201A791D3452D500A81F3A /* ViewController.m */; }; - 5E201A7D1D3452D500A81F3A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E201A7B1D3452D500A81F3A /* Main.storyboard */; }; - 5E201A7F1D3452D600A81F3A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5E201A7E1D3452D600A81F3A /* Assets.xcassets */; }; - 5E201A821D3452D600A81F3A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E201A801D3452D600A81F3A /* LaunchScreen.storyboard */; }; - 5EC76B971D36B2EE00A74FED /* h2_ssl.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EC76B961D36B2EE00A74FED /* h2_ssl.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 18957F402A222D334CEBE57B /* Pods-End2EndTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-End2EndTest.debug.xcconfig"; path = "Pods/Target Support Files/Pods-End2EndTest/Pods-End2EndTest.debug.xcconfig"; sourceTree = "<group>"; }; - 4035DBC43CDC1A29CB0EB05D /* Pods_End2EndTest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_End2EndTest.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5E201A6F1D3452D500A81F3A /* End2EndTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = End2EndTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 5E201A751D3452D500A81F3A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; - 5E201A761D3452D500A81F3A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; - 5E201A781D3452D500A81F3A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; }; - 5E201A791D3452D500A81F3A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; }; - 5E201A7C1D3452D500A81F3A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; - 5E201A7E1D3452D600A81F3A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; - 5E201A811D3452D600A81F3A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; - 5E201A831D3452D600A81F3A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - 5EC76B961D36B2EE00A74FED /* h2_ssl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = h2_ssl.m; sourceTree = "<group>"; }; - E7725B916D22B5AC6ECF8964 /* Pods-End2EndTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-End2EndTest.release.xcconfig"; path = "Pods/Target Support Files/Pods-End2EndTest/Pods-End2EndTest.release.xcconfig"; sourceTree = "<group>"; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 5E201A6C1D3452D500A81F3A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1518576073757E501D232EDA /* Pods_End2EndTest.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 52027776D515577217FE123B /* Pods */ = { - isa = PBXGroup; - children = ( - 18957F402A222D334CEBE57B /* Pods-End2EndTest.debug.xcconfig */, - E7725B916D22B5AC6ECF8964 /* Pods-End2EndTest.release.xcconfig */, - ); - name = Pods; - sourceTree = "<group>"; - }; - 5E201A661D3452D500A81F3A = { - isa = PBXGroup; - children = ( - 5E201A711D3452D500A81F3A /* End2EndTest */, - 5E201A701D3452D500A81F3A /* Products */, - 52027776D515577217FE123B /* Pods */, - D564C37197511893E4E62D12 /* Frameworks */, - ); - sourceTree = "<group>"; - }; - 5E201A701D3452D500A81F3A /* Products */ = { - isa = PBXGroup; - children = ( - 5E201A6F1D3452D500A81F3A /* End2EndTest.app */, - ); - name = Products; - sourceTree = "<group>"; - }; - 5E201A711D3452D500A81F3A /* End2EndTest */ = { - isa = PBXGroup; - children = ( - 5E201A751D3452D500A81F3A /* AppDelegate.h */, - 5E201A761D3452D500A81F3A /* AppDelegate.m */, - 5E201A781D3452D500A81F3A /* ViewController.h */, - 5E201A791D3452D500A81F3A /* ViewController.m */, - 5E201A7B1D3452D500A81F3A /* Main.storyboard */, - 5E201A7E1D3452D600A81F3A /* Assets.xcassets */, - 5E201A801D3452D600A81F3A /* LaunchScreen.storyboard */, - 5E201A831D3452D600A81F3A /* Info.plist */, - 5E201A721D3452D500A81F3A /* Supporting Files */, - ); - path = End2EndTest; - sourceTree = "<group>"; - }; - 5E201A721D3452D500A81F3A /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 5EC76B961D36B2EE00A74FED /* h2_ssl.m */, - ); - name = "Supporting Files"; - sourceTree = "<group>"; - }; - D564C37197511893E4E62D12 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 4035DBC43CDC1A29CB0EB05D /* Pods_End2EndTest.framework */, - ); - name = Frameworks; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 5E201A6E1D3452D500A81F3A /* End2EndTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5E201A861D3452D600A81F3A /* Build configuration list for PBXNativeTarget "End2EndTest" */; - buildPhases = ( - B6E7E45E860B5453E3A5F4A0 /* [CP] Check Pods Manifest.lock */, - 5E201A6B1D3452D500A81F3A /* Sources */, - 5E201A6C1D3452D500A81F3A /* Frameworks */, - 5E201A6D1D3452D500A81F3A /* Resources */, - AE303423292913AB8D447419 /* [CP] Embed Pods Frameworks */, - A4C61E4A2A73F6E1E1143310 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = End2EndTest; - productName = End2EndTest; - productReference = 5E201A6F1D3452D500A81F3A /* End2EndTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 5E201A671D3452D500A81F3A /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0730; - ORGANIZATIONNAME = Google; - TargetAttributes = { - 5E201A6E1D3452D500A81F3A = { - CreatedOnToolsVersion = 7.3.1; - }; - }; - }; - buildConfigurationList = 5E201A6A1D3452D500A81F3A /* Build configuration list for PBXProject "End2EndTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 5E201A661D3452D500A81F3A; - productRefGroup = 5E201A701D3452D500A81F3A /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 5E201A6E1D3452D500A81F3A /* End2EndTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 5E201A6D1D3452D500A81F3A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5E201A821D3452D600A81F3A /* LaunchScreen.storyboard in Resources */, - 5E201A7F1D3452D600A81F3A /* Assets.xcassets in Resources */, - 5E201A7D1D3452D500A81F3A /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - A4C61E4A2A73F6E1E1143310 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-End2EndTest/Pods-End2EndTest-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - AE303423292913AB8D447419 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-End2EndTest/Pods-End2EndTest-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - B6E7E45E860B5453E3A5F4A0 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 5E201A6B1D3452D500A81F3A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5E201A7A1D3452D500A81F3A /* ViewController.m in Sources */, - 5E201A771D3452D500A81F3A /* AppDelegate.m in Sources */, - 5EC76B971D36B2EE00A74FED /* h2_ssl.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 5E201A7B1D3452D500A81F3A /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 5E201A7C1D3452D500A81F3A /* Base */, - ); - name = Main.storyboard; - sourceTree = "<group>"; - }; - 5E201A801D3452D600A81F3A /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 5E201A811D3452D600A81F3A /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = "<group>"; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 5E201A841D3452D600A81F3A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 5E201A851D3452D600A81F3A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 5E201A871D3452D600A81F3A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 18957F402A222D334CEBE57B /* Pods-End2EndTest.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "\"${PODS_ROOT}/Headers/Public\"", - "\"${PODS_ROOT}/Headers/Public/BoringSSL\"", - "\"${PODS_ROOT}/Headers/Public/CronetFramework\"", - "\"${PODS_ROOT}/Headers/Public/gRPC-Core\"", - "\"${PODS_ROOT}/Headers/Public/gRPC-Cronet\"", - "\"${PODS_ROOT}/../../../../../include\"", - ); - INFOPLIST_FILE = End2EndTest/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.google.End2EndTest; - PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "$(inherited) \"${PODS_ROOT}/../../../../.."; - }; - name = Debug; - }; - 5E201A881D3452D600A81F3A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E7725B916D22B5AC6ECF8964 /* Pods-End2EndTest.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "\"${PODS_ROOT}/Headers/Public\"", - "\"${PODS_ROOT}/Headers/Public/BoringSSL\"", - "\"${PODS_ROOT}/Headers/Public/CronetFramework\"", - "\"${PODS_ROOT}/Headers/Public/gRPC-Core\"", - "\"${PODS_ROOT}/Headers/Public/gRPC-Cronet\"", - "\"${PODS_ROOT}/../../../../../include\"", - ); - INFOPLIST_FILE = End2EndTest/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.google.End2EndTest; - PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "$(inherited) \"${PODS_ROOT}/../../../../.."; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 5E201A6A1D3452D500A81F3A /* Build configuration list for PBXProject "End2EndTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5E201A841D3452D600A81F3A /* Debug */, - 5E201A851D3452D600A81F3A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5E201A861D3452D600A81F3A /* Build configuration list for PBXNativeTarget "End2EndTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5E201A871D3452D600A81F3A /* Debug */, - 5E201A881D3452D600A81F3A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 5E201A671D3452D500A81F3A /* Project object */; -} diff --git a/src/objective-c/tests/End2EndTest/End2EndTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/src/objective-c/tests/End2EndTest/End2EndTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 220e863b896e3735e6325a9f596bbe492c8d19c0..0000000000000000000000000000000000000000 --- a/src/objective-c/tests/End2EndTest/End2EndTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Workspace - version = "1.0"> - <FileRef - location = "self:End2EndTest.xcodeproj"> - </FileRef> -</Workspace> diff --git a/src/objective-c/tests/End2EndTest/End2EndTest/AppDelegate.h b/src/objective-c/tests/End2EndTest/End2EndTest/AppDelegate.h deleted file mode 100644 index 867e62842aecaf7cb061f3f363c3947b31b513c7..0000000000000000000000000000000000000000 --- a/src/objective-c/tests/End2EndTest/End2EndTest/AppDelegate.h +++ /dev/null @@ -1,42 +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. - * - */ - -#import <UIKit/UIKit.h> - -@interface AppDelegate : UIResponder <UIApplicationDelegate> - -@property (strong, nonatomic) UIWindow *window; - - -@end - diff --git a/src/objective-c/tests/End2EndTest/End2EndTest/AppDelegate.m b/src/objective-c/tests/End2EndTest/End2EndTest/AppDelegate.m deleted file mode 100644 index 66fceffd85cb40e55921fd0c5c2bca058ddcb7d7..0000000000000000000000000000000000000000 --- a/src/objective-c/tests/End2EndTest/End2EndTest/AppDelegate.m +++ /dev/null @@ -1,70 +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. - * - */ - -#import "AppDelegate.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Override point for customization after application launch. - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. -} - -- (void)applicationDidEnterBackground:(UIApplication *)application { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. -} - -- (void)applicationDidBecomeActive:(UIApplication *)application { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - -- (void)applicationWillTerminate:(UIApplication *)application { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. -} - -@end diff --git a/src/objective-c/tests/End2EndTest/End2EndTest/Assets.xcassets/AppIcon.appiconset/Contents.json b/src/objective-c/tests/End2EndTest/End2EndTest/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 118c98f7461bf98b2bc7e061150d8021121ad277..0000000000000000000000000000000000000000 --- a/src/objective-c/tests/End2EndTest/End2EndTest/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/src/objective-c/tests/End2EndTest/End2EndTest/Base.lproj/LaunchScreen.storyboard b/src/objective-c/tests/End2EndTest/End2EndTest/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 2e721e1833f03bb0e1b962a84491d7e43e3fef9c..0000000000000000000000000000000000000000 --- a/src/objective-c/tests/End2EndTest/End2EndTest/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM"> - <dependencies> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/> - </dependencies> - <scenes> - <!--View Controller--> - <scene sceneID="EHf-IW-A2E"> - <objects> - <viewController id="01J-lp-oVM" sceneMemberID="viewController"> - <layoutGuides> - <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/> - <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> - </layoutGuides> - <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> - <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <animations/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> - </view> - </viewController> - <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> - </objects> - <point key="canvasLocation" x="53" y="375"/> - </scene> - </scenes> -</document> diff --git a/src/objective-c/tests/End2EndTest/End2EndTest/Base.lproj/Main.storyboard b/src/objective-c/tests/End2EndTest/End2EndTest/Base.lproj/Main.storyboard deleted file mode 100644 index f56d2f3bb56e8474d49393008be744986bd41c3c..0000000000000000000000000000000000000000 --- a/src/objective-c/tests/End2EndTest/End2EndTest/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> - <dependencies> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/> - </dependencies> - <scenes> - <!--View Controller--> - <scene sceneID="tne-QT-ifu"> - <objects> - <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController"> - <layoutGuides> - <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> - <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> - </layoutGuides> - <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> - <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> - </view> - </viewController> - <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> - </objects> - </scene> - </scenes> -</document> diff --git a/src/objective-c/tests/End2EndTest/End2EndTest/ViewController.h b/src/objective-c/tests/End2EndTest/End2EndTest/ViewController.h deleted file mode 100644 index 38cd7f92b660a1ca327a66138f6c1d50e69dba69..0000000000000000000000000000000000000000 --- a/src/objective-c/tests/End2EndTest/End2EndTest/ViewController.h +++ /dev/null @@ -1,40 +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. - * - */ - -#import <UIKit/UIKit.h> - -@interface ViewController : UIViewController - - -@end - diff --git a/src/objective-c/tests/End2EndTest/End2EndTest/ViewController.m b/src/objective-c/tests/End2EndTest/End2EndTest/ViewController.m deleted file mode 100644 index 70b5d45811051fdf1c89141debbc8f6e0b2b1392..0000000000000000000000000000000000000000 --- a/src/objective-c/tests/End2EndTest/End2EndTest/ViewController.m +++ /dev/null @@ -1,52 +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. - * - */ - -#import "ViewController.h" - -@interface ViewController () - -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end diff --git a/src/objective-c/tests/End2EndTest/End2EndTest/h2_ssl.m b/src/objective-c/tests/End2EndTest/End2EndTest/h2_ssl.m deleted file mode 100644 index 800dd56649a1eb6a9a61dd034f08d9b6d371ad59..0000000000000000000000000000000000000000 --- a/src/objective-c/tests/End2EndTest/End2EndTest/h2_ssl.m +++ /dev/null @@ -1,206 +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. - * - */ - -/* - * This fixture creates a server full stack using chttp2 and a client - * full stack using Cronet. End-to-end tests are run against this fixture - * setting. - * - */ - -#include "test/core/end2end/end2end_tests.h" - -#include <stdio.h> -#include <string.h> - -#include <grpc/support/alloc.h> -#include <grpc/support/host_port.h> -#include <grpc/support/log.h> - -#include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/support/env.h" -#include "src/core/lib/support/string.h" -#include "src/core/lib/support/tmpfile.h" -#include "test/core/end2end/data/ssl_test_data.h" -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" - -#include <grpc/grpc_cronet.h> -#import <Cronet/Cronet.h> - -#import <UIKit/UIKit.h> -#import "AppDelegate.h" - -typedef struct fullstack_secure_fixture_data { - char *localaddr; -} fullstack_secure_fixture_data; - -static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( - grpc_channel_args *client_args, grpc_channel_args *server_args) { - grpc_end2end_test_fixture f; - int port = grpc_pick_unused_port_or_die(); - fullstack_secure_fixture_data *ffd = - gpr_malloc(sizeof(fullstack_secure_fixture_data)); - memset(&f, 0, sizeof(f)); - - gpr_join_host_port(&ffd->localaddr, "localhost", port); - - f.fixture_data = ffd; - f.cq = grpc_completion_queue_create(NULL); - - return f; -} - -static void process_auth_failure(void *state, grpc_auth_context *ctx, - const grpc_metadata *md, size_t md_count, - grpc_process_auth_metadata_done_cb cb, - void *user_data) { - GPR_ASSERT(state == NULL); - cb(user_data, NULL, 0, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, NULL); -} - -static void cronet_init_client_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *client_args, - cronet_engine *cronetEngine) { - fullstack_secure_fixture_data *ffd = f->fixture_data; - f->client = - grpc_cronet_secure_channel_create(cronetEngine, ffd->localaddr, client_args, NULL); - GPR_ASSERT(f->client != NULL); -} - -static void chttp2_init_server_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *server_args, - grpc_server_credentials *server_creds) { - fullstack_secure_fixture_data *ffd = f->fixture_data; - if (f->server) { - grpc_server_destroy(f->server); - } - f->server = grpc_server_create(server_args, NULL); - grpc_server_register_completion_queue(f->server, f->cq, NULL); - GPR_ASSERT(grpc_server_add_secure_http2_port(f->server, ffd->localaddr, - server_creds)); - grpc_server_credentials_release(server_creds); - grpc_server_start(f->server); -} - -void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { - fullstack_secure_fixture_data *ffd = f->fixture_data; - gpr_free(ffd->localaddr); - gpr_free(ffd); -} - -static void cronet_init_client_simple_ssl_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { - grpc_arg ssl_name_override = {GRPC_ARG_STRING, - GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, - {"foo.test.google.fr"}}; - - grpc_channel_args *new_client_args = - grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); - [Cronet setHttp2Enabled:YES]; - [Cronet start]; - cronet_engine *cronetEngine = [Cronet getGlobalEngine]; - - cronet_init_client_secure_fullstack(f, new_client_args, cronetEngine); - grpc_channel_args_destroy(new_client_args); -} - -static int fail_server_auth_check(grpc_channel_args *server_args) { - size_t i; - if (server_args == NULL) return 0; - for (i = 0; i < server_args->num_args; i++) { - if (strcmp(server_args->args[i].key, FAIL_AUTH_CHECK_SERVER_ARG_NAME) == - 0) { - return 1; - } - } - return 0; -} - -static void chttp2_init_server_simple_ssl_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *server_args) { - grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key, - test_server1_cert}; - grpc_server_credentials *ssl_creds = - grpc_ssl_server_credentials_create(NULL, &pem_cert_key_pair, 1, 0, NULL); - if (fail_server_auth_check(server_args)) { - grpc_auth_metadata_processor processor = {process_auth_failure, NULL, NULL}; - grpc_server_credentials_set_auth_metadata_processor(ssl_creds, processor); - } - chttp2_init_server_secure_fullstack(f, server_args, ssl_creds); -} - -/* All test configurations */ - -static grpc_end2end_test_config configs[] = { - {"chttp2/simple_ssl_fullstack", - FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | - FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS, - chttp2_create_fixture_secure_fullstack, - cronet_init_client_simple_ssl_secure_fullstack, - chttp2_init_server_simple_ssl_secure_fullstack, - chttp2_tear_down_secure_fullstack}, -}; - -int main(int argc, char **argv) { - size_t i; - FILE *roots_file; - size_t roots_size = strlen(test_root_cert); - char *roots_filename; - - grpc_test_init(argc, argv); - grpc_end2end_tests_pre_init(); - - /* Set the SSL roots env var. */ - roots_file = gpr_tmpfile("chttp2_simple_ssl_fullstack_test", &roots_filename); - GPR_ASSERT(roots_filename != NULL); - GPR_ASSERT(roots_file != NULL); - GPR_ASSERT(fwrite(test_root_cert, 1, roots_size, roots_file) == roots_size); - fclose(roots_file); - gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, roots_filename); - - grpc_init(); - - for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) { - grpc_end2end_tests(argc, argv, configs[i]); - } - - grpc_shutdown(); - - /* Cleanup. */ - remove(roots_filename); - gpr_free(roots_filename); - - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); -} diff --git a/src/objective-c/tests/End2EndTest/Podfile b/src/objective-c/tests/End2EndTest/Podfile deleted file mode 100644 index a3fd4d5e9559e8b9dcb083e694f0c9fe2d53ad86..0000000000000000000000000000000000000000 --- a/src/objective-c/tests/End2EndTest/Podfile +++ /dev/null @@ -1,70 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '8.0' - -install! 'cocoapods', :deterministic_uuids => false - -# Location of gRPC's repo root relative to this file. -GRPC_LOCAL_SRC = '../../../..' - -# Install the dependencies in the main target plus all test targets. -%w( - End2EndTest -).each do |target_name| - target target_name do - pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true - pod 'CronetFramework', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" - pod 'gRPC-Core', :path => GRPC_LOCAL_SRC - pod 'gRPC-Cronet', :path => GRPC_LOCAL_SRC - end -end - -# gRPC-Core.podspec needs to be modified to be successfully used for local development. A Podfile's -# pre_install hook lets us do that. The block passed to it runs after the podspecs are downloaded -# and before they are installed in the user project. -# -# This podspec searches for the gRPC core library headers under "$(PODS_ROOT)/gRPC-Core", where -# Cocoapods normally places the downloaded sources. When doing local development of the libraries, -# though, Cocoapods just takes the sources from whatever directory was specified using `:path`, and -# doesn't copy them under $(PODS_ROOT). When using static libraries, one can sometimes rely on the -# symbolic links to the pods headers that Cocoapods creates under "$(PODS_ROOT)/Headers". But those -# aren't created when using dynamic frameworks. So our solution is to modify the podspec on the fly -# to point at the local directory where the sources are. -# -# TODO(jcanizales): Send a PR to Cocoapods to get rid of this need. -pre_install do |installer| - %w( - gRPC-Core - gRPC-Cronet - ).each do |target_name| - grpc_core_spec = installer.pod_targets.find{|t| t.name == target_name}.root_spec - - # Copied from gRPC-Core.podspec, except for the adjusted src_root: - src_root = "$(PODS_ROOT)/../#{GRPC_LOCAL_SRC}" - grpc_core_spec.pod_target_xcconfig = { - 'GRPC_SRC_ROOT' => src_root, - 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', - 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', - # If we don't set these two settings, `include/grpc/support/time.h` and - # `src/core/lib/support/string.h` shadow the system `<time.h>` and `<string.h>`, breaking - # the build. - 'USE_HEADERMAP' => 'NO', - 'ALWAYS_SEARCH_USER_PATHS' => 'NO', - } - end -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES' - end - if target.name == 'gRPC-Core' - target.build_configurations.each do |config| - # TODO(zyc) Remove this setting after the issue is resolved - # GPR_UNREACHABLE_CODE causes "Control may reach end of non-void - # function" warning - config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO' - end - end - end -end diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index e5265630a2ca60d0be7df43f4ac2c38312e5b2a0..546017c9f78a7dad343a757176c5687a5967580a 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -27,8 +27,6 @@ GRPC_LOCAL_SRC = '../../..' pod 'gRPC-Core', :path => GRPC_LOCAL_SRC pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC - - pod 'RemoteTest', :path => "RemoteTestClient" end end diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj index 6c41563a350e547e2eb1d66e5445d98ee92967c5..4aa5b1bdbe4eca038cc3e223e68798ee38be0b06 100644 --- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj +++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj @@ -976,6 +976,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CoreCronetEnd2EndTests; PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "$(inherited) \"${PODS_ROOT}/../../../..\""; }; name = Debug; }; @@ -990,6 +991,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CoreCronetEnd2EndTests; PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "$(inherited) \"${PODS_ROOT}/../../../..\""; }; name = Release; };