aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2014-07-29 11:08:18 +0200
committerMike McQuaid2014-07-29 13:38:18 +0200
commitb96b10da5c63701d8a59e3b1d27784947bda261c (patch)
treea112435f4da68adc0885832003b1b662600e40ca
parent77ddaf3d2265e0e8e195d6cc9f4a5662f51f07fc (diff)
downloadhomebrew-b96b10da5c63701d8a59e3b1d27784947bda261c.tar.bz2
brew-test-bot: handle changed formulae deps.
If both a formula and its dependencies are changed in a single pull request it'll fail because the bottle block may no longer be correct. Handle this case by ignoring bottle pour failures and fetching the source packages instead of bottles.
-rwxr-xr-xLibrary/Contributions/cmd/brew-test-bot.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Contributions/cmd/brew-test-bot.rb b/Library/Contributions/cmd/brew-test-bot.rb
index b7d254aef..210c5b3a8 100755
--- a/Library/Contributions/cmd/brew-test-bot.rb
+++ b/Library/Contributions/cmd/brew-test-bot.rb
@@ -297,6 +297,8 @@ class Test
test "brew", "uses", formula
dependencies = `brew deps #{formula}`.split("\n")
dependencies -= `brew list`.split("\n")
+ unchanged_dependencies = dependencies - @formulae
+ changed_dependences = dependencies - unchanged_dependencies
formula_object = Formulary.factory(formula)
return unless satisfied_requirements?(formula_object, :stable)
@@ -315,7 +317,8 @@ class Test
return
end
- test "brew", "fetch", "--retry", *dependencies unless dependencies.empty?
+ test "brew", "fetch", "--retry", *unchanged_dependencies unless unchanged_dependencies.empty?
+ test "brew", "fetch", "--retry", "--build-from-source", *changed_dependences unless changed_dependences.empty?
formula_fetch_options = []
formula_fetch_options << "--build-bottle" unless ARGV.include? "--no-bottle"
formula_fetch_options << "--force" if ARGV.include? "--cleanup"
@@ -326,7 +329,10 @@ class Test
install_args << "--build-bottle" unless ARGV.include? "--no-bottle"
install_args << "--HEAD" if ARGV.include? "--HEAD"
install_args << formula
+ # Don't care about e.g. bottle failures for dependencies.
+ ENV["HOMEBREW_DEVELOPER"] = nil
test "brew", "install", "--only-dependencies", *install_args unless dependencies.empty?
+ ENV["HOMEBREW_DEVELOPER"] = "1"
test "brew", "install", *install_args
install_passed = steps.last.passed?
test "brew", "audit", formula