Merge pull request #4794 from MikeMcQuaid/tests-home

tests: set HOME.
This commit is contained in:
Mike McQuaid 2018-09-02 13:17:22 +01:00 committed by GitHub
commit 5869842e7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,6 +49,10 @@ module Homebrew
ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if args.generic?
ENV["HOMEBREW_TEST_ONLINE"] = "1" if args.online?
# Avoid local configuration messing with tests e.g. git being configured
# to use GPG to sign by default
ENV["HOME"] = "#{HOMEBREW_LIBRARY_PATH}/test"
if args.coverage?
ENV["HOMEBREW_TESTS_COVERAGE"] = "1"
FileUtils.rm_f "test/coverage/.resultset.json"