Commit 122c8d98 authored by Boris Bügling's avatar Boris Bügling

Make the filtering of frameworks warning work.

Logical expressions are hard.
parent a06299dc
...@@ -509,9 +509,8 @@ module Pod ...@@ -509,9 +509,8 @@ module Pod
def parse_xcodebuild_output(output) def parse_xcodebuild_output(output)
lines = output.split("\n") lines = output.split("\n")
selected_lines = lines.select do |l| selected_lines = lines.select do |l|
l.include?('error: ') && (l !~ /frameworks only run on iOS 8/) && l.include?('error: ') && (l !~ /errors? generated\./) && (l !~ /error: \(null\)/) ||
(l !~ /errors? generated\./) && (l !~ /error: \(null\)/) || l.include?('warning: ') && (l !~ /warnings? generated\./) && (l !~ /frameworks only run on iOS 8/) ||
l.include?('warning: ') && (l !~ /warnings? generated\./) ||
l.include?('note: ') && (l !~ /expanded from macro/) l.include?('note: ') && (l !~ /expanded from macro/)
end end
selected_lines.map do |l| selected_lines.map do |l|
......
...@@ -395,6 +395,15 @@ module Pod ...@@ -395,6 +395,15 @@ module Pod
validator.results.count.should == 0 validator.results.count.should == 0
end end
it 'does filter embedded frameworks warnings' do
validator = Validator.new(podspec_path, SourcesManager.master.map(&:url))
validator.stubs(:check_file_patterns)
validator.stubs(:xcodebuild).returns('ld: warning: embedded dylibs/frameworks only run on iOS 8 or later.')
validator.stubs(:validate_url)
validator.validate
validator.results.count.should == 0
end
describe 'file pattern validation' do describe 'file pattern validation' do
it 'checks for file patterns' do it 'checks for file patterns' do
file = write_podspec(stub_podspec(/.*source_files.*/, '"source_files": "wrong_paht.*",')) file = write_podspec(stub_podspec(/.*source_files.*/, '"source_files": "wrong_paht.*",'))
......
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