Commit 7101e273 authored by Alexandre Boeglin's avatar Alexandre Boeglin

handle some specific cases :

- 64 bits architectures
- 'global' instance in /var/lib/zope

Note : the list pf paths we add to sys.path and their order might need to be
double-checked.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4596 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b0f14df0
...@@ -25,10 +25,20 @@ def initializeInstanceHome(tests_framework_home, real_instance_home, instance_ho ...@@ -25,10 +25,20 @@ def initializeInstanceHome(tests_framework_home, real_instance_home, instance_ho
os.symlink(src, dst) os.symlink(src, dst)
# site specific variables # site specific variables
software_home = '/usr/lib/zope/lib/python' # handle 64bit architecture
if os.path.isdir('/usr/lib64/zope/lib/python'):
software_home = '/usr/lib64/zope/lib/python'
else:
software_home = '/usr/lib/zope/lib/python'
tests_framework_home = os.path.dirname(os.path.abspath(__file__)) tests_framework_home = os.path.dirname(os.path.abspath(__file__))
real_instance_home = os.path.sep.join(tests_framework_home.split(os.path.sep)[:-3]) # handle 'system global' instance
if software_home.startswith('/usr/lib'):
real_instance_home = '/var/lib/zope'
else:
real_instance_home = os.path.sep.join(
tests_framework_home.split(os.path.sep)[:-3])
instance_home = os.path.join(real_instance_home, 'unit_test') instance_home = os.path.join(real_instance_home, 'unit_test')
real_tests_home = os.path.join(real_instance_home, 'tests') real_tests_home = os.path.join(real_instance_home, 'tests')
tests_home = os.path.join(instance_home, 'tests') tests_home = os.path.join(instance_home, 'tests')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment