Remove unnecessary official command tapping.
This commit is contained in:
parent
8bb315620e
commit
a1b0ef1300
@ -7,21 +7,16 @@ require "tap"
|
|||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
def tests
|
def tests
|
||||||
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
|
|
||||||
|
|
||||||
if ARGV.include? "--official-cmd-taps"
|
|
||||||
ENV["HOMEBREW_TEST_OFFICIAL_CMD_TAPS"] = "1"
|
|
||||||
OFFICIAL_CMD_TAPS.each do |tap, _|
|
|
||||||
tap = Tap.fetch tap
|
|
||||||
tap.install unless tap.installed?
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
(HOMEBREW_LIBRARY/"Homebrew/test").cd do
|
(HOMEBREW_LIBRARY/"Homebrew/test").cd do
|
||||||
|
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
|
||||||
ENV["TESTOPTS"] = "-v" if ARGV.verbose?
|
ENV["TESTOPTS"] = "-v" if ARGV.verbose?
|
||||||
ENV["HOMEBREW_NO_COMPAT"] = "1" if ARGV.include? "--no-compat"
|
ENV["HOMEBREW_NO_COMPAT"] = "1" if ARGV.include? "--no-compat"
|
||||||
ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if ARGV.include? "--generic"
|
ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if ARGV.include? "--generic"
|
||||||
ENV["HOMEBREW_NO_GITHUB_API"] = "1" unless ARGV.include? "--online"
|
ENV["HOMEBREW_NO_GITHUB_API"] = "1" unless ARGV.include? "--online"
|
||||||
|
if ARGV.include? "--official-cmd-taps"
|
||||||
|
ENV["HOMEBREW_TEST_OFFICIAL_CMD_TAPS"] = "1"
|
||||||
|
end
|
||||||
|
|
||||||
if ARGV.include? "--coverage"
|
if ARGV.include? "--coverage"
|
||||||
ENV["HOMEBREW_TESTS_COVERAGE"] = "1"
|
ENV["HOMEBREW_TESTS_COVERAGE"] = "1"
|
||||||
FileUtils.rm_f "coverage/.resultset.json"
|
FileUtils.rm_f "coverage/.resultset.json"
|
||||||
|
|||||||
@ -656,9 +656,6 @@ module Homebrew
|
|||||||
if @tap.nil?
|
if @tap.nil?
|
||||||
tests_args = []
|
tests_args = []
|
||||||
if ruby_two
|
if ruby_two
|
||||||
test "brew", "tap", "caskroom/cask"
|
|
||||||
test "brew", "tap", "homebrew/bundle"
|
|
||||||
test "brew", "tap", "homebrew/services"
|
|
||||||
tests_args << "--official-cmd-taps"
|
tests_args << "--official-cmd-taps"
|
||||||
tests_args << "--coverage" if ENV["TRAVIS"]
|
tests_args << "--coverage" if ENV["TRAVIS"]
|
||||||
end
|
end
|
||||||
|
|||||||
@ -130,6 +130,12 @@ class IntegrationCommandTests < Homebrew::TestCase
|
|||||||
formula_path
|
formula_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def setup_remote_tap(name)
|
||||||
|
tap = Tap.fetch name
|
||||||
|
tap.install(:full_clone => false, :quiet => true) unless tap.installed?
|
||||||
|
tap
|
||||||
|
end
|
||||||
|
|
||||||
def testball
|
def testball
|
||||||
"#{File.expand_path("..", __FILE__)}/testball.rb"
|
"#{File.expand_path("..", __FILE__)}/testball.rb"
|
||||||
end
|
end
|
||||||
@ -677,6 +683,7 @@ class IntegrationCommandTests < Homebrew::TestCase
|
|||||||
|
|
||||||
def test_bundle
|
def test_bundle
|
||||||
needs_test_cmd_taps
|
needs_test_cmd_taps
|
||||||
|
setup_remote_tap("homebrew/bundle")
|
||||||
HOMEBREW_REPOSITORY.cd do
|
HOMEBREW_REPOSITORY.cd do
|
||||||
shutup do
|
shutup do
|
||||||
system "git", "init"
|
system "git", "init"
|
||||||
@ -693,16 +700,24 @@ class IntegrationCommandTests < Homebrew::TestCase
|
|||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
FileUtils.rm_rf HOMEBREW_REPOSITORY/".git"
|
FileUtils.rm_rf HOMEBREW_REPOSITORY/".git"
|
||||||
|
FileUtils.rm_rf HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-bundle"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_cask
|
def test_cask
|
||||||
needs_test_cmd_taps
|
needs_test_cmd_taps
|
||||||
|
setup_remote_tap("caskroom/cask")
|
||||||
cmd("cask", "list")
|
cmd("cask", "list")
|
||||||
|
ensure
|
||||||
|
FileUtils.rm_rf HOMEBREW_LIBRARY/"Taps/caskroom"
|
||||||
|
FileUtils.rm_rf HOMEBREW_PREFIX/"share"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_services
|
def test_services
|
||||||
needs_test_cmd_taps
|
needs_test_cmd_taps
|
||||||
|
setup_remote_tap("homebrew/services")
|
||||||
assert_equal "Warning: No services available to control with `brew services`",
|
assert_equal "Warning: No services available to control with `brew services`",
|
||||||
cmd("services", "list")
|
cmd("services", "list")
|
||||||
|
ensure
|
||||||
|
FileUtils.rm_rf HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-services"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user