test-bot: also build testing bottle.

This commit is contained in:
Mike McQuaid 2016-09-13 08:58:12 +01:00
parent 4295936322
commit 0316830d4f

View File

@ -633,6 +633,7 @@ module Homebrew
bottle_args = ["--verbose", "--json", formula_name] bottle_args = ["--verbose", "--json", formula_name]
bottle_args << "--keep-old" if ARGV.include? "--keep-old" bottle_args << "--keep-old" if ARGV.include? "--keep-old"
bottle_args << "--skip-relocation" if ARGV.include? "--skip-relocation" bottle_args << "--skip-relocation" if ARGV.include? "--skip-relocation"
bottle_args << "--force-core-tap" if @test_default_formula
test "brew", "bottle", *bottle_args test "brew", "bottle", *bottle_args
bottle_step = steps.last bottle_step = steps.last
if bottle_step.passed? && bottle_step.output? if bottle_step.passed? && bottle_step.output?
@ -1019,11 +1020,6 @@ module Homebrew
ARGV << "--fast" ARGV << "--fast"
end end
# TODO: refactor bottle code so this isn't needed.
if ARGV.include? "--test-default-formula"
ARGV << "--no-bottle"
end
if ARGV.include? "--local" if ARGV.include? "--local"
ENV["HOMEBREW_CACHE"] = "#{ENV["HOME"]}/Library/Caches/Homebrew" ENV["HOMEBREW_CACHE"] = "#{ENV["HOME"]}/Library/Caches/Homebrew"
mkdir_p ENV["HOMEBREW_CACHE"] mkdir_p ENV["HOMEBREW_CACHE"]
@ -1053,6 +1049,8 @@ module Homebrew
if ARGV.named.empty? if ARGV.named.empty?
current_test = if ARGV.include?("--test-default-formula") current_test = if ARGV.include?("--test-default-formula")
# Build the default test formula. # Build the default test formula.
HOMEBREW_CACHE_FORMULA.mkpath
FileUtils.cp "#{HOMEBREW_LIBRARY}/Homebrew/test/testbottest.rb", HOMEBREW_CACHE_FORMULA
Test.new("#{HOMEBREW_LIBRARY}/Homebrew/test/testbottest.rb", Test.new("#{HOMEBREW_LIBRARY}/Homebrew/test/testbottest.rb",
:test_default_formula => true, :skip_homebrew => skip_homebrew) :test_default_formula => true, :skip_homebrew => skip_homebrew)
else else