From 8dbd406650753d616bfe9efd22bdceac8090cd11 Mon Sep 17 00:00:00 2001 From: Blake Watters Date: Thu, 30 May 2013 20:41:07 -0400 Subject: [PATCH 1/2] Replace shared scheme copy Travis step with `rake test:prepare` task for easier out of the box execution of tests --- .gitignore | 1 + .travis.yml | 1 - Rakefile | 8 ++++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fad32b8..bd5adc7 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ profile DerivedData .idea/ Tests/Pods +Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes/ diff --git a/.travis.yml b/.travis.yml index fefe400..0038954 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Rakefile b/Rakefile index d8cc621..2721cdc 100644 --- a/Rakefile +++ b/Rakefile @@ -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 From 6f7816022a5aa72e4697c6d6d0d9b8e6e8ffdd4d Mon Sep 17 00:00:00 2001 From: Blake Watters Date: Thu, 30 May 2013 21:11:05 -0400 Subject: [PATCH 2/2] Set buildImplicitDependencies="NO" in OS X shared scheme --- Tests/Schemes/OS X Tests.xcscheme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Schemes/OS X Tests.xcscheme b/Tests/Schemes/OS X Tests.xcscheme index 57a00f4..dcb2079 100644 --- a/Tests/Schemes/OS X Tests.xcscheme +++ b/Tests/Schemes/OS X Tests.xcscheme @@ -4,7 +4,7 @@ version = "1.3"> + buildImplicitDependencies = "NO">