Do not use the same product name for test targets

parent 28ad8cd8
...@@ -30,6 +30,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -30,6 +30,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes ##### Bug Fixes
* Do not use the same product name for test targets
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#6762](https://github.com/CocoaPods/CocoaPods/pull/6762)
* Use unique temp folder during lint for parallel execuition * Use unique temp folder during lint for parallel execuition
[Dimitris Koutsogiorgas](https://github.com/dnkoutso) [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#5117](https://github.com/CocoaPods/CocoaPods/issues/5117) [#5117](https://github.com/CocoaPods/CocoaPods/issues/5117)
......
...@@ -214,7 +214,7 @@ module Pod ...@@ -214,7 +214,7 @@ module Pod
language = target.uses_swift? ? :swift : :objc language = target.uses_swift? ? :swift : :objc
native_test_target = project.new_target(product_type, name, platform, deployment_target, nil, language) native_test_target = project.new_target(product_type, name, platform, deployment_target, nil, language)
product_name = target.product_name product_name = name
product = native_test_target.product_reference product = native_test_target.product_reference
product.name = product_name product.name = product_name
......
...@@ -187,6 +187,7 @@ module Pod ...@@ -187,6 +187,7 @@ module Pod
@project.targets.first.name.should == 'CoconutLib' @project.targets.first.name.should == 'CoconutLib'
native_test_target = @project.targets[1] native_test_target = @project.targets[1]
native_test_target.name.should == 'CoconutLib-Unit-Tests' native_test_target.name.should == 'CoconutLib-Unit-Tests'
native_test_target.product_reference.name.should == 'CoconutLib-Unit-Tests'
native_test_target.symbol_type.should == :unit_test_bundle native_test_target.symbol_type.should == :unit_test_bundle
@coconut_pod_target.test_native_targets.count.should == 1 @coconut_pod_target.test_native_targets.count.should == 1
end end
...@@ -225,8 +226,10 @@ module Pod ...@@ -225,8 +226,10 @@ module Pod
@installer.install! @installer.install!
native_target = @installer.send(:native_target_for_consumer, @coconut_spec.consumer(:ios)) native_target = @installer.send(:native_target_for_consumer, @coconut_spec.consumer(:ios))
native_target.name.should == 'CoconutLib' native_target.name.should == 'CoconutLib'
native_target.product_reference.name.should == 'libCoconutLib.a'
test_native_target = @installer.send(:native_target_for_consumer, @coconut_spec.test_specs.first.consumer(:ios)) test_native_target = @installer.send(:native_target_for_consumer, @coconut_spec.test_specs.first.consumer(:ios))
test_native_target.name.should == 'CoconutLib-Unit-Tests' test_native_target.name.should == 'CoconutLib-Unit-Tests'
test_native_target.product_reference.name.should == 'CoconutLib-Unit-Tests'
end end
it 'returns the correct product type for test type' do it 'returns the correct product type for test type' do
......
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