]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_runner.py: another try at calculating the rootdir correctly for test-from-egg...
authordavid-sarah <david-sarah@jacaranda.org>
Sun, 8 Aug 2010 15:43:07 +0000 (08:43 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Sun, 8 Aug 2010 15:43:07 +0000 (08:43 -0700)
src/allmydata/test/test_runner.py

index 373cafbd07ff87edf7da26ee4629469ec2605281..161af235503c8924ab15999abf571525135adc05 100644 (file)
@@ -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)