Skip to content

Commit

Permalink
Removed unused coveralls shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
MattesGroeger committed Sep 17, 2013
1 parent 6949d35 commit 8fdf7f7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -6,4 +6,4 @@ before_install:
- brew install xctool --HEAD
script: rake build --trace
after_success:
- rake report --trace
- rake coveralls --trace
70 changes: 37 additions & 33 deletions Rakefile
Expand Up @@ -20,45 +20,17 @@ task :build do
end

desc 'Report code coverage of main target to coveralls.io'
task :report do
scheme = scheme_for_name("")
settings = build_settings_per_target(workspace, scheme)[scheme]
gcov_dir = "#{settings['OBJECT_FILE_DIR_normal']}/#{settings['CURRENT_ARCH']}"

generate_gcov(gcov_dir)
copy_gcov_to_project_dir(gcov_dir)
task :coveralls do
dir = gcov_dir

generate_gcov(dir)
copy_gcov_to_project_dir(dir)
send_report([scheme_for_name("Example"), scheme_for_name("Tests"), "Pods"])
remove_gcov_dir
end

task :default => :build

def generate_gcov(gcov_dir)
puts "generate gcov files..."
command = "cd #{gcov_dir}"
Dir["#{gcov_dir}/*.gcda"].each do |file|
command << " && gcov-4.2 '#{file}' -o '#{gcov_dir}'"
end
`#{command}`
end

def copy_gcov_to_project_dir(gcov_dir)
`cp -r '#{gcov_dir}' gcov`
end

def send_report(excludes)
puts "send report..."
command = "coveralls --verbose"
excludes.each do |exclude|
command << " -e '#{exclude}'"
end
`#{command}`
end

def remove_gcov_dir
`rm -r gcov`
end

def buildAndLogScheme(name, is_test = false)
scheme = workspace.gsub(".xcworkspace", name)
result = compile(workspace, scheme, is_test)
Expand Down Expand Up @@ -96,6 +68,38 @@ def compile(workspace, scheme, is_test)
end
end

def gcov_dir
scheme = scheme_for_name("")
settings = build_settings_per_target(workspace, scheme)[scheme]
"#{settings['OBJECT_FILE_DIR_normal']}/#{settings['CURRENT_ARCH']}"
end

def generate_gcov(gcov_dir)
puts "generate gcov files..."
command = "cd #{gcov_dir}"
Dir["#{gcov_dir}/*.gcda"].each do |file|
command << " && gcov-4.2 '#{file}' -o '#{gcov_dir}'"
end
`#{command}`
end

def copy_gcov_to_project_dir(gcov_dir)
`cp -r '#{gcov_dir}' gcov`
end

def send_report(excludes)
puts "send report..."
command = "coveralls --verbose"
excludes.each do |exclude|
command << " -e '#{exclude}'"
end
`#{command}`
end

def remove_gcov_dir
`rm -r gcov`
end

def build_settings_per_target(workspace, scheme)
settings = `xctool -workspace #{workspace} -scheme #{scheme} -configuration Release -sdk iphonesimulator -showBuildSettings`
current_target = ""
Expand Down
56 changes: 0 additions & 56 deletions script/coveralls.sh

This file was deleted.

0 comments on commit 8fdf7f7

Please sign in to comment.