diff --git a/product/ERP5Type/tests/runUnitTest.py b/product/ERP5Type/tests/runUnitTest.py
index bead7ded225236214d435eb464d8361208759d5f..a5ef5795045bd4c4b6e35347369e4a412f7bdaec 100755
--- a/product/ERP5Type/tests/runUnitTest.py
+++ b/product/ERP5Type/tests/runUnitTest.py
@@ -33,7 +33,7 @@ else:
 
 tests_framework_home = os.path.dirname(os.path.abspath(__file__))
 # handle 'system global' instance
-if software_home.startswith('/usr/lib'):
+if tests_framework_home.startswith('/usr/lib'):
   real_instance_home = '/var/lib/zope'
 else:
   real_instance_home = os.path.sep.join(