Skip to content
Snippets Groups Projects
Commit 9e021aa6 authored by Martin Afanasjew's avatar Martin Afanasjew
Browse files

test/lib/config: group paths by persistence


Rearrange path constants such that persistent paths (that point into the
Homebrew code base) are in one spot and all other paths (that are being
redirected to a temporary location for the duration of the test run) are
grouped together.

Closes #440.

Signed-off-by: default avatarMartin Afanasjew <martin@afanasjew.de>
parent 22a47af1
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment