Include test schemes within library schemes

parent a9da629c
...@@ -8,7 +8,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -8,7 +8,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements ##### Enhancements
* None. * Include test schemes within library schemes
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#6765](https://github.com/CocoaPods/CocoaPods/issues/6765)
##### Bug Fixes ##### Bug Fixes
......
...@@ -73,7 +73,13 @@ module Pod ...@@ -73,7 +73,13 @@ module Pod
if installation_options.deterministic_uuids? if installation_options.deterministic_uuids?
UI.message('- Generating deterministic UUIDs') { project.predictabilize_uuids } UI.message('- Generating deterministic UUIDs') { project.predictabilize_uuids }
end 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 project.save
end end
end end
......
...@@ -7,7 +7,7 @@ module Pod ...@@ -7,7 +7,7 @@ module Pod
# #
attr_reader :specs 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. # that generated this target.
# #
attr_reader :target_definitions 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