@@ -117,8 +117,8 @@ class Xcode
117117 `xcode-select -print-path` . strip
118118 end
119119
120- def self . build_dir ( effective_platform_name = "" )
121- File . join ( BUILD_DIR , CONFIGURATION + effective_platform_name )
120+ def self . build_dir ( effective_platform_name = "" , configuration = nil )
121+ File . join ( BUILD_DIR , ( configuration || CONFIGURATION ) + effective_platform_name )
122122 end
123123
124124 def self . sdk_dir_for_version ( version )
@@ -145,9 +145,10 @@ class Xcode
145145 args += " -target #{ options [ :target ] . inspect } " if options [ :target ]
146146 args += " -sdk #{ options [ :sdk ] . inspect } " if options [ :sdk ]
147147 args += " -scheme #{ options [ :scheme ] . inspect } " if options [ :scheme ]
148+ args += " -configuration #{ options [ :configuration ] || CONFIGURATION } "
148149
149150 Shell . fold "build.#{ options [ :scheme ] || options [ :target ] } " do
150- Shell . run ( %Q(xcodebuild -project #{ PROJECT_NAME } .xcodeproj -configuration #{ CONFIGURATION } SYMROOT=#{ BUILD_DIR . inspect } clean build #{ args } ) , logfile )
151+ Shell . run ( %Q(xcodebuild -project #{ PROJECT_NAME } .xcodeproj SYMROOT=#{ BUILD_DIR . inspect } clean build #{ args } ) , logfile )
151152 end
152153 end
153154
@@ -210,6 +211,9 @@ class Simulator
210211 begin
211212 kill # ensure simulator is not currently running
212213 Shell . run "ios-sim launch #{ File . join ( app_dir , "#{ app_name } .app" ) . inspect } --devicetypeid \" com.apple.CoreSimulator.SimDeviceType.iPhone-5s, #{ SDK_RUNTIME_VERSION } \" --verbose --stdout build/uispecs.spec.log"
214+ puts "** cat: **"
215+ system ( "cat build/uispecs.spec.log" )
216+ puts "**done**"
213217 Shell . run "grep -q ', 0 failures' build/uispecs.spec.log" , logfile
214218 rescue
215219 retry_count += 1
@@ -334,7 +338,7 @@ namespace :suites do
334338
335339 desc "Build UI specs"
336340 task :build do
337- Xcode . build ( target : UI_SPECS_TARGET_NAME , sdk : "iphonesimulator#{ SDK_VERSION } " , args : 'ARCHS=i386' , logfile : "uispecs.build.log" )
341+ Xcode . build ( target : UI_SPECS_TARGET_NAME , sdk : "iphonesimulator#{ SDK_VERSION } " , args : 'ARCHS=i386' , configuration : "Debug" , logfile : "uispecs.build.log" )
338342 end
339343
340344 desc "Run UI specs"
@@ -345,7 +349,7 @@ namespace :suites do
345349 }
346350
347351 Shell . with_env ( env_vars ) do
348- Simulator . launch ( Xcode . build_dir ( "-iphonesimulator" ) , UI_SPECS_TARGET_NAME , "uispecs.run.log" )
352+ Simulator . launch ( Xcode . build_dir ( "-iphonesimulator" , "Debug" ) , UI_SPECS_TARGET_NAME , "uispecs.run.log" )
349353 end
350354 end
351355 end
@@ -416,7 +420,7 @@ namespace :suites do
416420
417421 desc "Build iOS dynamic framework specs"
418422 task :build do
419- Xcode . build ( target : IOS_DYNAMIC_FRAMEWORK_SPECS_TARGET_NAME , sdk : "iphonesimulator#{ SDK_VERSION } " , args : 'ARCHS=i386' , logfile : "frameworks.ios.dynamic.specs.build.log" )
423+ Xcode . build ( target : IOS_DYNAMIC_FRAMEWORK_SPECS_TARGET_NAME , sdk : "iphonesimulator#{ SDK_VERSION } " , args : 'ARCHS=i386' , configuration : "Debug" , logfile : "frameworks.ios.dynamic.specs.build.log" )
420424 end
421425
422426 desc "Runs iOS dynamic framework specs"
@@ -427,7 +431,7 @@ namespace :suites do
427431 }
428432
429433 Shell . with_env ( env_vars ) do
430- Simulator . launch ( Xcode . build_dir ( "-iphonesimulator" ) , IOS_DYNAMIC_FRAMEWORK_SPECS_TARGET_NAME , "frameworks.ios.dynamic.specs.run.log" )
434+ Simulator . launch ( Xcode . build_dir ( "-iphonesimulator" , "Debug" ) , IOS_DYNAMIC_FRAMEWORK_SPECS_TARGET_NAME , "frameworks.ios.dynamic.specs.run.log" )
431435 end
432436 end
433437 end
0 commit comments