]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_runner.py: make test_path work for test-from-installdir.
authordavid-sarah <david-sarah@jacaranda.org>
Sun, 8 Aug 2010 17:13:40 +0000 (10:13 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Sun, 8 Aug 2010 17:13:40 +0000 (10:13 -0700)
src/allmydata/test/test_runner.py

index 161af235503c8924ab15999abf571525135adc05..8c5719823e81e2ae3d9be463c339a966b1d7aab4 100644 (file)
@@ -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":