uitest/libreoffice/connection.py |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit d58a3e5f85d44efc9d21dd56329a3ef20cb3692f
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Fri Jun 5 14:27:06 2020 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Fri Jun 5 16:29:39 2020 +0200

    Reliably terminate soffice when connect throws an exception
    
    ...in which case setUp has already started self.soffice, but tearDown will 
never
    be called.
    
    For example, 
<https://ci.libreoffice.org//job/lo_tb_master_linux_dbg/29836/> had
    thrown a css.uno.RuntimeException (for reasons that remain unclear) during 
setUp
    of test_tdf46885_crash_chart_multiple_empty_cells_selected, and an soffice 
->
    oosplash -> soffice.bin process duo apparently kept running, so that all the
    later tests' setUp each spawned an soffice -> oosplash that noticed that 
another
    soffice.bin was still running, so would quickly terminate again, so connect
    would raise a (somewhat misleading) "soffice has stopped" exception:
    
    [...]
    > ======================================================================
    > ERROR: test_tdf46885_crash_chart_multiple_empty_cells_selected 
(tdf46885.tdf46885)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 99, in connect
    >     xContext = xUnoResolver.resolve(url)
    > uno.com.sun.star.uno.RuntimeException: initial object queryInterface for 
OID "StarOffice.ComponentContext" returned ANY of type boolean 
/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/binaryurp/source/bridge.cxx:884
    >
    > ======================================================================
    > ERROR: test_tdf46885_crash_chart_no_cell_selected_nextButton 
(tdf46885.tdf46885)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_tdf93506_chart_trendline_dialog (tdf93506_trendline.tdf93506)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_chart_format_data_series_dialog 
(formatDataSeries.chartFormatDataSeries)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_tdf122398_chart_min_max_x_axis (tdf122398.tdf122398)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_chart_x_axis_dialog (chartXAxis.chartXAxis)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_chart_y_axis_dialog (chartYAxis.chartYAxis)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_chart_area_dialog (chartArea.chartArea)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_tdf98390_chart_grid_dialog (chartGrid.chartGrid)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_chart_enable_grids_dialog (chartAxes.chartAxes)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_chart_enable_grids_dialog (chartGrids.chartGrids)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_chart_display_legend_dialog (chartLegend.chartLegend)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_chart_display_titles_dialog (chartTitles.chartTitles)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_tdf123231_chart_trendline_dialog_power (tdf123231.tdf123231)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_tdf124111_chart_x_negative_cross (tdf124111.tdf124111)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_tdf123520_chart_y_cross_other_axis (tdf123520.tdf123520)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_tdf99069_chart_cancel_data_ranges_dialog (tdf99069.tdf99069)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_chart_wall_dialog (chartWall.chartWall)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_chart_data_labels_dialog (chartDataLabels.chartDataLabels)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    > Exception ignored in: <function Popen.__del__ at 0x2b7ce7e4e170>
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/instdir/program/python-core-3.7.7/lib/subprocess.py",
 line 883, in __del__
    >     ResourceWarning, source=self)
    > ResourceWarning: subprocess 23070 is still running
    >
    > ======================================================================
    > ERROR: test_chart_data_labels_percentage_dialog 
(chartDataLabels.chartDataLabels)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_tdf131291 (chartDataLabels.chartDataLabels)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_tdf131715 (tdf131715.tdf131715)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_tdf129587 (tdf129587.tdf129587)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ======================================================================
    > ERROR: test_tdf96432_chart_crash_transparency_error_bar_dialog 
(tdf96432.tdf96432)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/uitest/framework.py",
 line 25, in setUp
    >     self.connection.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 169, in setUp
    >     conn.setUp()
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 55, in setUp
    >     self.xContext = self.connect(socket)
    >   File 
"/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/uitest/libreoffice/connection.py",
 line 96, in connect
    >     raise Exception("soffice has stopped.")
    > Exception: soffice has stopped.
    >
    > ----------------------------------------------------------------------
    > Ran 26 tests in 61.194s
    >
    > FAILED (errors=24)
    > Tests run: 26
    > Tests failed: 0
    > Tests errors: 24
    > Tests skipped: 0
    >
    > Error: a unit test failed:
    >
    > To rerun just this failed test without all others, use:
    >     make UITest_chart
    
    Change-Id: I743ada93e11c3b89991f0a72229f8c3003259241
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95595
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/uitest/libreoffice/connection.py b/uitest/libreoffice/connection.py
index e414fa30df96..caee3b7bca96 100644
--- a/uitest/libreoffice/connection.py
+++ b/uitest/libreoffice/connection.py
@@ -52,7 +52,15 @@ class OfficeConnection:
             raise Exception("unsupported connection method: " + method)
 
         # connect to the soffice instance
-        self.xContext = self.connect(socket)
+        success = False
+        try:
+            self.xContext = self.connect(socket)
+            success = True
+        finally:
+            if not success and self.soffice:
+                self.soffice.kill()
+                self.soffice.wait()
+                self.soffice = None
 
     def bootstrap(self, soffice, userdir, socket):
         """ Creates a new LibreOffice process
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to