-
Notifications
You must be signed in to change notification settings - Fork 947
/
Rakefile
22 lines (19 loc) · 900 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
desc 'Setup the schemes required to run iOS tests'
task :prepare do
system(%Q{mkdir -p "Tests/FUIKitTests.xcodeproj/xcshareddata/xcschemes" && cp Tests/Schemes/*.xcscheme "Tests/FUIKitTests.xcodeproj/xcshareddata/xcschemes/"})
end
task :ios => :prepare do
$test_success = system('xctool -workspace Tests/FUIKitTests.xcworkspace -scheme FUIKitTests build -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO')
$test_success = system('xctool -workspace Tests/FUIKitTests.xcworkspace -scheme FUIKitTests build-tests -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO')
$test_success = system('xctool -workspace Tests/FUIKitTests.xcworkspace -scheme FUIKitTests test -test-sdk iphonesimulator ONLY_ACTIVE_ARCH=NO')
end
desc 'Run all iOS tests'
task :test => :ios do
if $test_success
puts '** All tests passed successfully **'
else
puts 'Unit tests failed'
exit(-1)
end
end
task :default => 'test'