Replace shared scheme copy Travis step with rake test:prepare task for easier out of the box execution of tests

This commit is contained in:
Blake Watters 2013-05-30 20:41:07 -04:00
parent d4f7e62ad6
commit 8dbd406650
3 changed files with 7 additions and 3 deletions

1
.gitignore vendored
View file

@ -17,3 +17,4 @@ profile
DerivedData
.idea/
Tests/Pods
Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes/

View file

@ -3,5 +3,4 @@ before_install:
- brew update
- brew install xctool --HEAD
- cd Tests && pod install && cd $TRAVIS_BUILD_DIR
- mkdir -p "Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes" && cp Tests/Schemes/*.xcscheme "Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes/"
script: rake test

View file

@ -1,11 +1,15 @@
namespace :test do
task :prepare do
system(%Q{mkdir -p "Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes" && cp Tests/Schemes/*.xcscheme "Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes/"})
end
desc "Run the AFNetworking Tests for iOS"
task :ios do
task :ios => :prepare do
$ios_success = system("xctool -workspace AFNetworking.xcworkspace -scheme 'iOS Tests' test -test-sdk iphonesimulator -configuration Release")
end
desc "Run the AFNetworking Tests for Mac OS X"
task :osx do
task :osx => :prepare do
$osx_success = system("xctool -workspace AFNetworking.xcworkspace -scheme 'OS X Tests' test -test-sdk macosx -sdk macosx -configuration Release")
end
end