aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/test-bot.rb
diff options
context:
space:
mode:
authorMike McQuaid2014-12-18 17:03:17 +0000
committerMike McQuaid2014-12-23 19:14:30 +0000
commitf475f750f92ba9456a4d37b1311196ad6e46f77a (patch)
tree6e313ceebfc88548a2d95032f7985441ca7a1499 /Library/Homebrew/cmd/test-bot.rb
parent73ff7395839dee412f70c010f739210a8fd2a63a (diff)
downloadbrew-f475f750f92ba9456a4d37b1311196ad6e46f77a.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 Homebrew/homebrew#35092. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/cmd/test-bot.rb')
-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