Skip to content

Commit

Permalink
.xcodeproj: Only generate coverage info as CI step
Browse files Browse the repository at this point in the history
Fixes facebookarchive#65.

Running the `slather setup` command as part of dc4c90d caused coverage info
to be generated for all build configurations; see
SlatherOrg/slather#73. This is problematic, as it
caused linker errors when the library is used in other projects.

Disable coverage settings in the FBKVOController.xcodeproj, and instead
pass command-line options to the CI step to generate coverage metrics.
In order to do so, this commit overrides the default build script used
by Travis CI; see
http://docs.travis-ci.com/user/languages/objective-c/#Default-Test-Script.
  • Loading branch information
modocache committed Sep 2, 2015
1 parent 972f15a commit ba520d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ before_install:
- brew reinstall xctool
- gem update cocoapods
- gem install slather
xcode_workspace: FBKVOController.xcworkspace
xcode_scheme: FBKVOController
xcode_sdk:
- iphonesimulator7.0
- iphonesimulator7.1
script:
- xctool -workspace FBKVOController.xcworkspace -scheme FBKVOController -sdk iphonesimulator7.0 build test GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES
- xctool -workspace FBKVOController.xcworkspace -scheme FBKVOController -sdk iphonesimulator7.1 build test GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES
after_success:
- slather

4 changes: 0 additions & 4 deletions FBKVOController.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,6 @@
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand Down Expand Up @@ -448,8 +446,6 @@
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down

0 comments on commit ba520d0

Please sign in to comment.