From f88e4f0df6718ce425a66eb2960932c08d053a7b Mon Sep 17 00:00:00 2001 From: david-sarah Date: Sun, 8 Aug 2010 10:13:40 -0700 Subject: [PATCH] test_runner.py: make test_path work for test-from-installdir. --- src/allmydata/test/test_runner.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index 161af235..8c571982 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -17,12 +17,12 @@ timeout = 240 srcfile = allmydata.__file__ srcdir = os.path.dirname(os.path.dirname(os.path.realpath(srcfile))) -if os.path.normcase(os.path.basename(srcdir)) == 'site-packages': - srcdir = os.path.dirname(srcdir) - if re.search(r'python.+\..+', os.path.normcase(os.path.basename(srcdir))): - srcdir = os.path.dirname(srcdir) rootdir = os.path.dirname(srcdir) +if os.path.normcase(os.path.basename(srcdir)) == 'site-packages': + if re.search(r'python.+\..+', os.path.normcase(os.path.basename(rootdir))): + rootdir = os.path.dirname(rootdir) + rootdir = os.path.dirname(rootdir) bintahoe = os.path.join(rootdir, 'bin', 'tahoe') if sys.platform == "win32": -- 2.45.2