From e00b7b2f7c720ca102ca80216ceabf8bfe16ad19 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 27 Sep 2013 17:00:19 +0200 Subject: [PATCH] Make ROOTDIR determination more robust Remove unused CLIENTDIR and replace it with a TESTDIR (pointing to rootdir/keystoneclient/tests) and use normpath for determining the full path of rootdir. This change is needed if keystoneclient/ is a symlink and etc/ is in a different directory hierarchy. Change-Id: Ice9165ef25ec0200ccfb50c2f2f3121a136652a2 --- keystoneclient/tests/client_fixtures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keystoneclient/tests/client_fixtures.py b/keystoneclient/tests/client_fixtures.py index acb83fd77..dfb6e8a84 100644 --- a/keystoneclient/tests/client_fixtures.py +++ b/keystoneclient/tests/client_fixtures.py @@ -24,8 +24,8 @@ from keystoneclient.openstack.common import timeutils from keystoneclient import utils -CLIENTDIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) -ROOTDIR = os.path.dirname(CLIENTDIR) +TESTDIR = os.path.dirname(os.path.abspath(__file__)) +ROOTDIR = os.path.normpath(os.path.join(TESTDIR, '..', '..')) CERTDIR = os.path.join(ROOTDIR, 'examples', 'pki', 'certs') CMSDIR = os.path.join(ROOTDIR, 'examples', 'pki', 'cms')