forked from bannzai/SpreadsheetView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
43 lines (39 loc) · 1.35 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
require 'xcjobs'
namespace :test do
desc 'test on simulator'
task :iphonesimulator do |t, args|
XCJobs::Test.new("simulator") do |t|
configuration = ENV['CONFIGURATION']
destination = ENV['DESTINATION']
testcase = ENV['TESTCASE']
configuration = 'Debug' if configuration.empty?
t.workspace = 'SpreadsheetView'
t.scheme = 'SpreadsheetView'
t.sdk = 'iphonesimulator'
t.configuration = configuration
t.add_only_testing("SpreadsheetViewTests/#{testcase}") unless testcase.empty?
t.add_destination(destination) unless destination.empty?
t.add_build_option('-enableCodeCoverage', 'YES')
t.add_build_setting('ONLY_ACTIVE_ARCH', 'YES')
t.add_build_setting('ENABLE_TESTABILITY', 'YES') if configuration == 'Release'
t.build_dir = 'build'
end
Rake::Task['simulator'].execute
end
desc 'test on device'
task :iphoneos do |t, args|
XCJobs::Test.new("device") do |t|
t.workspace = 'SpreadsheetView'
t.scheme = 'SpreadsheetView'
t.sdk = 'iphoneos'
configuration = args['configuration'] || 'Debug'
t.configuration = configuration
if configuration == 'Release'
t.add_build_setting('ENABLE_TESTABILITY', 'YES')
end
t.build_dir = 'build'
end
Rake::Task['device'].execute
end
end
XCJobs::Coverage::Coveralls.new()