Set HOMEBREW_DEBUG when running brew tests --debug

- This will cause the "debug" gem to be required in `spec_helper.rb`, so we can do interactive debugging.
This commit is contained in:
Issy Long 2024-04-17 22:17:47 +01:00
parent 9cf5334469
commit 4c64193b9b
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View File

@ -45,8 +45,6 @@ module Homebrew
# Given we might be testing various commands, we probably want everything (except sorbet-static)
Homebrew.install_bundler_gems!(groups: Homebrew.valid_gem_groups - ["sorbet"])
require "debug" if args.debug?
HOMEBREW_LIBRARY_PATH.cd do
setup_environment!
@ -137,6 +135,8 @@ module Homebrew
puts "Randomized with seed #{seed}"
ENV["HOMEBREW_DEBUG"] = "1" if args.debug? # Used in spec_helper.rb to require the "debug" gem.
# Submit test flakiness information using BuildPulse
# BUILDPULSE used in spec_helper.rb
if use_buildpulse?

View File

@ -69,8 +69,6 @@ RSpec.describe Migrator do
tab.source["tap"] = "homebrew/core"
tab.write
binding.b
expect do
described_class.new(new_formula, "oldname")
end.to raise_error(Migrator::MigratorDifferentTapsError)

View File

@ -37,6 +37,8 @@ require_relative "support/extend/cachable"
require_relative "../global"
require "debug" if ENV["HOMEBREW_DEBUG"]
require "test/support/quiet_progress_formatter"
require "test/support/helper/cask"
require "test/support/helper/files"