aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-11-26 17:30:06 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-11-26 17:30:06 +0000
commitca3d74790bcf2d42bc6a9c3dc653c7e8a485705c (patch)
tree680f44b7cb5a18d79b0fe14d1d6914df3193a453 /UnitTesting
parent6ef81aa11edbc435f9ab1eb2c1d6f47b1a93fa46 (diff)
Enable code coverage for GTM test suite in iOS 7.
Call gcov_flush at end of tests manually if GTMCodeCoverageApp is available to receive request. DELTA=5 (5 added, 0 deleted, 0 changed)
Diffstat (limited to 'UnitTesting')
-rw-r--r--UnitTesting/GTMIPhoneUnitTestDelegate.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/UnitTesting/GTMIPhoneUnitTestDelegate.m b/UnitTesting/GTMIPhoneUnitTestDelegate.m
index 60baa0e..0318073 100644
--- a/UnitTesting/GTMIPhoneUnitTestDelegate.m
+++ b/UnitTesting/GTMIPhoneUnitTestDelegate.m
@@ -18,6 +18,7 @@
#import "GTMIPhoneUnitTestDelegate.h"
+#import "GTMCodeCoverageApp.h"
#import "GTMDefines.h"
#if !GTM_IPHONE_SDK
#error GTMIPhoneUnitTestDelegate for iPhone only
@@ -94,6 +95,10 @@
- (void)runTestsAndExit:(UIApplication *)application {
[self runTests];
+ if ([application respondsToSelector:@selector(gtm_gcov_flush)]) {
+ [application performSelector:@selector(gtm_gcov_flush)];
+ }
+
if (!getenv("GTM_DISABLE_TERMINATION")) {
// To help using xcodebuild, make the exit status 0/1 to signal the tests
// success/failure.