Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5
Commits
8a9cdc13
Commit
8a9cdc13
authored
Jul 22, 2015
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix debug mode in functional tests ('cannot connect to X server :0' error)
parent
4c0d7bed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
+13
-10
No files found.
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
View file @
8a9cdc13
...
...
@@ -132,6 +132,7 @@ class Browser:
def run(self, url, display):
self.clean()
self.environ = os.environ.copy()
self._setEnviron()
self._setDisplay(display)
self._run(url)
...
...
@@ -151,21 +152,25 @@ class Browser:
def _setDisplay(self, display):
if display:
os.environ["DISPLAY"] = display
self.environ["DISPLAY"] = display
else:
xauth = os.path.expanduser('
~/
.
Xauthority
')
if os.path.exists(xauth):
self.environ["XAUTHORITY"] = xauth
def _runCommand(self, *args):
print " ".join(args)
self.process = subprocess.Popen(args, close_fds=True)
self.process = subprocess.Popen(args, close_fds=True
, env=self.environ
)
class Firefox(Browser):
""" Use firefox to open run all the tests"""
def _setEnviron(self):
os
.environ['
MOZ_NO_REMOTE
'] = '
1
'
os
.environ['
HOME
'] = self.profile_dir
os
.environ['
LC_ALL
'] = '
C
'
os
.environ["MOZ_CRASHREPORTER_DISABLE"] = "1"
os
.environ["NO_EM_RESTART"] = "1"
self
.environ['
MOZ_NO_REMOTE
'] = '
1
'
self
.environ['
HOME
'] = self.profile_dir
self
.environ['
LC_ALL
'] = '
C
'
self
.environ["MOZ_CRASHREPORTER_DISABLE"] = "1"
self
.environ["NO_EM_RESTART"] = "1"
# This disables unwanted SCIM as it fails with Xvfb, at least on Mandriva
# 2010.0, because Firefox tries to start scim-bridge which SIGSEGV and
...
...
@@ -174,7 +179,7 @@ class Firefox(Browser):
'
XIM_PROGRAM
',
'
XMODIFIERS
',
'
QT_IM_MODULE
'):
os
.environ.pop(remove_environment_variable, None)
self
.environ.pop(remove_environment_variable, None)
def _run(self, url):
# Prepare to run
...
...
@@ -183,8 +188,6 @@ class Firefox(Browser):
self._runCommand(firefox_bin, "-no-remote",
"-profile", self.profile_dir, url)
os.environ['
MOZ_NO_REMOTE
'] = '
0
'
def getPrefJs(self):
from App.config import getConfiguration
return """
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment