Explicitly create top-level directories for tests

This commit is contained in:
Jack Nagel 2014-06-23 21:19:26 -05:00
parent 04f504546c
commit f9fd3f46d4

View File

@ -48,9 +48,8 @@ MACOS_VERSION = ENV.fetch('MACOS_VERSION') { MACOS_FULL_VERSION[/10\.\d+/] }
ORIGINAL_PATHS = ENV['PATH'].split(File::PATH_SEPARATOR).map{ |p| Pathname.new(p).expand_path rescue nil }.compact.freeze ORIGINAL_PATHS = ENV['PATH'].split(File::PATH_SEPARATOR).map{ |p| Pathname.new(p).expand_path rescue nil }.compact.freeze
# Test environment setup # Test environment setup
%w{Library/Formula Library/ENV}.each do |d| %w{ENV Formula}.each { |d| HOMEBREW_LIBRARY.join(d).mkpath }
HOMEBREW_REPOSITORY.join(d).mkpath %w{cache formula_cache cellar logs}.each { |d| HOMEBREW_PREFIX.parent.join(d).mkpath }
end
# Test fixtures and files can be found relative to this path # Test fixtures and files can be found relative to this path
TEST_DIRECTORY = File.dirname(File.expand_path(__FILE__)) TEST_DIRECTORY = File.dirname(File.expand_path(__FILE__))