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

test-bot: fetch/audit formulae despite requirement

It's still useful to do a basic test even if requirements cannot be
satisfied.
parent d2a44869
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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