Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Coveralls for code coverage. #595

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions .travis.yml
@@ -1,2 +1,12 @@
language: objective-c
before_install:
- brew update
- brew list pyenv || brew install pyenv
- eval "$(pyenv init -)"
- pyenv install 2.7.6
- pyenv global 2.7.6
- pyenv rehash
- pip install cpp-coveralls
- pyenv rehash
script: make ci
after_success: coveralls --gcov-options '\-lp'
4 changes: 4 additions & 0 deletions Configurations/ConfigCommonCoverage.xcconfig
@@ -0,0 +1,4 @@
#include "ConfigCommonDebug.xcconfig"

GCC_GENERATE_TEST_COVERAGE_FILES = YES
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES
2 changes: 2 additions & 0 deletions Configurations/ConfigUnitTestCoverage.xcconfig
@@ -0,0 +1,2 @@
GCC_GENERATE_TEST_COVERAGE_FILES = NO
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -23,7 +23,7 @@ test:
ci:
for i in {7..11} ; do \
if xcrun --sdk "macosx10.$$i" --show-sdk-path 2> /dev/null ; then \
xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Debug test || exit 1 ; \
( rm -rf build && xcodebuild -sdk "macosx10.$$i" -scheme Distribution -configuration Coverage -derivedDataPath build test ) || exit 1 ; \
fi ; \
done

Expand Down
2 changes: 1 addition & 1 deletion README.markdown
@@ -1,4 +1,4 @@
# Sparkle [![Build Status](https://travis-ci.org/sparkle-project/Sparkle.svg?branch=master)](https://travis-ci.org/sparkle-project/Sparkle) <a href='https://app.ship.io/dashboard#/jobs/8814/history' target='_blank'><img src='https://app.ship.io/jobs/V3PoCLcN5ft5Pnq0/build_status.png' height='20' /></a>
# Sparkle [![Build Status](https://travis-ci.org/sparkle-project/Sparkle.svg?branch=master)](https://travis-ci.org/sparkle-project/Sparkle) <a href='https://app.ship.io/dashboard#/jobs/8814/history' target='_blank'><img src='https://app.ship.io/jobs/V3PoCLcN5ft5Pnq0/build_status.png' height='20' /></a> [![Coverage Status](https://coveralls.io/repos/sparkle-project/Sparkle/badge.svg?branch=master&service=github)](https://coveralls.io/github/sparkle-project/Sparkle?branch=master)

An easy-to-use software update framework for Cocoa developers.

Expand Down
73 changes: 73 additions & 0 deletions Sparkle.xcodeproj/project.pbxproj
Expand Up @@ -347,6 +347,8 @@
14950074195FDF5900BC5B5B /* SUUpdaterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdaterTest.m; sourceTree = "<group>"; usesTabs = 0; };
14958C6B19AEBC530061B14F /* signed-test-file.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "signed-test-file.txt"; sourceTree = "<group>"; };
14958C6C19AEBC610061B14F /* test-pubkey.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "test-pubkey.pem"; sourceTree = "<group>"; };
149B78631B7D3A0C00D7D62C /* ConfigCommonCoverage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigCommonCoverage.xcconfig; sourceTree = "<group>"; };
149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUnitTestCoverage.xcconfig; sourceTree = "<group>"; };
3772FEA813DE0B6B00F79537 /* SUVersionDisplayProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUVersionDisplayProtocol.h; sourceTree = "<group>"; };
4607BEA21948443800EF8DA4 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Sparkle.strings; sourceTree = "<group>"; };
4607BEA31948443800EF8DA4 /* nb */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nb; path = nb.lproj/SUAutomaticUpdateAlert.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -992,6 +994,7 @@
5D06E8F20FD68D21005AE3F6 /* ConfigBinaryDeltaDebug.xcconfig */,
5D06E8F30FD68D21005AE3F6 /* ConfigBinaryDeltaRelease.xcconfig */,
FA1941D00D94A70100DD942E /* ConfigCommon.xcconfig */,
149B78631B7D3A0C00D7D62C /* ConfigCommonCoverage.xcconfig */,
FA1941CF0D94A70100DD942E /* ConfigCommonDebug.xcconfig */,
FA1941CC0D94A70100DD942E /* ConfigCommonRelease.xcconfig */,
FA1941D10D94A70100DD942E /* ConfigFramework.xcconfig */,
Expand All @@ -1004,6 +1007,7 @@
FA1941CB0D94A70100DD942E /* ConfigTestAppDebug.xcconfig */,
FA1941D20D94A70100DD942E /* ConfigTestAppRelease.xcconfig */,
FA3AAF3B1050B273004B3130 /* ConfigUnitTest.xcconfig */,
149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */,
FA3AAF3A1050B273004B3130 /* ConfigUnitTestDebug.xcconfig */,
FA3AAF391050B273004B3130 /* ConfigUnitTestRelease.xcconfig */,
14732BC91960F70A00593899 /* make-release-package.sh */,
Expand Down Expand Up @@ -1762,6 +1766,66 @@
};
name = Release;
};
149B785A1B7D398100D7D62C /* Coverage */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 149B78631B7D3A0C00D7D62C /* ConfigCommonCoverage.xcconfig */;
buildSettings = {
};
name = Coverage;
};
149B785B1B7D398100D7D62C /* Coverage */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */;
buildSettings = {
};
name = Coverage;
};
149B785C1B7D398100D7D62C /* Coverage */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FA1941CB0D94A70100DD942E /* ConfigTestAppDebug.xcconfig */;
buildSettings = {
};
name = Coverage;
};
149B785D1B7D398100D7D62C /* Coverage */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 149B78641B7D3A4800D7D62C /* ConfigUnitTestCoverage.xcconfig */;
buildSettings = {
};
name = Coverage;
};
149B785E1B7D398100D7D62C /* Coverage */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 5D06E8F20FD68D21005AE3F6 /* ConfigBinaryDeltaDebug.xcconfig */;
buildSettings = {
};
name = Coverage;
};
149B785F1B7D398100D7D62C /* Coverage */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FA1941D30D94A70100DD942E /* ConfigRelaunchDebug.xcconfig */;
buildSettings = {
};
name = Coverage;
};
149B78601B7D398100D7D62C /* Coverage */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Coverage;
};
149B78611B7D398100D7D62C /* Coverage */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Coverage;
};
149B78621B7D398100D7D62C /* Coverage */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Coverage;
};
1DEB91AE08733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FA1941CA0D94A70100DD942E /* ConfigFrameworkDebug.xcconfig */;
Expand Down Expand Up @@ -1853,6 +1917,7 @@
isa = XCConfigurationList;
buildConfigurations = (
1420DF4B1962329200203BB0 /* Debug */,
149B78611B7D398100D7D62C /* Coverage */,
1420DF4C1962329200203BB0 /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1862,6 +1927,7 @@
isa = XCConfigurationList;
buildConfigurations = (
14732BC71960F69300593899 /* Debug */,
149B78601B7D398100D7D62C /* Coverage */,
14732BC81960F69300593899 /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1871,6 +1937,7 @@
isa = XCConfigurationList;
buildConfigurations = (
14950061195FB89500BC5B5B /* Debug */,
149B78621B7D398100D7D62C /* Coverage */,
14950062195FB89500BC5B5B /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1880,6 +1947,7 @@
isa = XCConfigurationList;
buildConfigurations = (
1DEB91AE08733DA50010E9CD /* Debug */,
149B785B1B7D398100D7D62C /* Coverage */,
1DEB91AF08733DA50010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1889,6 +1957,7 @@
isa = XCConfigurationList;
buildConfigurations = (
1DEB91B208733DA50010E9CD /* Debug */,
149B785A1B7D398100D7D62C /* Coverage */,
1DEB91B308733DA50010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1898,6 +1967,7 @@
isa = XCConfigurationList;
buildConfigurations = (
55C14BBB136EEF1500649790 /* Debug */,
149B785F1B7D398100D7D62C /* Coverage */,
55C14BBC136EEF1500649790 /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1907,6 +1977,7 @@
isa = XCConfigurationList;
buildConfigurations = (
5D06E8D20FD68C7D005AE3F6 /* Debug */,
149B785E1B7D398100D7D62C /* Coverage */,
5D06E8D30FD68C7D005AE3F6 /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1916,6 +1987,7 @@
isa = XCConfigurationList;
buildConfigurations = (
612279DB0DB5470300AB99EA /* Debug */,
149B785D1B7D398100D7D62C /* Coverage */,
612279DC0DB5470300AB99EA /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1925,6 +1997,7 @@
isa = XCConfigurationList;
buildConfigurations = (
61B5F90609C4CEE300B25A18 /* Debug */,
149B785C1B7D398100D7D62C /* Coverage */,
61B5F90709C4CEE300B25A18 /* Release */,
);
defaultConfigurationIsVisible = 0;
Expand Down