aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2014-12-18 17:03:17 +0000
committerMike McQuaid2014-12-23 19:14:30 +0000
commit291f402920f28effb42b2ce34c501054b73a560a (patch)
tree0f97734f7a35a912aa9bfa56303e227937ca33d4 /Library
parent187bdf732315001264712708dc73e78229524d6c (diff)
downloadhomebrew-291f402920f28effb42b2ce34c501054b73a560a.tar.bz2
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 #35092. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/test-bot.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb
index 3ae49ea38..999f03446 100644
--- a/Library/Homebrew/cmd/test-bot.rb
+++ b/Library/Homebrew/cmd/test-bot.rb
@@ -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