From: david-sarah Date: Sun, 8 Aug 2010 17:13:40 +0000 (-0700) Subject: test_runner.py: make test_path work for test-from-installdir. X-Git-Tag: allmydata-tahoe-1.8.0c2~10 X-Git-Url: https://git.rkrishnan.org/%5B/frontends/CLI.txt?a=commitdiff_plain;h=f88e4f0df6718ce425a66eb2960932c08d053a7b;p=tahoe-lafs%2Ftahoe-lafs.git test_runner.py: make test_path work for test-from-installdir. --- 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":