From: Zac Medico Date: Sat, 17 Mar 2007 08:41:09 +0000 (-0000) Subject: Make paths independent of cwd. X-Git-Tag: v2.2_pre1~1568 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9be2be0670469f64cc392c1f27d9901757dcdfe1;p=portage.git Make paths independent of cwd. svn path=/main/trunk/; revision=6232 --- diff --git a/pym/portage/tests/bin/setup_env.py b/pym/portage/tests/bin/setup_env.py index cde720d99..f6ff59ff1 100644 --- a/pym/portage/tests/bin/setup_env.py +++ b/pym/portage/tests/bin/setup_env.py @@ -4,11 +4,12 @@ # $Id: test_dep_getcpv.py 6182 2007-03-06 07:35:22Z antarus $ import os, shutil, sys +from os.path import dirname, abspath, join from portage.tests import TestCase from portage.process import spawn -bindir = os.path.join(os.getcwd(), "..", "..", "..", "bin") -basedir = os.path.join(os.getcwd(), "bin", "root") +bindir = join(dirname(dirname(abspath(__file__))), "..", "..", "..", "bin") +basedir = join(dirname(dirname(abspath(__file__))), "bin", "root") os.environ["D"] = os.path.join(basedir, "image") os.environ["T"] = os.path.join(basedir, "temp") os.environ["S"] = os.path.join(basedir, "workdir")