From: david-sarah Date: Sun, 8 Aug 2010 15:43:07 +0000 (-0700) Subject: test_runner.py: another try at calculating the rootdir correctly for test-from-egg... X-Git-Tag: allmydata-tahoe-1.8.0c2~12 X-Git-Url: https://git.rkrishnan.org/Site/Content/Exhibitors/quickstart.html?a=commitdiff_plain;h=dc53d4f5ef67fb5ae1a5d44a37db81ef6b391e6f;p=tahoe-lafs%2Ftahoe-lafs.git test_runner.py: another try at calculating the rootdir correctly for test-from-egg and test-from-prefixdir. --- diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index 373cafbd..161af235 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -17,14 +17,10 @@ timeout = 240 srcfile = allmydata.__file__ srcdir = os.path.dirname(os.path.dirname(os.path.realpath(srcfile))) -if os.path.normcase(srcdir).endswith('.egg'): - srcdir = os.path.dirname(srcdir) -elif os.path.normcase(os.path.basename(srcdir)) == 'site-packages': +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) - if os.path.normcase(os.path.basename(srcdir)) == 'lib': - srcdir = os.path.dirname(srcdir) rootdir = os.path.dirname(srcdir)