Skip to content
Snippets Groups Projects
Commit 407b8240 authored by Tim D. Smith's avatar Tim D. Smith
Browse files

test-bot: don't check deps until taps are tapped

brew deps will fail silently if a formula has dependencies which live in
taps that have not yet been tapped. Delay checking brew deps until after
tap dependencies are discovered.

Closes Homebrew/homebrew#38424.
parent ac16822a
No related branches found
No related tags found
No related merge requests found
......@@ -366,24 +366,6 @@ module Homebrew
end
test "brew", "uses", canonical_formula_name
installed = Utils.popen_read("brew", "list").split("\n")
dependencies = Utils.popen_read("brew", "deps", "--skip-optional",
canonical_formula_name).split("\n")
dependencies -= installed
unchanged_dependencies = dependencies - @formulae
changed_dependences = dependencies - unchanged_dependencies
runtime_dependencies = Utils.popen_read("brew", "deps",
"--skip-build", "--skip-optional",
canonical_formula_name).split("\n")
build_dependencies = dependencies - runtime_dependencies
unchanged_build_dependencies = build_dependencies - @formulae
dependents = Utils.popen_read("brew", "uses", "--skip-build", "--skip-optional", canonical_formula_name).split("\n")
dependents -= @formulae
dependents = dependents.map {|d| Formulary.factory(d)}
testable_dependents = dependents.select { |d| d.test_defined? && d.bottled? }
formula = Formulary.factory(canonical_formula_name)
installed_gcc = false
......@@ -426,6 +408,25 @@ module Homebrew
return
end
installed = Utils.popen_read("brew", "list").split("\n")
dependencies = Utils.popen_read("brew", "deps", "--skip-optional",
canonical_formula_name).split("\n")
dependencies -= installed
unchanged_dependencies = dependencies - @formulae
changed_dependences = dependencies - unchanged_dependencies
runtime_dependencies = Utils.popen_read("brew", "deps",
"--skip-build", "--skip-optional",
canonical_formula_name).split("\n")
build_dependencies = dependencies - runtime_dependencies
unchanged_build_dependencies = build_dependencies - @formulae
dependents = Utils.popen_read("brew", "uses", "--skip-build", "--skip-optional", canonical_formula_name).split("\n")
dependents -= @formulae
dependents = dependents.map {|d| Formulary.factory(d)}
testable_dependents = dependents.select { |d| d.test_defined? && d.bottled? }
if (deps | reqs).any? { |d| d.name == "mercurial" && d.build? }
test "brew", "install", "mercurial"
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment