Fixes for getting test coverage working again

Xcode 5 does not create .gcda files due to a bug. The workaround used in here has been suggested in the devforums: https://devforums.apple.com/thread/199643?start=0&tstart=0
This commit is contained in:
Andreas Linde 2013-09-23 17:17:41 +02:00
parent 6b6fe5249d
commit 22047b856c
5 changed files with 25 additions and 1 deletions

View File

@ -1120,15 +1120,18 @@
1E68F4A816F7843F00053706 /* CodeCoverage */ = { 1E68F4A816F7843F00053706 /* CodeCoverage */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
"ARCHS[sdk=iphonesimulator*]" = "$(BIT_SIM_ARCHS)";
DSTROOT = /tmp/HockeySDK.dst; DSTROOT = /tmp/HockeySDK.dst;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"\"$(SRCROOT)/../Vendor\"", "\"$(SRCROOT)/../Vendor\"",
); );
GCC_THUMB_SUPPORT = NO; GCC_THUMB_SUPPORT = NO;
GENERATE_PROFILING_CODE = YES;
PRODUCT_NAME = HockeySDK; PRODUCT_NAME = HockeySDK;
PUBLIC_HEADERS_FOLDER_PATH = "include/$(PRODUCT_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = "include/$(PRODUCT_NAME)";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
"VALID_ARCHS[sdk=iphonesimulator*]" = "$(BIT_SIM_ARCHS)";
}; };
name = CodeCoverage; name = CodeCoverage;
}; };
@ -1162,6 +1165,7 @@
1E68F4AC16F7843F00053706 /* CodeCoverage */ = { 1E68F4AC16F7843F00053706 /* CodeCoverage */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
"ARCHS[sdk=iphonesimulator*]" = "$(BIT_SIM_ARCHS)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES;
@ -1182,6 +1186,7 @@
"$(inherited)", "$(inherited)",
); );
GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES;
GENERATE_PROFILING_CODE = YES;
INFOPLIST_FILE = "HockeySDKTests/HockeySDKTests-Info.plist"; INFOPLIST_FILE = "HockeySDKTests/HockeySDKTests-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.1; IPHONEOS_DEPLOYMENT_TARGET = 6.1;
LIBRARY_SEARCH_PATHS = ( LIBRARY_SEARCH_PATHS = (

View File

@ -60,6 +60,11 @@ static void *kInstallationIdentification = &kInstallationIdentification;
} }
- (void)tearDown { - (void)tearDown {
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wimplicit"
__gcov_flush();
# pragma clang diagnostic pop
[_sut cleanupInternalStorage]; [_sut cleanupInternalStorage];
_sut = nil; _sut = nil;

View File

@ -33,6 +33,11 @@
} }
- (void)tearDown { - (void)tearDown {
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wimplicit"
__gcov_flush();
# pragma clang diagnostic pop
[_sut cancelOperationsWithPath:nil method:nil]; [_sut cancelOperationsWithPath:nil method:nil];
_sut = nil; _sut = nil;

View File

@ -32,7 +32,11 @@
- (void)tearDown { - (void)tearDown {
// Tear-down code here. // Tear-down code here.
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wimplicit"
__gcov_flush();
# pragma clang diagnostic pop
[super tearDown]; [super tearDown];
} }

View File

@ -43,6 +43,11 @@
- (void)tearDown { - (void)tearDown {
// Tear-down code here. // Tear-down code here.
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wimplicit"
__gcov_flush();
# pragma clang diagnostic pop
_storeUpdateManager = nil; _storeUpdateManager = nil;
[super tearDown]; [super tearDown];