mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-10 04:09:58 +00:00
test_runner.py: another try at calculating the rootdir correctly for test-from-egg and test-from-prefixdir.
This commit is contained in:
parent
39fa9a81d1
commit
dc53d4f5ef
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user