summaryrefslogtreecommitdiff
path: root/uitest
AgeCommit message (Collapse)Author
2020-06-11tdf#133862: sw: Add UItestXisco Fauli
Change-Id: Id08dc6fbbdb59888ecab29e922d84db75f97e779 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96087 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-06-09Print more information about the swallowed exceptionsStephan Bergmann
Change-Id: I126413f9eb5c5698e4500c4fc5e04f31a9c574fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95895 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-08Reliably terminate soffice.bin when terminating sofficeStephan Bergmann
d58a3e5f85d44efc9d21dd56329a3ef20cb3692f "Reliably terminate soffice when connect throws an exception" had been a partial thinko: When kill()'ing (i.e., sending SIGKILL on POSIX) soffice (aka oosplash exec'ed from it), the soffice.bin forked from it can still keep on running. So terminate() (i.e., send SIGTERM on POSIX) soffice aka ooslpash, and in its sigterm_handler actually wait for the soffice.bin process. (Where the latter should just be a saftey measure. At least on POSIX, osl_terminateProcess as called from the oosplash sigterm_handler sends a SIGKILL, so should swiftly and reliably kill the soffice.bin process.) Change-Id: Ifd6930691dce34894e76c417e152111983d62b8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95779 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-05self.socket appears to be unusedStephan Bergmann
...ever since the code appeared here with 29cd5a2f5e14a7f3d95cacb644a69a2df91ea8f8 "uitest: move uitest python part from dev-tools" Change-Id: I0549896691c2e2e1168eea4723abf5b014b56443 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95575 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-05Reliably terminate soffice when connect throws an exceptionStephan Bergmann
...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 <sbergman@redhat.com>
2020-06-04Remove unused self.proStephan Bergmann
...which became unused with 2959c99bae8a8199a8c5c4d4933707ab98acfffa "uitest: let us remove the kill part" Change-Id: I588de0c98b1b25e13faba4142587c019ea801c14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-04Adapt documentationStephan Bergmann
...to 43aef04d77aafb9d055957642e62b559231f3711 "Reliably wait for soffice to terminate" Change-Id: Ieb0702196cd5f95d382a0f18c4bca1b01182d006 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-03uitest: avoid defining the same object multiple time in in mathShiko
Change-Id: I1ee5cde133390ca285bb154e6a373e0e5bc1cbed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95334 Tested-by: Jenkins Reviewed-by: Ahmed ElShreif <aelshreif7@gmail.com>
2020-05-25Do not time out execute_dialog_through_commandStephan Bergmann
If something goes wrong, better keep the testing Python and the tested soffice process in a state in which the actual problem can (hopefully) be debugged better. I happened to run into a hung UITest_options on Linux, where soffice.bin was still at > Thread 1 (Thread 0x7fa6371d9fc0 (LWP 1210042)): > #0 futex_abstimed_wait_cancelable (private=0, abstime=0x7fa633a17f80, clockid=<optimized out>, expected=0, futex_word=0x60e000024e88) at /usr/src/debug/glibc-2.31-17-gab029a2801/sysdeps/nptl/futex-internal.h:320 > #1 __pthread_cond_wait_common (abstime=0x7fa633a17f80, clockid=<optimized out>, mutex=0x60e000024e38, cond=0x60e000024e60) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:520 > #2 __pthread_cond_clockwait (abstime=0x7fa633a17f80, clockid=<optimized out>, mutex=0x60e000024e38, cond=0x60e000024e60) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:677 > #3 __pthread_cond_clockwait (cond=0x60e000024e60, mutex=0x60e000024e38, clockid=<optimized out>, abstime=0x7fa633a17f80) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:665 > #4 0x00007fa66899be08 in std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) (this=0x60e000024e60, __lock=..., __atime=...) at include/c++/10.0.1/condition_variable:210 > #5 0x00007fa66899b895 in std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) (this=0x60e000024e60, __lock=..., __atime=...) at include/c++/10.0.1/condition_variable:120 > #6 0x00007fa668997505 in std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> >, SvpSalInstance::DoYield(bool, bool)::$_2>(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, SvpSalInstance::DoYield(bool, bool)::$_2) (this=0x60e000024e60, __lock=..., __atime=..., __p=...) at include/c++/10.0.1/condition_variable:159 > #7 0x00007fa668995460 in std::condition_variable::wait_for<long, std::ratio<1l, 1000l>, SvpSalInstance::DoYield(bool, bool)::$_2>(std::unique_lock<std::mutex>&, std::chrono::duration<long, std::ratio<1l, 1000l> > const&, SvpSalInstance::DoYield(bool, bool)::$_2) (this=0x60e000024e60, __lock=..., __rtime=..., __p=...) at include/c++/10.0.1/condition_variable:186 > #8 0x00007fa66899408e in SvpSalInstance::DoYield(bool, bool) (this=0x611000001bc0, bWait=true, bHandleAllCurrentEvents=false) at vcl/headless/svpinst.cxx:497 > #9 0x00007fa667e7114d in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at vcl/source/app/svapp.cxx:455 > #10 0x00007fa667e70708 in Application::Yield() () at vcl/source/app/svapp.cxx:519 > #11 0x00007fa66498f6cd in Dialog::Execute() (this=0x618003c16480) at vcl/source/window/dialog.cxx:1030 > #12 0x00007fa667a93812 in SalInstanceDialog::run() (this=0x616000575780) at vcl/source/app/salvtables.cxx:1482 > #13 0x00007fa2e8711b8d in weld::DialogController::run() (this=0x60c004e70d80) at include/vcl/weld.hxx:2289 > #14 0x00007fa2e98a6cbc in OfaTreeOptionsDialog::run() (this=0x60c004e70d80) at cui/source/options/treeopt.cxx:1937 > #15 0x00007fa2e90c4d15 in CuiAbstractController_Impl::Execute() (this=0x60300187b4f0) at cui/source/factory/dlgfact.cxx:103 > #16 0x00007fa688bc9b2d in SfxApplication::OfaExec_Impl(SfxRequest&) (this=0x604006f2fe10, rReq=...) at sfx2/source/appl/appserv.cxx:1311 > #17 0x00007fa688b17655 in SfxStubSfxApplicationOfaExec_Impl(SfxShell*, SfxRequest&) (pShell=0x604006f2fe10, rReq=...) at workdir/SdiTarget/sfx2/sdi/sfxslots.hxx:1270 > #18 0x00007fa6892521f6 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) (this=0x604006f2fe10, pFunc=0x7fa688b17530 <SfxStubSfxApplicationOfaExec_Impl(SfxShell*, SfxRequest&)>, rReq=...) at include/sfx2/shell.hxx:197 > #19 0x00007fa6891dbb1f in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) (this=0x6020013430b0, rShell=..., rSlot=..., rReq=..., bRecord=true) at sfx2/source/control/dispatch.cxx:252 > #20 0x00007fa6891defd6 in SfxDispatcher::PostMsgHandler(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >) (this=0x6020013430b0, pReq=std::unique_ptr<class SfxRequest> = {...}) at sfx2/source/control/dispatch.cxx:989 [...] but the Python process was already at > Traceback (most recent call first): > <built-in method waitpid of module object at remote 0x60800002d140> > File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1611, in _try_wait > (pid, sts) = os.waitpid(self.pid, wait_flags) > File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1653, in _wait > (pid, sts) = self._try_wait(0) > File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1019, in wait > return self._wait(timeout=timeout) > File "uitest/libreoffice/connection.py", line 133, in tearDown > ret = self.soffice.wait() > File "uitest/libreoffice/connection.py", line 178, in tearDown > self.connection.tearDown() > File "uitest/uitest/framework.py", line 46, in tearDown > self.connection.tearDown() > File "instdir/program/python-core-3.7.7/lib/unittest/case.py", line 631, in run > self.tearDown() > File "instdir/program/python-core-3.7.7/lib/unittest/case.py", line 676, in __call__ > return self.run(*args, **kwds) > File "instdir/program/python-core-3.7.7/lib/unittest/suite.py", line 122, in run > test(result) > File "instdir/program/python-core-3.7.7/lib/unittest/suite.py", line 84, in __call__ > return self.run(*args, **kwds) > File "instdir/program/python-core-3.7.7/lib/unittest/runner.py", line 176, in run > test(result) > File "uitest/test_main.py", line 128, in <module> > result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(test_suite) and the relevant > ====================================================================== > ERROR: test_tdf78133_options_app_colors (tdf78133.tdf78133) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "sw/qa/uitest/options/tdf78133.py", line 38, in test_tdf78133_options_app_colors > self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog > File "uitest/uitest/test.py", line 78, in execute_dialog_through_command > raise DialogNotExecutedException(command) > uitest.test.DialogNotExecutedException: Dialog not executed for: .uno:OptionsTreeDialog had not yet been written to workdir/UITest/options/done.log (Python's unittest appears to unhelpfully hold back such vital information until the very end of the full test run). There appears to be no test code that relies on a timed-out execute_dialog_through_command throwing an exception instead of hanging (at least, there is no explicit catching of DialogNotExecutedException anywhere in the code, and a full `make check screenshot` on Linux kept working with this change). (This is similar to 19d3dba72fd744ab8dc1288b1c7c4c811b24ca28 "Do not time out close_dialog_through_button".) Change-Id: Ie907a091ae09b59e65c4b2676298e147c9d2da2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94786 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-22uitest: Add wait methods for slow elementsXisco Fauli
some elements take some time to be updated, specially with slow machines or ASan+UBSan builds Use the same time based approach used for launching the dialogs also reintroduce 634ce6f2d87a30b8abd2e8c67668e3bb5d87406b Change-Id: Ia1cca74474ef65578bbc60a53a8a511402a082b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94648 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-05-21uitest: sw: grab focus before using toggle button in navigatorXisco Fauli
otherwise the focus in on the document since ada385f1cba427416c1e8517cb6a45b61ceff7b0 Change-Id: Ia8300fdceb4f50f89c6d90f238483a4c785163d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94647 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-05-17Fix typosAndrea Gelmini
Change-Id: I3ecb671165ba65baaf304e7afec097209c8c88d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94384 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-17uitest: Fix some issue in the UI Logger DSL coreEL-SHREIF
It solve these problems: 1) math generated test cases wasn't run because the element selector wasn't initialized 2) avoid variables that has variable name equal number only 3) avoid reusing UI object that reference to closed dialog Change-Id: I21221716bfa76889b6563955f60a7f99143fe9c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94338 Tested-by: Jenkins Reviewed-by: Ahmed ElShreif <aelshreif7@gmail.com>
2020-05-11uitest: Fix small issue in UI Logger DSL grammarEL-SHREIF
Change-Id: Ia9ffcd1665dad3d3d2827d40bcec345186e53aef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93927 Tested-by: Jenkins Reviewed-by: Ahmed ElShreif <aelshreif7@gmail.com>
2020-04-27Do not time out close_dialog_through_buttonStephan Bergmann
If something goes wrong, better keep the testing Python and the tested soffice process in a state in which the actual problem can (hopefully) be debugged better. I happened to run into a hung UITest_chart on Linux, where soffice.bin was still at > Thread 1 (Thread 0x7f2e2b280fc0 (LWP 1906251)): > #0 futex_abstimed_wait_cancelable (private=0, abstime=0x7f2e27b59a80, clockid=<optimized out>, expected=0, futex_word=0x60e000024e8c) at /usr/src/debug/glibc-2.31-17-gab029a2801/sysdeps/nptl/futex-internal.h:320 > #1 __pthread_cond_wait_common (abstime=0x7f2e27b59a80, clockid=<optimized out>, mutex=0x60e000024e38, cond=0x60e000024e60) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:520 > #2 __pthread_cond_clockwait (abstime=0x7f2e27b59a80, clockid=<optimized out>, mutex=0x60e000024e38, cond=0x60e000024e60) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:677 > #3 __pthread_cond_clockwait (cond=0x60e000024e60, mutex=0x60e000024e38, clockid=<optimized out>, abstime=0x7f2e27b59a80) at /usr/src/debug/glibc-2.31-17-gab029a2801/nptl/pthread_cond_wait.c:665 > #4 0x00007f2e5fead808 in std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) (this=0x60e000024e60, __lock=..., __atime=...) at include/c++/10.0.1/condition_variable:210 > #5 0x00007f2e5fead295 in std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) (this=0x60e000024e60, __lock=..., __atime=...) at include/c++/10.0.1/condition_variable:120 > #6 0x00007f2e5fea8f05 in std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> >, SvpSalInstance::DoYield(bool, bool)::$_2>(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, SvpSalInstance::DoYield(bool, bool)::$_2) (this=0x60e000024e60, __lock=..., __atime=..., __p=...) at include/c++/10.0.1/condition_variable:159 > #7 0x00007f2e5fea6e60 in std::condition_variable::wait_for<long, std::ratio<1l, 1000l>, SvpSalInstance::DoYield(bool, bool)::$_2>(std::unique_lock<std::mutex>&, std::chrono::duration<long, std::ratio<1l, 1000l> > const&, SvpSalInstance::DoYield(bool, bool)::$_2) (this=0x60e000024e60, __lock=..., __rtime=..., __p=...) at include/c++/10.0.1/condition_variable:186 > #8 0x00007f2e5fea5a8e in SvpSalInstance::DoYield(bool, bool) (this=0x611000001bc0, bWait=true, bHandleAllCurrentEvents=false) at vcl/headless/svpinst.cxx:497 > #9 0x00007f2e5f3a232d in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at vcl/source/app/svapp.cxx:454 > #10 0x00007f2e5f3a18e8 in Application::Yield() () at vcl/source/app/svapp.cxx:518 > #11 0x00007f2e5bf32c2d in Dialog::Execute() (this=0x61a000072080) at vcl/source/window/dialog.cxx:1032 > #12 0x00007f2e5efdcd62 in SalInstanceDialog::run() (this=0x619000091080) at vcl/source/app/salvtables.cxx:1480 > #13 0x00007f2dc37421fd in weld::DialogController::run() (this=0x61200077c5c0) at include/vcl/weld.hxx:2227 > #14 0x00007f2dc39672f2 in chart::CreationWizardUnoDlg::execute() (this=0x610000168d40) at chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx:189 > #15 0x00007f2df91f2507 in FuInsertChart::FuInsertChart(ScTabViewShell&, vcl::Window*, ScDrawView*, SdrModel*, SfxRequest&) (this=0x7f2e27f1a300, rViewSh=..., pWin=0x61a0001e8a80, pViewP=0x61d0001f6880, pDoc=0x617000066a00, rReq=...) at sc/source/ui/drawfunc/fuins2.cxx:673 > #16 0x00007f2dfaf9a379 in ScTabViewShell::ExecDrawIns(SfxRequest&) (this=0x61d0001eaa80, rReq=...) at sc/source/ui/view/tabvwshb.cxx:336 > #17 0x00007f2dfaedf365 in SfxStubScTabViewShellExecDrawIns(SfxShell*, SfxRequest&) (pShell=0x61d0001eaa80, rReq=...) at workdir/SdiTarget/sc/sdi/scslots.hxx:1447 > #18 0x00007f2e8031ded6 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) (this=0x61d0001eaa80, pFunc=0x7f2dfaedf240 <SfxStubScTabViewShellExecDrawIns(SfxShell*, SfxRequest&)>, rReq=...) at include/sfx2/shell.hxx:197 > #19 0x00007f2e802a77ff in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) (this=0x6020002f3dd0, rShell=..., rSlot=..., rReq=..., bRecord=true) at sfx2/source/control/dispatch.cxx:251 > #20 0x00007f2e802aacb6 in SfxDispatcher::PostMsgHandler(std::unique_ptr<SfxRequest, std::default_delete<SfxRequest> >) (this=0x6020002f3dd0, pReq=std::unique_ptr<class SfxRequest> = {...}) at sfx2/source/control/dispatch.cxx:988 [...] but the Python process was already at > Traceback (most recent call first): > <built-in method waitpid of module object at remote 0x60800002d1c0> > File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1611, in _try_wait > (pid, sts) = os.waitpid(self.pid, wait_flags) > File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1653, in _wait > (pid, sts) = self._try_wait(0) > File "instdir/program/python-core-3.7.7/lib/subprocess.py", line 1019, in wait > return self._wait(timeout=timeout) > File "uitest/libreoffice/connection.py", line 133, in tearDown > ret = self.soffice.wait() > File "uitest/libreoffice/connection.py", line 178, in tearDown > self.connection.tearDown() > File "uitest/uitest/framework.py", line 46, in tearDown > self.connection.tearDown() > File "instdir/program/python-core-3.7.7/lib/unittest/case.py", line 631, in run > self.tearDown() > File "instdir/program/python-core-3.7.7/lib/unittest/case.py", line 676, in __call__ > return self.run(*args, **kwds) > File "instdir/program/python-core-3.7.7/lib/unittest/suite.py", line 122, in run > test(result) > File "instdir/program/python-core-3.7.7/lib/unittest/suite.py", line 84, in __call__ > return self.run(*args, **kwds) > File "instdir/program/python-core-3.7.7/lib/unittest/runner.py", line 176, in run > test(result) > File "uitest/test_main.py", line 128, in <module> > result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(test_suite) and the relevant > ====================================================================== > ERROR: test_tdf99069_chart_cancel_data_ranges_dialog (tdf99069.tdf99069) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "sc/qa/uitest/chart/tdf99069.py", line 32, in test_tdf99069_chart_cancel_data_ranges_dialog > self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart") > File "uitest/uitest/test.py", line 83, in execute_dialog_through_command > raise DialogNotExecutedException(command) > uitest.test.DialogNotExecutedException: Dialog not executed for: .uno:InsertObjectChart had not yet been written to workdir/UITest/chart/done.log (Python's unittest appears to unhelpfully hold back such vital information until the very end of the full test run). That means DialogNotClosedException is unused now and can thus be removed. Change-Id: I556ae52f05b1362f4e78f2de362a7b4f9b8a0cf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92959 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-22Revert "tdf114724: uitest: make test less time.sleep dependent"Xisco Faulí
This reverts commit 634ce6f2d87a30b8abd2e8c67668e3bb5d87406b. See https://gerrit.libreoffice.org/c/core/+/92616 Change-Id: I642843ab16450d1a6b15d5e955495efbbfa7822a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92539 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-21uitest: no need to use time.sleep hereXisco Fauli
Change-Id: I58b1fa80b6a570f8214255398f3b91f62590fd6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92629 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-21tdf114724: uitest: make test less time.sleep dependentXisco Fauli
Instead, check the focus moved to the bottom and back to the first element Execution times goes 17.232 from to 5.521 for me Change-Id: I816c197f44b68a1b9ab8686de191a743cbc78eb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92616 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-21uitest: remove unneeded time.sleepXisco Fauli
Change-Id: I618a17fb8347d1f935caaef54738299863ddbb49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92612 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-21uitest: use while loop instead of time.sleepXisco Fauli
Execution times goes from 3.807 to 2.718 for me Change-Id: I9c93417d2678c64a8d9a90b0a18b4d1210c8fdd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92624 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-15Related tdf#130778: New About dialogHeiko Tietze
More flexible dialog logo & about images as SVGs Change-Id: Icefa035893e241a7dee6aa28236e6b89b38477de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91908 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-04-07Revert "UITest: Actually time-out the wait"Stephan Bergmann
This reverts commit 150b67b57bd25ba9c8ec9c28c7aed3cc0b557bfd. Reason for revert: With the above change, a hung soffice process would cause the UITest that spawned it to fail, but that would not terminate the hung soffice process. This is especially problematic for Gerrit Jenkins builds, where a leftover hung soffice process from a previous build will typically cause unrelated subsequent builds to fail. So: For a manual developer build, it is arguably better to leave the hung UITest in the hung state (both the python and the soffice process) to be able to debug it. And for an automated Gerrit Jenkins build it is even vital that the hung UITest hangs the build, so that Jenkins will eventually abort it and lode's bin/kill-wrapper will reliably kill any remaining processes, incl. the hung soffice process. (But of course it is unfortunate that we now get less feedback from a hung UITest.) Change-Id: I6cc577dda362d3cb71846decae9c2bb6bed90b6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91717 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-04tdf#87199: move UItest to CppunitTestXisco Fauli
Change-Id: I3a07a8e6fe6e37d55de6069082b32d84c0450177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91659 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-03uitest: add asserts to table dialogXisco Fauli
Change-Id: Id44531def1a0b6e7c0ab5686ed651633ccb502b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91655 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-03tdf#80663, tdf#96067: move UItest to CppunitTestXisco Fauli
Change-Id: I1af2de672db7124faec473202ce858ec292a2c6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91654 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-03-25Defect type: IDENTIFIER_TYPOCaolán McNamara
identifier_typo: Using "Libreoffice" appears to be a typo: "Libreoffice" is only known to be referenced here, or in copies of this code. Identifier "LibreOffice" is referenced elsewhere at least 19 times. Change-Id: I201bcc7e226dde52eed2c0281d2b9839a234af1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91033 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-24weld writer navigatorCaolán McNamara
GtkToggleToolButton are much wider than vcl equivalents. Split the bottom toolbar into two toolbars. Rearrange their contents so the layout of each level visually match. Notes: Master documents have two modes, master content tree and the normal content tree. You can drag entries from the content tree into the document, drag mode drop down controls whether its a link or a copy etc that's dropped in. Documents can be dropped into the content and global trees. If outline tracking isn't active, then when content changes the tree is cleared and refilled, typically an effort is made to reselect the same entry that was previously selected. Additionally, if the amount of content didn't change an effort is made to scroll back to the location the scrollbar was at before the clear. Change-Id: I00c015145eac5b1acc3398d3c40861d830e4264a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89725 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-16uitest: use hex instead of int for colorsXisco Fauli
Change-Id: I7309a546546637a1837df8ac99807c2deb22c72a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90589 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-03-04uitest: speed up close_doc()Miklos Vajna
I used solenv/gbuild/Trace.mk to measure where the time is spent at the end of an incremental 'make check'. The last 95 seconds in spent executing UITest_demo_ui alone. If that test is executed in isolation, it takes 135 seconds. Profiling the test shows that some of that time is spent on waiting for an OnViewClosed event to be emitted after .uno:CloseDoc is dispatched. I'm not sure how this worked in the past, but seems that in case there is a single view, then we currently only emit OnUnloaded, which means we wait a minute for an event that does not arrive, then we silently move on. Fix the problem by closing the document via dispose(), the old code also just discarded all changes to the file. The new cost of UITest_demo_ui is 73 seconds (54% of baseline). The overall 'make check' is 84 seconds faster with this, too. Change-Id: I97e8e2af3ba355b8029920076e070d619b110b77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89984 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2020-03-03uitest: split up UITest_writer_demoMiklos Vajna
I used solenv/gbuild/Trace.mk to measure where the time is spent at the end of an incremental 'make check'. The last 141 seconds is spent executing UITest_writer_demo alone. If that test is executed in isolation, it takes 289 seconds. I measured the cost of all the individual .py suites and arranged them into 8 separate UITests, this way the make -j8 cost is 101 seconds (i.e. 35% of the baseline). IOW this is supposed to speed up 'make check' with 3m13s, provided you have the code already built. Change-Id: I1ffee3a06b8fd84d7b9a0295547900df11f11f68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89835 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-19uitest: make sure UITEST_TEST_NAME matches exactly one test functionMiklos Vajna
So that something like: make -sr UITest_cui_dialogs UITEST_TEST_NAME="chardlg.Test.testSvxCharEffectsPageWriterAutomatic" Only executes testSvxCharEffectsPageWriterAutomatic, not testSvxCharEffectsPageWriter and testSvxCharEffectsPage as well. Change-Id: I0ed334259634e3b9b0db45d9f8462eb4accc689e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88987 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-02tdf#129568 Rename Default Style to Default Paragraph/Page/Table Styleayhanyalcinsoy
Change-Id: I21672c9b78e52c3c9b2687cb2c0ab21dcf67f19a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86538 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2020-01-25UITest: Actually time-out the waitMike Kaganski
Without that, if XDesktop::terminate() fails (e.g., because an assert in a test was false while a modal dialog was open, which left the dialog open, and so TerminationVetoException was thrown in XDesktop::terminate() by a listener), the wait never ends, and the assertion message gets lost when buildbot terminates the build, as happened in https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/51496/console. The timeout only available since python 3.3. The soffice process is not terminated in this case; hopefully it will be terminated when build cleanup will occur. Change-Id: I924775d0e58619d1fbd603e80ed1f8d047c91145 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87362 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-28UITest: fix spellDialog.SpellingAndGrammarDialog.test_tdf46852Mike Kaganski
Two problems were present: 1. If local system default locale is not en_US, then in created document, text has some other language initially; and instrted text also gets this language. This may result in no replacement suggestions for the spelling errors, and "changeall" is not active, so expected sequence of changes and clicks does not happen. Fixed by setting language at cursor before paste explicitly. 2. On Windows, the returned text has \r\n paragraph breaks, which didn't match the regex having \n. Fixed by postprocessing the text before match. Change-Id: I320fc62c3c27dfe699fb45669c081df30cb66d6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85877 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-14Fix typoAndrea Gelmini
Change-Id: Ic2423f7b2e83ca957d42392c1fba2b7d636ac136 Reviewed-on: https://gerrit.libreoffice.org/85156 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-10Fix IdentationError and mixture of spaces and tabsJens Carl
Fix IdentationError and mixture of spaces and tabs found by python -m py_compile <file>. Change-Id: I1dc99196410d736ca33ead5deadfc61bc6584428 Reviewed-on: https://gerrit.libreoffice.org/83594 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-11-18Fix 'is' operator for comparisonJens Carl
The 'is' operator should not be used for comparison on some types of literals. In CPython this works by accident and CPython 3.8 introduced a SyntaxWarning (see https://bugs.python.org/issue34850). Change-Id: Ic4ba481579d13fd1496431ded59dd626a05fc0c6 Reviewed-on: https://gerrit.libreoffice.org/83033 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-11-08Add UI Test for tdf#128004Muhammet Kara
Change-Id: Id2b95d21799f8fa4b55a304afda739219fee06ff Reviewed-on: https://gerrit.libreoffice.org/82323 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-10-09name all Notebooks 'tabcontrol'Caolán McNamara
Change-Id: I5159ed77c2b3ba2f06e381a738a49dbe17a6a4dd Reviewed-on: https://gerrit.libreoffice.org/80542 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-04Revert "uitest: make child soffice process die when parent dies"Stephan Bergmann
This reverts commit d35840a2111beafe018851314a624e268e3cde6a, now that 43aef04d77aafb9d055957642e62b559231f3711 "Reliably wait for soffice to terminate" makes sure that no soffice-related processes are left behind by UITests. Using PR_SET_PDEATHSIG had the following drawbacks: * It defeats debugging if a runaway process is forcefully killed by the test framework. (And there are already higher-layer mechanisms in place for the reliable termination of runaway tinderbox builds, see the commit message of 43aef04d77aafb9d055957642e62b559231f3711 mentioned above.) * It is brittle in that it can terminate soffice-related processes too early, as the signal is sent as soon as the parent's thread that spawned the child (and not the parent process as a whole) terminates. * It is Linux-only. Change-Id: Ia07f5dbaafc824bad0dfbdb1a2aabe6d5508741b Reviewed-on: https://gerrit.libreoffice.org/80186 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-04Reliably wait for soffice to terminateStephan Bergmann
...to avoid leftover soffice-related processes (oosplash, soffice.bin) from UITests, whose occasional presence on tinderboxes is discussed in the comments to <https://gerrit.libreoffice.org/#/c/79854/> "uitest: make child soffice process die when parent dies". Should sucha an soffice-related process fail to terminate, the UITest will now fail to terminate too, and (a) a developer can debug the hung processes or (b) a tinderbox can reliably kill all processes (cf. <https://gerrit.libreoffice.org/plugins/gitiles/lode/+/ bea0738dbadfe8784e5d3c00f533acf101db4e7e%5E%21> "tb_slave_wrapper: trap signal and kill -9 everything"). This is in line with the waiting in tearDown in unotest/source/python/org/libreoffice/unotest.py, and with the corresponding behavior of C++ and Java test frameworks in unotest. Change-Id: Ieb5c48964428bc05fa8c0f83af9426641d6df693 Reviewed-on: https://gerrit.libreoffice.org/80175 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-03Propagate soffice process failure from OfficeConnection's tearDownStephan Bergmann
...which had gone missing with 98cbfb087eed0d1defa6ef26385fcf47f95c05fc "uitest: kill the LibreOffice instance if it ignores terminate request". (None != 0 is true, so there is no need to map from ret_attr to ret, and that code can be cleaned up a bit.) Change-Id: Ic5e429d61a10a2bbd5c28aeee9d8465cb05c1e4a Reviewed-on: https://gerrit.libreoffice.org/80147 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-02uitest: share some code.Michael Meeks
Change-Id: I2f586bd5e2e4c3cf1fc052cdfe526532dca9acd4 Reviewed-on: https://gerrit.libreoffice.org/79884 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-01uitest: make child soffice process die when parent diesNoel Grandin
using PR_SET_PDEATHSIG. Note that this can only be called by the child process in question, so we have to pass a new command line argument down to activate it. And we have to plumb it through the wrapper oosplash process. I wonder where else our testing infrastructure could benefit from this Change-Id: I55e8e9f7f4e6cc415046df04c804e51475b8a4c9 Reviewed-on: https://gerrit.libreoffice.org/79854 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-31Let's revert this so no confusion.Julien Nabet
This reverts commit 367719e77747bc142ac4b7ec5ee10d7c5e519c16. Change-Id: I36e4aef93f04fe593692edaa804512020464aa95 Reviewed-on: https://gerrit.libreoffice.org/78354 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-31Fix typos (Please do not commit)Andrea Gelmini
This commit is updated just to help Ahmed. He is going to fix this in the next implementation. Change-Id: I1cdebb27b5ded57694e97da7d990adce716448c0 Reviewed-on: https://gerrit.libreoffice.org/77743 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-20uitest: Fix typosAhmed ElShreif
Change-Id: I41023dd1fd06ca48849726d3372f74a4990c27a3
2019-08-19uitest: Reformat the python script of the CompilerAhmed ElShreif
Change-Id: I502aa9e998d084a82e738c0c0c68ad634cb5c76a
2019-08-19uitest: print useful message when textX is not installedMarkus Mohrhard
Change-Id: If6f6c71f72ba9def4885ffbd74cb7814f7465f2c
2019-08-19uitest: add the SideBar implementationAhmed ElShreif
Change-Id: I7de9bd97e868624476b5c39a5e37afc945206e4e