Skip to content

Commit

Permalink
Merge pull request #622 from dostrander/dostrander/fix-618
Browse files Browse the repository at this point in the history
[#618] Fix test entries scheme options
  • Loading branch information
dnkoutso authored Nov 2, 2018
2 parents f23193b + b32cdd0 commit 99ae4ec
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@

##### Bug Fixes

* Fix Scheme's configure_with_targets setting test targets as build.
[Derek Ostrander](https://github.com/dostrander)
[#618](https://github.com/CocoaPods/Xcodeproj/issues/618)

* Support embedded workspace parsing issue 605
[LizCira](https://github.com/LizCira)
[#605](https://github.com/CocoaPods/CocoaPods/issues/605)
Expand Down
6 changes: 3 additions & 3 deletions lib/xcodeproj/scheme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ def add_build_target(build_target, build_for_running = true)

entry.build_for_testing = true
entry.build_for_running = build_for_running
entry.build_for_profiling = true
entry.build_for_archiving = true
entry.build_for_analyzing = true
entry.build_for_profiling = build_for_running
entry.build_for_archiving = build_for_running
entry.build_for_analyzing = build_for_running

build_action.add_entry(entry)
end
Expand Down
12 changes: 6 additions & 6 deletions spec/scheme_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ module ProjectSpecs
test_entry = scheme.build_action.entries[1]
test_entry.build_for_running?.should == false
test_entry.build_for_testing?.should == true
test_entry.build_for_profiling?.should == true
test_entry.build_for_archiving?.should == true
test_entry.build_for_analyzing?.should == true
test_entry.build_for_profiling?.should == false
test_entry.build_for_archiving?.should == false
test_entry.build_for_analyzing?.should == false
test_entry.buildable_references.first.buildable_name.should == 'Test.xctest'

scheme.launch_action.buildable_product_runnable.buildable_reference.buildable_name.should == 'App.app'
Expand All @@ -194,9 +194,9 @@ module ProjectSpecs
test_entry = scheme.build_action.entries[1]
test_entry.build_for_running?.should == false
test_entry.build_for_testing?.should == true
test_entry.build_for_profiling?.should == true
test_entry.build_for_archiving?.should == true
test_entry.build_for_analyzing?.should == true
test_entry.build_for_profiling?.should == false
test_entry.build_for_archiving?.should == false
test_entry.build_for_analyzing?.should == false
test_entry.buildable_references.first.buildable_name.should == 'Test.xctest'

scheme.launch_action.buildable_product_runnable.buildable_reference.buildable_name.nil?.should == true
Expand Down

0 comments on commit 99ae4ec

Please sign in to comment.