mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
tests...runtests_helpers: TMPDIR on MacOS gives too long paths
This commit is contained in:
parent
0edd532add
commit
8f558a5f41
@ -12,8 +12,20 @@ from __future__ import absolute_import
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
||||
|
||||
SYS_TMP_DIR = os.path.realpath(
|
||||
os.environ.get(
|
||||
# Avoid MacOS ${TMPDIR} as it yields a base path too long for unix sockets:
|
||||
# 'error: AF_UNIX path too long'
|
||||
# Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
|
||||
'TMPDIR' if not salt.utils.is_darwin() else '',
|
||||
tempfile.gettempdir()
|
||||
)
|
||||
)
|
||||
|
||||
SYS_TMP_DIR = os.path.realpath(os.environ.get('TMPDIR', tempfile.gettempdir()))
|
||||
# This tempdir path is defined on tests.integration.__init__
|
||||
TMP = os.path.join(SYS_TMP_DIR, 'salt-tests-tmpdir')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user