Commit a81af989 authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by GitHub

Merge pull request #6842 from dnkoutso/cmd_u_for_library_targets

Include test schemes within library schemes
parents a9da629c 48e32785
......@@ -8,7 +8,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements
* None.
* Include test schemes within library schemes
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#6765](https://github.com/CocoaPods/CocoaPods/issues/6765)
##### Bug Fixes
......
......@@ -73,7 +73,13 @@ module Pod
if installation_options.deterministic_uuids?
UI.message('- Generating deterministic UUIDs') { project.predictabilize_uuids }
end
project.recreate_user_schemes(false)
library_product_types = [:framework, :dynamic_library, :static_library]
project.recreate_user_schemes(false) do |scheme, target|
next unless library_product_types.include? target.symbol_type
pod_target = pod_targets.find { |pt| pt.native_target == target }
next if pod_target.nil? || pod_target.test_native_targets.empty?
pod_target.test_native_targets.each { |test_native_target| scheme.add_test_target(test_native_target) }
end
project.save
end
end
......
......@@ -7,7 +7,7 @@ module Pod
#
attr_reader :specs
# @return [Array<PBXNativeTarget>] the target definitions of the Podfile
# @return [Array<TargetDefinition>] the target definitions of the Podfile
# that generated this target.
#
attr_reader :target_definitions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment