Check for webengine render process crash in build test

This commit is contained in:
Kovid Goyal 2023-12-07 19:59:37 +05:30
parent ec1237f9fd
commit d82bd06247
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 1 deletions

View File

@ -880,7 +880,7 @@ incompatibility with your system's GPU (graphics) drivers. Try updating these
first, and reboot. If that does not fix it, you can set the
``QTWEBENGINE_CHROMIUM_FLAGS`` environment variable to the value
``--disable-gpu`` to turn off hardware acceleration. See
`this page <https://doc.qt.io/qt-5/qtwebengine-debugging.html>`_ for details.
`this page <https://doc.qt.io/qt-6/qtwebengine-debugging.html>`_ for details.
Using the viewer or doing any conversions results in a permission denied error on Windows

View File

@ -373,7 +373,12 @@ class BuildTest(unittest.TestCase):
p.runJavaScript('1 + 1', callback)
p.printToPdf(print_callback)
def render_process_crashed(status, exit_code):
print('Qt WebEngine Render process crashed with status:', status, 'and exit code:', exit_code)
QApplication.instance().quit()
p.titleChanged.connect(do_webengine_test)
p.renderProcessTerminated.connect(render_process_crashed)
p.runJavaScript(f'document.title = "test-run-{os.getpid()}";')
timeout = 10
QTimer.singleShot(timeout * 1000, lambda: QApplication.instance().quit())