aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2014-07-29 11:08:18 +0200
committerMike McQuaid2014-07-29 13:38:18 +0200
commit8ad07144f72601d6bf42b71e4b706c3e0f5961dc (patch)
tree147bbdbbbbeb7a0808b93d461fef3755567bcc24 /Library
parent8ca8ec39930a5f10c02851d820535a103956509f (diff)
downloadbrew-8ad07144f72601d6bf42b71e4b706c3e0f5961dc.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.
Diffstat (limited to 'Library')
-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