properly locate bootstrap bt5 location

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31736 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e5880fdd
...@@ -34,6 +34,7 @@ import urllib ...@@ -34,6 +34,7 @@ import urllib
from Testing import ZopeTestCase from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5 import __file__ as ERP5PackagePath
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from zLOG import LOG from zLOG import LOG
...@@ -47,7 +48,8 @@ from glob import glob ...@@ -47,7 +48,8 @@ from glob import glob
INSTANCE_HOME = os.environ['INSTANCE_HOME'] INSTANCE_HOME = os.environ['INSTANCE_HOME']
bt5_base_path = os.environ.get('erp5_tests_bt5_path', bt5_base_path = os.environ.get('erp5_tests_bt5_path',
os.path.join(INSTANCE_HOME, 'bt5')) os.path.join(INSTANCE_HOME, 'bt5'))
bootstrap_base_path = os.path.join(INSTANCE_HOME, 'Products', 'ERP5', 'bootstrap') bootstrap_base_path = os.path.join(os.path.dirname(ERP5PackagePath),
'bootstrap')
class TestXHTML(ERP5TypeTestCase): class TestXHTML(ERP5TypeTestCase):
...@@ -535,11 +537,14 @@ validator = None ...@@ -535,11 +537,14 @@ validator = None
# tidy or w3c may not be installed in livecd. Then we will skip xhtml validation tests. # tidy or w3c may not be installed in livecd. Then we will skip xhtml validation tests.
# create the validator object # create the validator object
if validator_to_use == 'w3c': if validator_to_use == 'w3c':
validator_path = '/usr/share/w3c-markup-validator/cgi-bin/check' validator_paths = ['/usr/share/w3c-markup-validator/cgi-bin/check',
if not os.path.exists(validator_path): '/usr/lib/cgi-bin/check']
print 'w3c validator is not installed at %s' % validator_path for validator_path in validator_paths:
else: if os.path.exists(validator_path):
validator = W3Validator(validator_path, show_warnings) validator = W3Validator(validator_path, show_warnings)
break
else:
print 'No w3c validator found at', validator_paths
elif validator_to_use == 'tidy': elif validator_to_use == 'tidy':
error = False error = False
......
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