Skip to content

Commit

Permalink
test: add integrtion test for spm and include package references in p…
Browse files Browse the repository at this point in the history
…roduct dump
  • Loading branch information
mfazekas committed Jul 1, 2023
1 parent c24c80d commit 587a0b5
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
url = https://github.com/tonymillion/Reachability.git
[submodule "spec/cocoapods-integration-specs"]
path = spec/cocoapods-integration-specs
url = https://github.com/CocoaPods/cocoapods-integration-specs.git
url = https://github.com/mfazekas/cocoapods-integration-specs.git
branch = podspec-spm
[submodule "spec/fixtures/spec-repos/test_repo"]
path = spec/fixtures/spec-repos/test_repo
url = https://github.com/CocoaPods/cocoapods-test-specs.git
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ gemspec

group :development do
cp_gem 'claide', 'CLAide'
cp_gem 'cocoapods-core', 'Core'
# cp_gem 'cocoapods-core', 'Core'
gem 'cocoapods-core', :git => 'https://github.com/mfazekas/Core', branch: 'podspec-spm'
cp_gem 'cocoapods-deintegrate', 'cocoapods-deintegrate'
cp_gem 'cocoapods-downloader', 'cocoapods-downloader'
cp_gem 'cocoapods-plugins', 'cocoapods-plugins'
Expand Down
32 changes: 16 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,6 @@ GIT
specs:
claide (1.1.0)

GIT
remote: https://github.com/CocoaPods/Core.git
revision: 9320bf557741d7ae80eda4415bc6fb2b0b3a8b9c
branch: master
specs:
cocoapods-core (1.12.1)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix (~> 4.0)
typhoeus (~> 1.0)

GIT
remote: https://github.com/CocoaPods/Molinillo.git
revision: 6bc3d6045edadf800ba1b634fef15d3574369e60
Expand Down Expand Up @@ -108,6 +92,22 @@ GIT
specs:
bacon (1.2.0)

GIT
remote: https://github.com/mfazekas/Core
revision: 8524bb4f428992f6ad5f822181c820be2bf4126d
branch: podspec-spm
specs:
cocoapods-core (1.12.1)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix (~> 4.0)
typhoeus (~> 1.0)

GIT
remote: https://github.com/mrackwitz/CLIntegracon.git
revision: ca88b7b8920b6b6542f9b4ad2b1748855783dbae
Expand Down
2 changes: 1 addition & 1 deletion spec/cocoapods-integration-specs
Submodule cocoapods-integration-specs updated 27 files
+12 −0 install_spm_dependency/after/Podfile.lock
+1 −0 install_spm_dependency/after/Pods/Headers/Private/Reachability/Reachability.h
+1 −0 install_spm_dependency/after/Pods/Headers/Public/Reachability/Reachability.h
+36 −0 install_spm_dependency/after/Pods/Local Podspecs/Reachability.podspec.json
+12 −0 install_spm_dependency/after/Pods/Manifest.lock
+251 −0 install_spm_dependency/after/Pods/Pods.xcodeproj/project.pbxproj
+58 −0 ...m_dependency/after/Pods/Pods.xcodeproj/xcuserdata/INTEGRATION.xcuserdatad/xcschemes/Pods-SampleApp.xcscheme
+58 −0 ...spm_dependency/after/Pods/Pods.xcodeproj/xcuserdata/INTEGRATION.xcuserdatad/xcschemes/Reachability.xcscheme
+21 −0 ..._dependency/after/Pods/Pods.xcodeproj/xcuserdata/INTEGRATION.xcuserdatad/xcschemes/xcschememanagement.plist
+48 −0 install_spm_dependency/after/Pods/Reachability/README.md
+116 −0 install_spm_dependency/after/Pods/Reachability/Reachability.h
+512 −0 install_spm_dependency/after/Pods/Reachability/Reachability.m
+3 −0 install_spm_dependency/after/Pods/Target Support Files/Pods-SampleApp/Pods-SampleApp-acknowledgements.markdown
+29 −0 install_spm_dependency/after/Pods/Target Support Files/Pods-SampleApp/Pods-SampleApp-acknowledgements.plist
+5 −0 install_spm_dependency/after/Pods/Target Support Files/Pods-SampleApp/Pods-SampleApp-dummy.m
+11 −0 install_spm_dependency/after/Pods/Target Support Files/Pods-SampleApp/Pods-SampleApp.debug.xcconfig
+11 −0 install_spm_dependency/after/Pods/Target Support Files/Pods-SampleApp/Pods-SampleApp.release.xcconfig
+5 −0 install_spm_dependency/after/Pods/Target Support Files/Reachability/Reachability-dummy.m
+12 −0 install_spm_dependency/after/Pods/Target Support Files/Reachability/Reachability-prefix.pch
+13 −0 install_spm_dependency/after/Pods/Target Support Files/Reachability/Reachability.debug.xcconfig
+13 −0 install_spm_dependency/after/Pods/Target Support Files/Reachability/Reachability.release.xcconfig
+132 −0 install_spm_dependency/after/SampleApp.xcodeproj/project.pbxproj
+10 −0 install_spm_dependency/after/SampleApp.xcworkspace/contents.xcworkspacedata
+57 −0 install_spm_dependency/after/execution_output.txt
+4 −0 install_spm_dependency/before/Podfile
+18 −0 install_spm_dependency/before/Reachability.podspec
+309 −0 install_spm_dependency/before/SampleApp.xcodeproj/project.pbxproj
5 changes: 5 additions & 0 deletions spec/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,11 @@
'install --no-repo-update'
end

describe 'Installs a podspec with SPM dependencies' do
behaves_like cli_spec 'install_spm_dependency',
'install --no-repo-update'
end

describe 'Integrates a Pod with circular subspec dependencies' do
behaves_like cli_spec 'install_circular_subspec_dependency',
'install --no-repo-update'
Expand Down
3 changes: 3 additions & 0 deletions spec/integration/xcodeproj_project_yaml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ def to_yaml
yaml = { key => pretty_print_output[key] }.to_yaml
sections << yaml
end
if root_object.package_references.any?
sections << {'Package References' => root_object.package_references.map(&:to_hash)}.to_yaml
end
(sections * "\n\n").gsub!('---', '')
end
end

0 comments on commit 587a0b5

Please sign in to comment.