Skip to content
Snippets Groups Projects
Commit f475f750 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

test-bot: test bottled dependents.


Test everything that `brew uses` a formula, has a bottle and a test.

This should allow some quick gains in terms of spotting formulae that may need
revisioned to avoid problems with shifting dependencies. As the test-bot lives
in a data centre with (very) fast internet the fetch and extraction time
shouldn't slow things down much.

Closes Homebrew/homebrew#35092.

Signed-off-by: default avatarMike McQuaid <mike@mikemcquaid.com>
parent 73ff7395
No related branches found
No related tags found
No related merge requests found
......@@ -352,6 +352,14 @@ module Homebrew
dependencies -= `brew list`.split("\n")
unchanged_dependencies = dependencies - @formulae
changed_dependences = dependencies - unchanged_dependencies
dependents = `brew uses #{formula_name}`.split("\n")
testable_dependents = dependents.map {|d| Formulary.factory(d)}
testable_dependents.select! {|d| d.test_defined? && d.stable.bottled? }
uninstalled_testable_dependents = testable_dependents.reject {|d| d.installed? }
testable_dependents.map! &:name
uninstalled_testable_dependents.map! &:name
formula = Formulary.factory(formula_name)
return unless satisfied_requirements?(formula, :stable)
......@@ -421,6 +429,11 @@ module Homebrew
end
end
test "brew", "test", "--verbose", formula_name if formula.test_defined?
if testable_dependents.any?
test "brew", "fetch", *uninstalled_testable_dependents
test "brew", "install", *uninstalled_testable_dependents
test "brew", "test", *testable_dependents
end
test "brew", "uninstall", "--force", formula_name
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