Commit f689cda8 authored by Eloy Durán's avatar Eloy Durán

Ensure all integration specs are run and fix specs on Travis & RBX

parent 17b8ab56
...@@ -43,18 +43,16 @@ else ...@@ -43,18 +43,16 @@ else
$?.should.be.success $?.should.be.success
end end
puts " ! ".red << "Skipping xcodebuild based checks, because it can't be found." if `which xcodebuild`.strip.empty? puts " ! ".red << "Skipping xcodebuild based checks, because it can't be found." if skip_xcodebuild?
def should_xcodebuild(target_definition) def should_xcodebuild(target_definition)
return if `which xcodebuilda`.strip.empty? return if skip_xcodebuild?
target = target_definition target = target_definition
with_xcodebuild_available do Dir.chdir(config.project_pods_root) do
Dir.chdir(config.project_pods_root) do print "[!] Compiling #{target.label}...\r"
print "[!] Compiling #{target.label}...\r" should_successfully_perform "xcodebuild -target '#{target.label}'"
should_successfully_perform "xcodebuild -target '#{target.label}'" lib_path = config.project_pods_root + "build/Release#{'-iphoneos' if target.platform == :ios}" + target.lib_name
lib_path = config.project_pods_root + "build/Release#{'-iphoneos' if target.platform == :ios}" + target.lib_name `lipo -info '#{lib_path}'`.should.include "#{target.platform == :ios ? 'armv7' : 'x86_64'}"
`lipo -info '#{lib_path}'`.should.include "architecture: #{target.platform == :ios ? 'armv7' : 'x86_64'}"
end
end end
end end
......
...@@ -22,6 +22,9 @@ require 'spec_helper/user_interface' ...@@ -22,6 +22,9 @@ require 'spec_helper/user_interface'
require 'spec_helper/pre_flight' require 'spec_helper/pre_flight'
ENV['SKIP_SETUP'] = 'true' ENV['SKIP_SETUP'] = 'true'
if ENV['SKIP_XCODEBUILD'].nil? && `which xcodebuild`.strip.empty?
ENV['SKIP_XCODEBUILD'] = 'true'
end
require 'claide' require 'claide'
...@@ -31,8 +34,8 @@ module Bacon ...@@ -31,8 +34,8 @@ module Bacon
include SpecHelper::Fixture include SpecHelper::Fixture
include SpecHelper::Command include SpecHelper::Command
def argv(*argv) def skip_xcodebuild?
CLAide::ARGV.new(argv) ENV['SKIP_XCODEBUILD']
end end
end end
end end
......
...@@ -2,6 +2,10 @@ require 'spec_helper/temporary_directory' ...@@ -2,6 +2,10 @@ require 'spec_helper/temporary_directory'
module SpecHelper module SpecHelper
module Command module Command
def argv(*argv)
CLAide::ARGV.new(argv)
end
def command(*argv) def command(*argv)
argv << '--no-color' argv << '--no-color'
Pod::Command.parse(argv) Pod::Command.parse(argv)
......
...@@ -94,12 +94,14 @@ describe "Pod::Command::Linter" do ...@@ -94,12 +94,14 @@ describe "Pod::Command::Linter" do
linter.errors.join(' | ').should =~ /`config.ios\?' and `config.osx\?' are deprecated/ linter.errors.join(' | ').should =~ /`config.ios\?' and `config.osx\?' are deprecated/
end end
it "uses xcodebuild to generate notes and warnings" do unless skip_xcodebuild?
file = write_podspec(stub_podspec) it "uses xcodebuild to generate notes and warnings" do
linter = Pod::Command::Spec::Linter.new(file) file = write_podspec(stub_podspec)
linter.lint linter = Pod::Command::Spec::Linter.new(file)
linter.result_type.should == :warning linter.lint
linter.notes.join(' | ').should.include "JSONKit/JSONKit.m:1640:27: warning: equality comparison with extraneous parentheses" unless `which xcodebuild`.strip.empty? linter.result_type.should == :warning
linter.notes.join(' | ').should.include "JSONKit/JSONKit.m:1640:27: warning: equality comparison with extraneous parentheses"
end
end end
it "checks for file patterns" do it "checks for file patterns" do
......
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