Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
5c6518fd
Commit
5c6518fd
authored
May 20, 2016
by
Thomas Van Lenten
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1583 from thomasvl/pods_integration_followup
Make the CocoaPods integration tests more robust
parents
2338e035
6c47faa8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
14 deletions
+36
-14
Podfile-framework
...ivec/Tests/CocoaPods/OSXCocoaPodsTester/Podfile-framework
+1
-3
Podfile-static
objectivec/Tests/CocoaPods/OSXCocoaPodsTester/Podfile-static
+8
-0
Podfile-framework
...ivec/Tests/CocoaPods/iOSCocoaPodsTester/Podfile-framework
+1
-3
Podfile-static
objectivec/Tests/CocoaPods/iOSCocoaPodsTester/Podfile-static
+8
-0
run_tests.sh
objectivec/Tests/CocoaPods/run_tests.sh
+18
-8
No files found.
objectivec/Tests/CocoaPods/OSXCocoaPodsTester/Podfile
→
objectivec/Tests/CocoaPods/OSXCocoaPodsTester/Podfile
-framework
View file @
5c6518fd
...
...
@@ -3,9 +3,7 @@ platform :osx, '10.9'
install! 'cocoapods', :deterministic_uuids => false
if
ENV
[
'USE_FRAMEWORKS'
]
==
'YES'
then
use_frameworks!
end
use_frameworks!
target 'OSXCocoaPodsTester' do
pod 'Protobuf', :path => '../../../..'
...
...
objectivec/Tests/CocoaPods/OSXCocoaPodsTester/Podfile-static
0 → 100644
View file @
5c6518fd
source 'https://github.com/CocoaPods/Specs.git'
platform :osx, '10.9'
install! 'cocoapods', :deterministic_uuids => false
target 'OSXCocoaPodsTester' do
pod 'Protobuf', :path => '../../../..'
end
objectivec/Tests/CocoaPods/iOSCocoaPodsTester/Podfile
→
objectivec/Tests/CocoaPods/iOSCocoaPodsTester/Podfile
-framework
View file @
5c6518fd
...
...
@@ -3,9 +3,7 @@ platform :ios, '8.0'
install! 'cocoapods', :deterministic_uuids => false
if
ENV
[
'USE_FRAMEWORKS'
]
==
'YES'
then
use_frameworks!
end
use_frameworks!
target 'iOSCocoaPodsTester' do
pod 'Protobuf', :path => '../../../..'
...
...
objectivec/Tests/CocoaPods/iOSCocoaPodsTester/Podfile-static
0 → 100644
View file @
5c6518fd
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
install! 'cocoapods', :deterministic_uuids => false
target 'iOSCocoaPodsTester' do
pod 'Protobuf', :path => '../../../..'
end
objectivec/Tests/CocoaPods/run_tests.sh
View file @
5c6518fd
...
...
@@ -31,7 +31,7 @@ OPTIONS:
EOF
}
TEST_MODES
=(
"
yes"
"no
"
)
TEST_MODES
=(
"
static"
"framework
"
)
TEST_NAMES
=(
"iOSCocoaPodsTester"
"OSXCocoaPodsTester"
)
while
[[
$#
!=
0
]]
;
do
case
"
${
1
}
"
in
...
...
@@ -40,10 +40,10 @@ while [[ $# != 0 ]]; do
exit
0
;;
--skip-static
)
TEST_MODES
=(
${
TEST_MODES
[@]/
no
}
)
TEST_MODES
=(
${
TEST_MODES
[@]/
static
}
)
;;
--skip-framework
)
TEST_MODES
=(
${
TEST_MODES
[@]/
yes
}
)
TEST_MODES
=(
${
TEST_MODES
[@]/
framework
}
)
;;
--skip-ios
)
TEST_NAMES
=(
${
TEST_NAMES
[@]/iOSCocoaPodsTester
}
)
...
...
@@ -93,24 +93,34 @@ cleanup() {
# incase something does hiccup.
xcodebuild
-workspace
"
${
TEST_NAME
}
.xcworkspace"
-scheme
"
${
TEST_NAME
}
"
clean
>
/dev/null
||
true
pod deintegrate
>
/dev/null
||
true
# Delete the files left after pod deintegrate
# Flush the cache so nothing is left behind.
pod cache clean
--all
||
true
# Delete the files left after pod deintegrate.
rm
-f
Podfile.lock
||
true
rm
-rf
"
${
TEST_NAME
}
.xcworkspace"
||
true
git checkout
--
"
${
TEST_NAME
}
.xcodeproj"
||
true
# Remove the Podfile that was put in place.
rm
-f
Podfile
||
true
}
do_test
()
{
local
TEST_NAME
=
"
$1
"
local
USE_FRAMEWORKS_VALU
E
=
"
$2
"
local
TEST_MOD
E
=
"
$2
"
header
"
${
TEST_NAME
}
"
-
USE_FRAMEWORKS:
"
${
USE_FRAMEWORKS_VALU
E
}
"
header
"
${
TEST_NAME
}
"
-
Mode:
"
${
TEST_MOD
E
}
"
cd
"
${
ScriptDir
}
/
${
TEST_NAME
}
"
# Hook in cleanup for any failures.
trap
"cleanup
${
TEST_NAME
}
"
EXIT
# Invoke pod and then xcodebuild, but catch the results so we can cleanup.
USE_FRAMEWORKS
=
"
${
USE_FRAMEWORKS_VALUE
}
"
pod
install
# Ensure nothing is cached by pods to start with that could throw things off.
pod cache clean
--all
# Put the right Podfile in place.
cp
-f
"Podfile-
${
TEST_MODE
}
"
"Podfile"
# Do the work!
pod
install
--verbose
xcodebuild
-workspace
"
${
TEST_NAME
}
.xcworkspace"
-scheme
"
${
TEST_NAME
}
"
build
# Clear the hook and manually run cleanup.
...
...
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