aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/test-bot.rb
diff options
context:
space:
mode:
authorMike McQuaid2015-12-10 10:41:43 +0000
committerMike McQuaid2015-12-10 10:43:45 +0000
commit4b3056e2fc6c2c0bcc7fca630c0e03adc20712ee (patch)
treeda500fd2e287ce1f455c6a3591704cfe321f60a5 /Library/Homebrew/cmd/test-bot.rb
parentd2a44869f0b49f210c42bfe12787fa215a6c150e (diff)
downloadbrew-4b3056e2fc6c2c0bcc7fca630c0e03adc20712ee.tar.bz2
test-bot: fetch/audit formulae despite requirement
It's still useful to do a basic test even if requirements cannot be satisfied.
Diffstat (limited to 'Library/Homebrew/cmd/test-bot.rb')
-rw-r--r--Library/Homebrew/cmd/test-bot.rb29
1 files changed, 19 insertions, 10 deletions
diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb
index 222df08ff..ab2a86c3b 100644
--- a/Library/Homebrew/cmd/test-bot.rb
+++ b/Library/Homebrew/cmd/test-bot.rb
@@ -436,13 +436,28 @@ module Homebrew
deps = []
reqs = []
+ fetch_args = [canonical_formula_name]
+ fetch_args << "--build-bottle" if !ARGV.include?("--fast") && !formula.bottle_disabled?
+ fetch_args << "--force" if ARGV.include? "--cleanup"
+
+ audit_args = [canonical_formula_name]
+ audit_args << "--strict" << "--online" if @added_formulae.include? formula_name
+
if formula.stable
- return unless satisfied_requirements?(formula, :stable)
+ unless satisfied_requirements?(formula, :stable)
+ test "brew", "fetch", "--retry", *fetch_args
+ test "brew", "audit", *audit_args
+ return
+ end
deps |= formula.stable.deps.to_a.reject(&:optional?)
reqs |= formula.stable.requirements.to_a.reject(&:optional?)
elsif formula.devel
- return unless satisfied_requirements?(formula, :devel)
+ unless satisfied_requirements?(formula, :devel)
+ test "brew", "fetch", "--retry", "--devel", *fetch_args
+ test "brew", "audit", "--devel", *audit_args
+ return
+ end
end
if formula.devel && !ARGV.include?("--HEAD")
@@ -531,11 +546,7 @@ module Homebrew
# this step
test "brew", "postinstall", *changed_dependences
end
- formula_fetch_options = []
- formula_fetch_options << "--build-bottle" if !ARGV.include?("--fast") && !formula.bottle_disabled?
- formula_fetch_options << "--force" if ARGV.include? "--cleanup"
- formula_fetch_options << canonical_formula_name
- test "brew", "fetch", "--retry", *formula_fetch_options
+ test "brew", "fetch", "--retry", *fetch_args
test "brew", "uninstall", "--force", canonical_formula_name if formula.installed?
install_args = ["--verbose"]
install_args << "--build-bottle" if !ARGV.include?("--fast") && !formula.bottle_disabled?
@@ -563,8 +574,6 @@ module Homebrew
install_passed = steps.last.passed?
end
end
- audit_args = [canonical_formula_name]
- audit_args << "--strict" << "--online" if @added_formulae.include? formula_name
test "brew", "audit", *audit_args
if install_passed
if formula.stable? && !ARGV.include?("--fast") && !formula.bottle_disabled?
@@ -610,7 +619,7 @@ module Homebrew
if formula.devel && formula.stable? \
&& !ARGV.include?("--HEAD") && !ARGV.include?("--fast") \
&& satisfied_requirements?(formula, :devel)
- test "brew", "fetch", "--retry", "--devel", *formula_fetch_options
+ test "brew", "fetch", "--retry", "--devel", *fetch_args
run_as_not_developer { test "brew", "install", "--devel", "--verbose", canonical_formula_name }
devel_install_passed = steps.last.passed?
test "brew", "audit", "--devel", *audit_args