-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sg/recommended-project-settings' into develop
- Loading branch information
Showing
8 changed files
with
661 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
language: objective-c | ||
|
||
before_script: | ||
- sudo easy_install cpp-coveralls | ||
|
||
script: | ||
- xctool project DTDownload.xcodeproj -scheme "DTDownload (iOS)" build test -sdk iphonesimulator -arch i386 ONLY_ACTIVE_ARCH=NO -configuration Coverage | ||
- xctool project DTDownload.xcodeproj -scheme "DTDownload (Mac)" build test ONLY_ACTIVE_ARCH=NO -arch x86_64 -configuration Coverage | ||
|
||
after_success: | ||
- ./coveralls.rb --extension m --exclude-folder Demo --exclude-folder Test --exclude-folder Externals |
Large diffs are not rendered by default.
Oops, something went wrong.
69 changes: 69 additions & 0 deletions
69
DTDownload.xcodeproj/xcshareddata/xcschemes/DTDownload (Mac).xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "0460" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "A71903D216A8068B00C1EC52" | ||
BuildableName = "libDTDownload (Mac).a" | ||
BlueprintName = "DTDownload (Mac)" | ||
ReferencedContainer = "container:DTDownload.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
buildConfiguration = "Coverage"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "A71F5BB117FB0B7B00D5E42C" | ||
BuildableName = "Unit Tests copy.octest" | ||
BlueprintName = "Unit Tests (Mac)" | ||
ReferencedContainer = "container:DTDownload.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
buildConfiguration = "Debug" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
allowLocationSimulation = "YES"> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
buildConfiguration = "Release" | ||
debugDocumentVersioning = "YES"> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
69 changes: 69 additions & 0 deletions
69
DTDownload.xcodeproj/xcshareddata/xcschemes/DTDownload (iOS).xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "0460" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "A71902A616A8029400C1EC52" | ||
BuildableName = "libDTDownload.a" | ||
BlueprintName = "DTDownload (iOS)" | ||
ReferencedContainer = "container:DTDownload.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
buildConfiguration = "Coverage"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "A71903F316A808A700C1EC52" | ||
BuildableName = "UnitTests.octest" | ||
BlueprintName = "Unit Tests (iOS)" | ||
ReferencedContainer = "container:DTDownload.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
buildConfiguration = "Debug" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
allowLocationSimulation = "YES"> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
buildConfiguration = "Release" | ||
debugDocumentVersioning = "YES"> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
Submodule DTFoundation
updated
29 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// | ||
// Prefix header for all source files of the 'UnitTests' target in the 'UnitTests' project | ||
// | ||
|
||
#ifdef __OBJC__ | ||
#import <UIKit/UIKit.h> | ||
#import <Foundation/Foundation.h> | ||
#import <SenTestingKit/SenTestingKit.h> | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'etc' | ||
require 'fileutils' | ||
require 'find' | ||
require 'optparse' | ||
|
||
# arraw of source subfolders to exclude | ||
excludedFolders = [] | ||
extensionsToProcess = [] | ||
coveralls_cmd = "coveralls" | ||
|
||
excludeHeaders = false | ||
|
||
# create option parser | ||
opts = OptionParser.new | ||
opts.banner = "Usage: coveralls.rb [options]" | ||
|
||
opts.on('-e', '--exclude-folder FOLDER', 'Folder to exclude') do |v| | ||
excludedFolders << v | ||
coveralls_cmd.concat(" -e #{v}") | ||
end | ||
|
||
opts.on('-h', '--exclude-headers', 'Ignores headers') do |v| | ||
excludeHeaders = true | ||
end | ||
|
||
opts.on('-x', '--extension EXT', 'Source file extension to process') do |v| | ||
extensionsToProcess << v | ||
coveralls_cmd.concat(" -x #{v}") | ||
end | ||
|
||
opts.on_tail("-?", "--help", "Show this message") do | ||
puts opts | ||
exit | ||
end | ||
|
||
# parse the options | ||
begin | ||
opts.parse!(ARGV) | ||
rescue OptionParser::InvalidOption => e | ||
puts e | ||
puts opts | ||
exit(1) | ||
end | ||
|
||
# the folders | ||
workingDir = Dir.getwd | ||
derivedDataDir = "#{Etc.getpwuid.dir}/Library/Developer/Xcode/DerivedData/" | ||
outputDir = workingDir + "/gcov" | ||
|
||
# create gcov output folder | ||
FileUtils.mkdir outputDir | ||
|
||
# pattern to get source file from first line of gcov file | ||
GCOV_SOURCE_PATTERN = Regexp.new(/Source:(.*)/) | ||
|
||
# enumerate all gcda files underneath derivedData | ||
Find.find(derivedDataDir) do |gcda_file| | ||
|
||
if gcda_file.match(/\.gcda\Z/) | ||
|
||
#get just the folder name | ||
gcov_dir = File.dirname(gcda_file) | ||
|
||
# cut off absolute working dir to get relative source path | ||
relative_input_path = gcda_file.slice(derivedDataDir.length, gcda_file.length) | ||
puts "\nINPUT: #{relative_input_path}" | ||
|
||
#process the file | ||
result = %x( gcov '#{gcda_file}' -o '#{gcov_dir}' ) | ||
|
||
# filter the resulting output | ||
Dir.glob("*.gcov") do |gcov_file| | ||
|
||
firstLine = File.open(gcov_file).readline | ||
match = GCOV_SOURCE_PATTERN.match(firstLine) | ||
|
||
if (match) | ||
|
||
source_path = match[1] | ||
|
||
puts "source: #{source_path} - #{workingDir}" | ||
|
||
if (source_path.start_with? workingDir) | ||
|
||
# cut off absolute working dir to get relative source path | ||
relative_path = source_path.slice(workingDir.length+1, source_path.length) | ||
|
||
extension = File.extname(relative_path) | ||
extension = extension.slice(1, extension.length-1) | ||
|
||
puts "#{extension}" | ||
|
||
# get the path components | ||
path_comps = relative_path.split(File::SEPARATOR) | ||
|
||
shouldProcess = false | ||
exclusionMsg ="" | ||
|
||
if (excludedFolders.include?(path_comps[0])) | ||
exclusionMsg = "excluded via option" | ||
else | ||
if (excludeHeaders == true && extension == 'h') | ||
exclusionMsg = "excluded header" | ||
else | ||
if (extensionsToProcess.count == 0 || extensionsToProcess.include?(extension)) | ||
shouldProcess = true | ||
else | ||
exclusionMsg = "excluded extension" | ||
shouldProcess = false | ||
end | ||
end | ||
end | ||
|
||
if (shouldProcess) | ||
puts " - process: #{relative_path}" | ||
FileUtils.mv(gcov_file, outputDir) | ||
else | ||
puts " - ignore: #{relative_path} (#{exclusionMsg})" | ||
FileUtils.rm gcov_file | ||
end | ||
else | ||
puts " - ignore: #{gcov_file} (outside source folder)" | ||
FileUtils.rm gcov_file | ||
end | ||
end | ||
end | ||
end | ||
end | ||
|
||
#call the coveralls, exclude some files | ||
system coveralls_cmd | ||
|
||
#clean up | ||
FileUtils.rm_rf outputDir |