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 DerivedData
.idea/ .idea/
Tests/Pods Tests/Pods
Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes/

View file

@ -3,5 +3,4 @@ before_install:
- brew update - brew update
- brew install xctool --HEAD - brew install xctool --HEAD
- cd Tests && pod install && cd $TRAVIS_BUILD_DIR - 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 script: rake test

View file

@ -1,11 +1,15 @@
namespace :test do 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" 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") $ios_success = system("xctool -workspace AFNetworking.xcworkspace -scheme 'iOS Tests' test -test-sdk iphonesimulator -configuration Release")
end end
desc "Run the AFNetworking Tests for Mac OS X" 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") $osx_success = system("xctool -workspace AFNetworking.xcworkspace -scheme 'OS X Tests' test -test-sdk macosx -sdk macosx -configuration Release")
end end
end end