mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
utils: use realpath of tmpdir in test-aa-easyprof.py
The relative directory tests in test-aa-easyprof.py were failing when TMPDIR pointed to a directory that was a symlink, because the generated tmpdir path was not the same as the realpath that easyprof resolved to. This patch sets the tmpdir to the realpath of the result of the tempfile.mkdtemp() to avoid the issue. Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: Christian Boltz <apparmor@cboltz.de>
This commit is contained in:
@@ -108,7 +108,7 @@ class T(unittest.TestCase):
|
|||||||
'''Setup for tests'''
|
'''Setup for tests'''
|
||||||
global topdir
|
global topdir
|
||||||
|
|
||||||
self.tmpdir = tempfile.mkdtemp(prefix='test-aa-easyprof')
|
self.tmpdir = os.path.realpath(tempfile.mkdtemp(prefix='test-aa-easyprof'))
|
||||||
|
|
||||||
# Copy everything into place
|
# Copy everything into place
|
||||||
for d in ['easyprof/policygroups', 'easyprof/templates']:
|
for d in ['easyprof/policygroups', 'easyprof/templates']:
|
||||||
|
Reference in New Issue
Block a user