test: allow writing to certain var directories

Closes Homebrew/homebrew#44458.

Closes Homebrew/homebrew#44773.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-10-09 17:42:21 +08:00
parent 52de8d9373
commit 76a5ba6ae5

View File

@ -56,6 +56,9 @@ module Homebrew
sandbox.allow_write_temp_and_cache sandbox.allow_write_temp_and_cache
sandbox.allow_write_log(f) sandbox.allow_write_log(f)
sandbox.allow_write_xcode sandbox.allow_write_xcode
sandbox.allow_write_path(HOMEBREW_PREFIX/"var/cache")
sandbox.allow_write_path(HOMEBREW_PREFIX/"var/log")
sandbox.allow_write_path(HOMEBREW_PREFIX/"var/run")
sandbox.exec(*args) sandbox.exec(*args)
else else
exec(*args) exec(*args)