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
Amer
erp5
Commits
4aaacd03
Commit
4aaacd03
authored
Nov 02, 2012
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
give more details when Xvfb or firefox fails to launch in functional tests
parent
de26b39d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
+10
-5
No files found.
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
View file @
4aaacd03
...
...
@@ -28,6 +28,7 @@
##############################################################################
import
os
import
sys
import
time
import
signal
import
re
...
...
@@ -83,7 +84,8 @@ class Xvfb:
if subprocess.call(('
xdpyinfo
', '
-
display
', display),
stdout=null, stderr=subprocess.STDOUT):
# Xvfb did not start properly so stop here
raise EnvironmentError("Can not start Xvfb, stop test execution")
raise EnvironmentError("Can not start Xvfb, stop test execution "
\
+ "(display %r)" % (display,))
def run(self):
for display_try in self.display_list:
...
...
@@ -108,6 +110,7 @@ class Browser:
self.port = port
def quit(self):
if getattr(self, "process", None) is not None:
self.process.kill()
def _run(self, url, display):
...
...
@@ -261,8 +264,8 @@ class FunctionalTestRunner:
self.user, self.password)
def test(self, debug=0):
xvfb = Xvfb(self.instance_home)
try:
xvfb = Xvfb(self.instance_home)
start = time.time()
if not debug:
print("
\
n
Set 'erp5_debug_mode' environment variable to 1"
...
...
@@ -274,10 +277,12 @@ class FunctionalTestRunner:
if (time.time() - start) > float(self.timeout):
raise TimeoutError("Test took more than %s seconds" % self.timeout)
except:
print("ERP5TypeFunctionalTestCase.test Exception: %r" % (sys.exc_info(),)
print("ERP5TypeFunctionalTestCase.test Exception: %r" % (sys.exc_info(),))
raise
finally:
self.browser.quit()
xvfb.quit()
if getattr(self, "browser", None) is not None:
self.browser.quit()
def processResult(self):
file_content = self.getStatus().encode("utf-8", "replace")
...
...
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