lib/xcjobs/xcodebuild.rb in xcjobs-0.8.0 vs lib/xcjobs/xcodebuild.rb in xcjobs-0.8.1

- old
+ new

@@ -168,13 +168,16 @@ end end end class Test < Xcodebuild + attr_accessor :without_building + def initialize(name = :test) super @description = 'test application' + @without_building = false yield self if block_given? define end def sdk @@ -284,23 +287,26 @@ desc @description task @name do add_build_setting('GCC_SYMBOLS_PRIVATE_EXTERN', 'NO') - run(['xcodebuild', 'test'] + options) - + run(['xcodebuild', without_building ? 'test-without-building' : 'test'] + options) + if coverage_enabled coverage_report(options) end end end end class Build < Xcodebuild + attr_accessor :for_testing + def initialize(name = :build) super @description = 'build application' + @for_testing = false yield self if block_given? define end private @@ -316,10 +322,10 @@ task @name do add_build_setting('CONFIGURATION_TEMP_DIR', File.join(build_dir, 'temp')) if build_dir add_build_setting('CODE_SIGN_IDENTITY', signing_identity) if signing_identity add_build_setting('PROVISIONING_PROFILE', provisioning_profile_uuid) if provisioning_profile_uuid - run(['xcodebuild', 'build'] + options) + run(['xcodebuild', for_testing ? 'build-for-testing' : 'build'] + options) end end end class Archive < Xcodebuild