-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathRakefile
More file actions
33 lines (24 loc) · 726 Bytes
/
Rakefile
File metadata and controls
33 lines (24 loc) · 726 Bytes
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
include FileUtils::Verbose
namespace :test do
desc "Run the ImageFilterExample Tests for iOS"
task :ios do
run_tests('ImageFilterExample', 'iphonesimulator')
tests_failed('iOS') unless $?.success?
end
end
desc "Run the ImageFilterExample Tests"
task :test do
Rake::Task['test:ios'].invoke
end
task :default => 'test'
private
def run_tests(scheme, sdk)
sh("xcodebuild -workspace ./ImageFilters/examples/iOS/ImageFilterExample.xcworkspace -scheme '#{scheme}' -sdk '#{sdk}' -configuration Debug clean test | xcpretty -c ; exit ${PIPESTATUS[0]}") rescue nil
end
def tests_failed(platform)
puts red("#{platform} unit tests failed")
exit $?.exitstatus
end
def red(string)
"\033[0;31m! #{string}"
end