Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
ca5d2790
Commit
ca5d2790
authored
May 31, 2017
by
Dimitris Koutsogiorgas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure product name for tests is not overridden by custom build settings
parent
a1ffccca
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
CHANGELOG.md
CHANGELOG.md
+4
-0
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+6
-5
pod_target_installer_spec.rb
...xcode/pods_project_generator/pod_target_installer_spec.rb
+3
-0
No files found.
CHANGELOG.md
View file @
ca5d2790
...
...
@@ -34,6 +34,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
*
Ensure product name for tests is not overridden by custom build settings
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6766
](
https://github.com/CocoaPods/CocoaPods/pull/6766
)
*
Do not use the same product name for test targets
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#6762
](
https://github.com/CocoaPods/CocoaPods/pull/6762
)
...
...
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
ca5d2790
...
...
@@ -179,10 +179,7 @@ module Pod
platform
=
target
.
platform
.
name
language
=
target
.
uses_swift?
?
:
swift
:
:objc
native_test_target
=
project
.
new_target
(
product_type
,
name
,
platform
,
deployment_target
,
nil
,
language
)
product_name
=
name
product
=
native_test_target
.
product_reference
product
.
name
=
product_name
native_test_target
.
product_reference
.
name
=
name
target
.
user_build_configurations
.
each
do
|
bc_name
,
type
|
native_test_target
.
add_build_configuration
(
bc_name
,
type
)
...
...
@@ -190,9 +187,13 @@ module Pod
native_test_target
.
build_configurations
.
each
do
|
configuration
|
configuration
.
build_settings
.
merge!
(
custom_build_settings
)
# target_installer will automatically add an empt
h
`OTHER_LDFLAGS`. For test
# target_installer will automatically add an empt
y
`OTHER_LDFLAGS`. For test
# targets those are set via a test xcconfig file instead.
configuration
.
build_settings
.
delete
(
'OTHER_LDFLAGS'
)
# target_installer will automatically set the product name to the module name if the target
# requires frameworks. For tests we always use the test target name as the product name
# irrelevant to whether we use frameworks or not.
configuration
.
build_settings
[
'PRODUCT_NAME'
]
=
name
end
target
.
test_native_targets
<<
native_test_target
...
...
spec/unit/installer/xcode/pods_project_generator/pod_target_installer_spec.rb
View file @
ca5d2790
...
...
@@ -188,6 +188,9 @@ module Pod
native_test_target
=
@project
.
targets
[
1
]
native_test_target
.
name
.
should
==
'CoconutLib-Unit-Tests'
native_test_target
.
product_reference
.
name
.
should
==
'CoconutLib-Unit-Tests'
native_test_target
.
build_configurations
.
each
do
|
bc
|
bc
.
build_settings
[
'PRODUCT_NAME'
].
should
==
'CoconutLib-Unit-Tests'
end
native_test_target
.
symbol_type
.
should
==
:unit_test_bundle
@coconut_pod_target
.
test_native_targets
.
count
.
should
==
1
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment