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
0f1fc43a
Commit
0f1fc43a
authored
Feb 17, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Validator] Finally make the xcodebuild failure test work reliably
parent
1399594e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
validator.rb
lib/cocoapods/validator.rb
+13
-4
validator_spec.rb
spec/unit/validator_spec.rb
+3
-1
No files found.
lib/cocoapods/validator.rb
View file @
0f1fc43a
...
...
@@ -521,11 +521,9 @@ module Pod
def
xcodebuild
command
=
'xcodebuild clean build -target Pods CODE_SIGN_IDENTITY=-'
command
<<
' -sdk iphonesimulator'
if
consumer
.
platform_name
==
:ios
output
,
status
=
_xcodebuild
"
#{
command
}
2>&1"
UI
.
puts
command
if
config
.
verbose?
output
=
`
#{
command
}
2>&1`
unless
$?
.
success?
unless
status
.
success?
message
=
'Returned a unsuccessful exit code.'
message
+=
' You can use `--verbose` for more information.'
unless
config
.
verbose?
error
(
'xcodebuild'
,
message
)
...
...
@@ -534,6 +532,17 @@ module Pod
output
end
# Executes the given command in the current working directory.
#
# @return [(String, Status)] The output of the given command and its
# resulting status.
#
def
_xcodebuild
(
command
)
UI
.
puts
command
if
config
.
verbose
output
=
`
#{
command
}
`
return
output
,
$?
end
#-------------------------------------------------------------------------#
end
end
spec/unit/validator_spec.rb
View file @
0f1fc43a
...
...
@@ -364,7 +364,9 @@ module Pod
validator
.
stubs
(
:check_file_patterns
)
validator
.
stubs
(
:validate_url
)
validator
.
stubs
(
:`
).
returns
(
'Output'
)
$?
.
stubs
(
:success?
).
returns
(
false
)
status
=
mock
()
status
.
stubs
(
:success?
).
returns
(
false
)
validator
.
stubs
(
:_xcodebuild
).
returns
([
'Output'
,
status
])
validator
.
validate
first
=
validator
.
results
.
map
(
&
:to_s
).
first
first
.
should
.
include
'[xcodebuild] Returned a unsuccessful exit code'
...
...
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