Skip to content

Commit

Permalink
Merge pull request #74 from MikeMcQuaid/rm-etc-var-cleanup
Browse files Browse the repository at this point in the history
test-bot: only remove etc/var on --cleanup.
  • Loading branch information
MikeMcQuaid committed May 3, 2017
2 parents d4b8ae2 + e4d25d3 commit 978d5ba
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions cmd/brew-test-bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -678,9 +678,10 @@ def formula(formula_name)
run_as_not_developer do
if !ARGV.include?("--fast") || formula_bottled || formula.bottle_unneeded?
test "brew", "install", "--only-dependencies", *install_args unless dependencies.empty?
# Nuke etc/var to have them be clean to detect bottle etc/var file additions.
FileUtils.rm_rf "#{HOMEBREW_PREFIX}/etc"
FileUtils.rm_rf "#{HOMEBREW_PREFIX}/var"
if ARGV.include? "--cleanup"
# Nuke etc/var to have them be clean to detect bottle etc/var file additions.
FileUtils.rm_rf ["#{HOMEBREW_PREFIX}/etc", "#{HOMEBREW_PREFIX}/var"]
end
test "brew", "install", *install_args
install_passed = steps.last.passed?
end
Expand Down Expand Up @@ -751,9 +752,10 @@ def formula(formula_name)
&& satisfied_requirements?(formula, :devel)
test "brew", "fetch", "--retry", "--devel", *fetch_args
run_as_not_developer do
# Nuke etc/var to have them be clean to detect bottle etc/var file additions.
FileUtils.rm_rf "#{HOMEBREW_PREFIX}/etc"
FileUtils.rm_rf "#{HOMEBREW_PREFIX}/var"
if ARGV.include? "--cleanup"
# Nuke etc/var to have them be clean to detect bottle etc/var file additions.
FileUtils.rm_rf ["#{HOMEBREW_PREFIX}/etc", "#{HOMEBREW_PREFIX}/var"]
end
test "brew", "install", "--devel", formula_name, *shared_install_args
end
devel_install_passed = steps.last.passed?
Expand Down

0 comments on commit 978d5ba

Please sign in to comment.