diff --git a/Library/Homebrew/test/lib/config.rb b/Library/Homebrew/test/lib/config.rb index 10c3c8cd75..91ef9fe8af 100644 --- a/Library/Homebrew/test/lib/config.rb +++ b/Library/Homebrew/test/lib/config.rb @@ -10,12 +10,15 @@ TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") { |k| ENV[k] = dir } -HOMEBREW_PREFIX = Pathname.new(TEST_TMPDIR).join("prefix") -HOMEBREW_REPOSITORY = HOMEBREW_PREFIX -HOMEBREW_LIBRARY = HOMEBREW_REPOSITORY+"Library" +# Paths pointing into the Homebrew code base that persist across test runs HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../..", __FILE__)) HOMEBREW_ENV_PATH = HOMEBREW_LIBRARY_PATH.parent+"ENV" HOMEBREW_LOAD_PATH = [File.expand_path("..", __FILE__), HOMEBREW_LIBRARY_PATH].join(":") + +# Paths redirected to a temporary directory and wiped at the end of the test run +HOMEBREW_PREFIX = Pathname.new(TEST_TMPDIR).join("prefix") +HOMEBREW_REPOSITORY = HOMEBREW_PREFIX +HOMEBREW_LIBRARY = HOMEBREW_REPOSITORY+"Library" HOMEBREW_CACHE = HOMEBREW_PREFIX.parent+"cache" HOMEBREW_CACHE_FORMULA = HOMEBREW_PREFIX.parent+"formula_cache" HOMEBREW_LOCK_DIR = HOMEBREW_PREFIX.parent+"locks"