Unverified Commit 4f8ffc7b authored by D. Koutsogiorgas's avatar D. Koutsogiorgas Committed by GitHub

Merge pull request #7762 from dnkoutso/no_symlink_public_test_headers

Do not symlink headers that belong to test specs
parents 04cbea4d ca6e9283
......@@ -28,6 +28,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[chuganzy](https://github.com/chuganzy)
[#7724](https://github.com/CocoaPods/CocoaPods/pull/7724)
* Do not symlink headers that belong to test specs
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7762](https://github.com/CocoaPods/CocoaPods/pull/7762)
* Do not build pod target if it only contains script phases
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7746](https://github.com/CocoaPods/CocoaPods/issues/7746)
......
......@@ -144,7 +144,8 @@ module Pod
added_build_headers = false
added_public_headers = false
pod_target.file_accessors.each do |file_accessor|
file_accessors = pod_target.file_accessors.reject { |fa| fa.spec.test_specification? }
file_accessors.each do |file_accessor|
# Private headers will always end up in Pods/Headers/Private/PodA/*.h
# This will allow for `""` imports to work.
header_mappings(headers_sandbox, file_accessor, file_accessor.headers).each do |namespaced_path, files|
......
......@@ -114,13 +114,29 @@ module Pod
)
end
it "doesn't link public headers from vendored framework, when frameworks required" do
Target.any_instance.stubs(:requires_frameworks?).returns(true)
it 'does not link public headers from vendored framework, when frameworks required' do
@pod_target.stubs(:requires_frameworks?).returns(true)
@installer.install!
headers_root = config.sandbox.public_headers.root
framework_header = headers_root + 'BananaLib/Bananalib/Bananalib.h'
framework_header.should.not.exist
end
it 'does not symlink headers that belong to test specs' do
coconut_spec = fixture_spec('coconut-lib/CoconutLib.podspec')
coconut_test_spec = coconut_spec.test_specs.first
coconut_pod_target = fixture_pod_target_with_specs([coconut_spec, coconut_test_spec], false)
public_headers_root = config.sandbox.public_headers.root
private_headers_root = coconut_pod_target.build_headers.root
project = Project.new(config.sandbox.project_path)
project.add_pod_group('CoconutLib', fixture('coconut-lib'))
installer = FileReferencesInstaller.new(config.sandbox, [coconut_pod_target], project)
installer.install!
(public_headers_root + 'CoconutLib/Coconut.h').should.exist
(public_headers_root + 'CoconutLib/CoconutTestHeader.h').should.not.exist
(private_headers_root + 'CoconutLib/Coconut.h').should.exist
(private_headers_root + 'CoconutLib/CoconutTestHeader.h').should.not.exist
end
end
#-------------------------------------------------------------------------#
......
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