aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2016-07-04 16:08:53 +0100
committerGitHub2016-07-04 16:08:53 +0100
commit252c701c59227c385ef6178fe99523cca8c843bb (patch)
treeed2bbef375b61cc579438371b76db8f66a9b76d8 /Library/Homebrew/cmd
parent037729351fbb6d6baf7d044eb81544da3848a876 (diff)
downloadbrew-252c701c59227c385ef6178fe99523cca8c843bb.tar.bz2
Test officially supported cmd taps. (#390)
All of these taps use Homebrew internal APIs (or will shortly) and we autoinstall them all from `brew $CMD`. We should adjust our CI to ensure that we never accidentally break these taps when making changes to core code so that these taps can rely more on this core code rather than having to e.g. vendor equivalent code that never changes on our end.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/tests.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/tests.rb b/Library/Homebrew/cmd/tests.rb
index ae10f0f7a..2e6bb647b 100644
--- a/Library/Homebrew/cmd/tests.rb
+++ b/Library/Homebrew/cmd/tests.rb
@@ -1,13 +1,23 @@
#: @hide_from_man_page
-#: * `tests` [`-v`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=`<test_script/test_method>] [`--seed` <seed>] [`--trace`] [`--online`]:
+#: * `tests` [`-v`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=`<test_script/test_method>] [`--seed` <seed>] [`--trace`] [`--online`] [`--official-cmd-taps`]:
#: Run Homebrew's unit and integration tests.
require "fileutils"
+require "tap"
module Homebrew
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
- ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
ENV["TESTOPTS"] = "-v" if ARGV.verbose?
ENV["HOMEBREW_NO_COMPAT"] = "1" if ARGV.include? "--no-compat"
ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if ARGV.include? "--generic"