From 07bcb79b1d0170a27ce34e95dde75b86e868a591 Mon Sep 17 00:00:00 2001 From: Steve Beattie Date: Wed, 5 Mar 2014 13:13:39 -0800 Subject: [PATCH] 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 Acked-by: Christian Boltz --- utils/test/test-aa-easyprof.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/test/test-aa-easyprof.py b/utils/test/test-aa-easyprof.py index d8ac4a5dc..424b814f4 100755 --- a/utils/test/test-aa-easyprof.py +++ b/utils/test/test-aa-easyprof.py @@ -108,7 +108,7 @@ class T(unittest.TestCase): '''Setup for tests''' 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 for d in ['easyprof/policygroups', 'easyprof/templates']: