[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 28c82b4a0189ec8b87b10104c566329a6db91cdf Author: Mike Kaganski AuthorDate: Tue May 17 13:28:33 2022 +0200 Commit: Mike Kaganski CommitDate: Tue May 17 14:12:58 2022 +0200 Improve version check ... to not break on e.g. 4.0 Change-Id: I5b93f6138a5ca85891d2d60beca098b6bcfc15d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134435 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/uitest/test_main.py b/uitest/test_main.py index 2cefafb074ed..511f2a5c8bd4 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -78,7 +78,7 @@ def add_tests_for_file(test_file, test_suite): loader = importlib.machinery.SourceFileLoader(module_name, test_file) # exec_module was only introduced in 3.4 -if sys.version_info[1] < 4: +if sys.version_info < (3,4): mod = loader.load_module() else: mod = types.ModuleType(loader.name)
[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 069f0eb13f7d26ce4b854160bbb9592c25609b38 Author: Noel Grandin AuthorDate: Tue May 17 12:02:48 2022 +0200 Commit: Noel Grandin CommitDate: Tue May 17 13:23:02 2022 +0200 use exec_module on newer Python (>3.3) to avoid DeprecationWarning Change-Id: I7d0624f63e5d123d5013c14aa0f23355cd42dd0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134466 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/uitest/test_main.py b/uitest/test_main.py index f69e7523530a..2cefafb074ed 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -11,6 +11,7 @@ import os import unittest import importlib import importlib.machinery +import types from uitest.framework import UITestCase @@ -76,7 +77,12 @@ def add_tests_for_file(test_file, test_suite): module_name = os.path.splitext(os.path.split(test_file)[1])[0] loader = importlib.machinery.SourceFileLoader(module_name, test_file) -mod = loader.load_module() +# exec_module was only introduced in 3.4 +if sys.version_info[1] < 4: +mod = loader.load_module() +else: +mod = types.ModuleType(loader.name) +loader.exec_module(mod) classes = get_test_case_classes_of_module(mod) global test_name_limit_found for c in classes:
[Libreoffice-commits] core.git: uitest/test_main.py uitest/uitest
uitest/test_main.py |2 -- uitest/uitest/config.py | 12 uitest/uitest/test.py | 47 +-- 3 files changed, 9 insertions(+), 52 deletions(-) New commits: commit acbd88e677502e12ccaea39330efc5885db0a153 Author: Xisco Fauli AuthorDate: Fri Feb 25 12:32:32 2022 +0100 Commit: Xisco Fauli CommitDate: Fri Feb 25 14:04:18 2022 +0100 uitest: unify code and use while True everywhere No need for MAX_WAIT anymore Change-Id: Ia063068bd7c47f79d8991922086c22250c01f77d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130527 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/uitest/test_main.py b/uitest/test_main.py index daad6dca8c1d..f69e7523530a 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -12,8 +12,6 @@ import unittest import importlib import importlib.machinery -import uitest.config - from uitest.framework import UITestCase from libreoffice.connection import OfficeConnection diff --git a/uitest/uitest/config.py b/uitest/uitest/config.py deleted file mode 100644 index 400fd51f75c2.. --- a/uitest/uitest/config.py +++ /dev/null @@ -1,12 +0,0 @@ -# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -DEFAULT_SLEEP = 0.1 - -MAX_WAIT = 60 - -# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index 11cb15dab9c8..b718c84bee5e 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -8,14 +8,14 @@ import time import threading from contextlib import contextmanager -from uitest.config import DEFAULT_SLEEP -from uitest.config import MAX_WAIT from uitest.uihelper.common import get_state_as_dict from com.sun.star.uno import RuntimeException from libreoffice.uno.eventlistener import EventListener +DEFAULT_SLEEP = 0.1 + class UITest(object): def __init__(self, xUITest, xContext): @@ -50,61 +50,44 @@ class UITest(object): time.sleep(DEFAULT_SLEEP) def wait_until_child_is_available(self, childName): -time_ = 0 - -while time_ < MAX_WAIT: +while True: xDialog = self._xUITest.getTopFocusWindow() if childName in xDialog.getChildren(): return xDialog.getChild(childName) else: -time_ += DEFAULT_SLEEP time.sleep(DEFAULT_SLEEP) -raise Exception("Child not found: " + childName) - def wait_until_property_is_updated(self, element, propertyName, value): -time_ = 0 -while time_ < MAX_WAIT: +while True: if get_state_as_dict(element)[propertyName] == value: return else: -time_ += DEFAULT_SLEEP time.sleep(DEFAULT_SLEEP) -raise Exception("Property not updated: " + childName) - @contextmanager def wait_until_component_loaded(self): with EventListener(self._xContext, "OnLoad") as event: yield -time_ = 0 -while time_ < MAX_WAIT: +while True: if event.executed: frames = self.get_frames() if len(frames) == 1: self.get_desktop().setActiveFrame(frames[0]) time.sleep(DEFAULT_SLEEP) return -time_ += DEFAULT_SLEEP time.sleep(DEFAULT_SLEEP) -raise Exception("Component not loaded") - def load_component_from_url(self, url, eventName="OnLoad"): with EventListener(self._xContext, eventName) as event: component = self.get_desktop().loadComponentFromURL(url, "_default", 0, tuple()) -time_ = 0 -while time_ < MAX_WAIT: +while True: if event.executed: frames = self.get_frames() #activate the newest frame self.get_desktop().setActiveFrame(frames[-1]) return component -time_ += DEFAULT_SLEEP time.sleep(DEFAULT_SLEEP) -raise Exception("Document not loaded") - # Calls UITest.close_doc at exit @contextmanager def load_file(self, url): @@ -121,7 +104,6 @@ class UITest(object): finally: self.close_doc() - # Calls UITest.close_dialog_through_button at exit @contextmanager def execute_dialog_through_command(self, command, printNames=False, close_button = "ok", eventName = "DialogExecute"): @@ -157,8 +139,7 @@ class UITest(object): with EventListener(self._xContext, event_name) as event: ui_object.executeAction(action, parameters) -
[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py |3 +++ 1 file changed, 3 insertions(+) New commits: commit 2eb00243a1d5596ed608a476a73b2d063ab09a49 Author: Luboš Luňák AuthorDate: Wed Feb 2 16:01:33 2022 +0100 Commit: Luboš Luňák CommitDate: Thu Feb 3 12:53:41 2022 +0100 ignore ~ backup files when searching for .py uitest files Change-Id: I9b476336349b67d3d9bb149d4ad4824740797eb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129370 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/uitest/test_main.py b/uitest/test_main.py index 157d1f424e15..acc59ae753d2 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -47,6 +47,9 @@ def find_test_files(dir_path): if os.path.splitext(file_path)[1] == ".swp": continue # ignore VIM swap files +if file_path[-1:] == "~": +continue # ignore backup files + # fail on any non .py files if not os.path.splitext(file_path)[1] == ".py": raise Exception("file with an extension which is not .py: " + file_path)
[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) New commits: commit 8a636698795431915ab1f9877a29d6683d3d9f5b Author: Jan-Marek Glogowski AuthorDate: Sun Jun 27 21:06:38 2021 + Commit: Jan-Marek Glogowski CommitDate: Mon Jun 28 15:01:57 2021 +0200 uitest: log the active UITEST_TEST_NAME From the original commit bff02d54960b55e16d5c1220719bb86dc1fdd205 ("uitests - error if UITEST_TEST_NAME not set to anything useful"), it doesn't look like logging the test_name_limit_found is needed. Change-Id: Ibe1e6a5d63a968b06c4c8e8b4979d5b8caf8f54c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118016 Reviewed-by: Noel Grandin Reviewed-by: Jan-Marek Glogowski Tested-by: Jenkins diff --git a/uitest/test_main.py b/uitest/test_main.py index 1904ecbb3476..157d1f424e15 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -110,10 +110,12 @@ if __name__ == '__main__': elif "--dir" in opts: test_suite = get_test_suite_for_dir(opts) test_name_limit = os.environ.get('UITEST_TEST_NAME', '') -print(test_name_limit_found) -if len(test_name_limit) > 0 and not test_name_limit_found: -print("UITEST_TEST_NAME '%s' does not match any test" % test_name_limit) -sys.exit(1) +if len(test_name_limit) > 0: +if not test_name_limit_found: +print("UITEST_TEST_NAME '%s' does not match any test" % test_name_limit) +sys.exit(1) +else: +print("UITEST_TEST_NAME '%s' active" % test_name_limit) elif "--file" in opts: test_suite = unittest.TestSuite() add_tests_for_file(opts['--file'], test_suite) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 91c5642bf0ee48ff91181d779c3a84c768f340df Author: Stephan Bergmann AuthorDate: Thu Nov 5 08:19:51 2020 +0100 Commit: Stephan Bergmann CommitDate: Thu Nov 5 10:17:33 2020 +0100 Make order of UITest *.py test file processing deterministic ...hoping that this can prevent issues like the one seen with 1b0eb76eb1787d9d9fbd7a7a73ee8ae47b62dc33 "tdf#137617: sc: Add UItest" followed by d1232ee6b5e5cc3c811ef3ad72c83e9bd884bfe3 "uitest: reset formula syntax back to Calc A1" (i.e., where the first commit's Gerrit Jenkins build had apparently only succeeded because it happened to run the tests in one specific order, different from the order in which later, failing builds ran it) Change-Id: I4f1b5ada10d60e77b45a0edeb89069fe9376b63e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105325 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/uitest/test_main.py b/uitest/test_main.py index 3b2de433ca24..1904ecbb3476 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -37,7 +37,7 @@ def usage(): def find_test_files(dir_path): valid_files = [] -for f in os.listdir(dir_path): +for f in sorted(os.listdir(dir_path)): file_path = os.path.join(dir_path, f) # don't go through the sub-directories ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit fcc30680ee7ac7d2bf9ec4ccdae7256b61ad7102 Author: Miklos Vajna AuthorDate: Tue Feb 18 21:06:49 2020 +0100 Commit: Miklos Vajna CommitDate: Wed Feb 19 09:03:59 2020 +0100 uitest: make sure UITEST_TEST_NAME matches exactly one test function 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 diff --git a/uitest/test_main.py b/uitest/test_main.py index ab173c32476c..e1737947f536 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -84,7 +84,7 @@ def add_tests_for_file(test_file, test_suite): for test_name in test_names: full_name = ".".join([module_name, c.__name__, test_name]) if len(test_name_limit) > 0: -if not test_name_limit.startswith(full_name): +if test_name_limit != full_name: continue test_name_limit_found = True ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/test_main.py uitest/writer_tests
uitest/test_main.py|2 +- uitest/writer_tests/customizeDialog.py |4 ++-- uitest/writer_tests/start.py |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) New commits: commit c0e720bfd209b50ca7dc2082e340f9b6288a6216 Author: Jens Carl AuthorDate: Sun Nov 17 10:55:29 2019 -0800 Commit: Muhammet Kara CommitDate: Mon Nov 18 13:35:44 2019 +0100 Fix 'is' operator for comparison 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 diff --git a/uitest/test_main.py b/uitest/test_main.py index 851a44f8e929..ab173c32476c 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -54,7 +54,7 @@ def find_test_files(dir_path): # ignore the __init__.py file # it is obviously not a test file -if f is "__init__.py": +if f == "__init__.py": continue valid_files.append(file_path) diff --git a/uitest/writer_tests/customizeDialog.py b/uitest/writer_tests/customizeDialog.py index 9d2311eb46a6..fa187c36ac35 100644 --- a/uitest/writer_tests/customizeDialog.py +++ b/uitest/writer_tests/customizeDialog.py @@ -34,7 +34,7 @@ class ConfigureDialog(UITestCase): xSearch = xDialog.getChild("searchEntry") initialEntryCount = get_state_as_dict(xfunc)["Children"] -self.assertTrue(initialEntryCount is not 0) +self.assertTrue(initialEntryCount != 0) xSearch.executeAction("SET", mkPropertyValues({"TEXT":"format"})) @@ -67,7 +67,7 @@ class ConfigureDialog(UITestCase): xCategory = xDialog.getChild("commandcategorylist") initialEntryCount = get_state_as_dict(xFunc)["Children"] -self.assertTrue(initialEntryCount is not 0) +self.assertTrue(initialEntryCount != 0) select_pos(xCategory, "1") filteredEntryCount = get_state_as_dict(xFunc)["Children"] diff --git a/uitest/writer_tests/start.py b/uitest/writer_tests/start.py index c8cbcbba4884..5851e8eff7c9 100644 --- a/uitest/writer_tests/start.py +++ b/uitest/writer_tests/start.py @@ -45,7 +45,7 @@ class SimpleWriterTest(UITestCase): xWriterEdit = xWriterDoc.getChild("writer_edit") state = get_state_as_dict(xWriterEdit) -while state["CurrentPage"] is "1": +while state["CurrentPage"] == "1": xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) state = get_state_as_dict(xWriterEdit) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py |3 +++ 1 file changed, 3 insertions(+) New commits: commit 49b27f0662ca6786addd443ea23e9650b6f5521a Author: Michael Stahl AuthorDate: Fri Jul 12 19:31:29 2019 +0200 Commit: Michael Stahl CommitDate: Mon Jul 15 10:50:14 2019 +0200 uitest: don't complain about the silly VIM swap files Very annoying to have the test not run if you look at its code. Change-Id: Ied63432e0a0460ed66bad4cc53f4769810f058e8 Reviewed-on: https://gerrit.libreoffice.org/75515 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/uitest/test_main.py b/uitest/test_main.py index bbfb8ad57072..851a44f8e929 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -45,6 +45,9 @@ def find_test_files(dir_path): if not os.path.isfile(file_path): continue +if os.path.splitext(file_path)[1] == ".swp": +continue # ignore VIM swap files + # fail on any non .py files if not os.path.splitext(file_path)[1] == ".py": raise Exception("file with an extension which is not .py: " + file_path) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b0f22a54c4c6f45f173b91d051b34d176cbab629 Author: Miklos Vajna AuthorDate: Fri Jan 11 14:53:15 2019 +0100 Commit: Miklos Vajna CommitDate: Mon Jan 14 08:42:36 2019 +0100 uitest: fail early in case a test file would be ignored So the mistake I did in commit 457acbfa304ac8bda0755c9ca8f1e1e22e490ac8 (UITest_writer_tests: split this into 4 parts, 2018-07-03) does not happen again. Change-Id: Ia28ed1fe9909d9c46ebe95d3a1926b0dced46140 Reviewed-on: https://gerrit.libreoffice.org/66180 Reviewed-by: Markus Mohrhard Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/uitest/test_main.py b/uitest/test_main.py index 934b27790961..bbfb8ad57072 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -45,9 +45,9 @@ def find_test_files(dir_path): if not os.path.isfile(file_path): continue -# ignore any non .py files +# fail on any non .py files if not os.path.splitext(file_path)[1] == ".py": -continue +raise Exception("file with an extension which is not .py: " + file_path) # ignore the __init__.py file # it is obviously not a test file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 420b80a7d63f77bec324fae72fa1e3d07954bdfa Author: Miklos VajnaDate: Mon Feb 5 15:33:29 2018 +0100 uitest: improve conditional test suppression to limit by class and by function Example: make UITest_writerperfect_epubexport UITEST_TEST_NAME="epubexport.EPUBExportTest.testUIComponent" Change-Id: I7960a71574d8d3d9cb06399813c7370700579c3d Reviewed-on: https://gerrit.libreoffice.org/49246 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/uitest/test_main.py b/uitest/test_main.py index fabb8683d7c6..ec4f2071f102 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -69,8 +69,6 @@ def add_tests_for_file(test_file, test_suite): test_name_limit = os.environ.get('UITEST_TEST_NAME', '') test_loader = unittest.TestLoader() module_name = os.path.splitext(os.path.split(test_file)[1])[0] -if len(test_name_limit) > 0 and not test_name_limit.startswith(module_name): -return loader = importlib.machinery.SourceFileLoader(module_name, test_file) mod = loader.load_module() @@ -78,6 +76,10 @@ def add_tests_for_file(test_file, test_suite): for c in classes: test_names = test_loader.getTestCaseNames(c) for test_name in test_names: +full_name = ".".join([module_name, c.__name__, test_name]) +if len(test_name_limit) > 0 and not test_name_limit.startswith(full_name): +continue + obj = c(test_name, opts) test_suite.addTest(obj) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py |4 1 file changed, 4 insertions(+) New commits: commit 50962f29295e72bce0c45aef8fb3df9a291f22c0 Author: Markus MohrhardDate: Fri Oct 28 13:07:02 2016 -0700 provide a way to limit the UI tests through env Change-Id: If0af462f20f3541a183e00732944b0650d94639d Reviewed-on: https://gerrit.libreoffice.org/31512 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard diff --git a/uitest/test_main.py b/uitest/test_main.py index 498e45d..fabb868 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -66,8 +66,12 @@ def get_test_case_classes_of_module(module): return [ c for c in classes if issubclass(c, UITestCase) ] def add_tests_for_file(test_file, test_suite): +test_name_limit = os.environ.get('UITEST_TEST_NAME', '') test_loader = unittest.TestLoader() module_name = os.path.splitext(os.path.split(test_file)[1])[0] +if len(test_name_limit) > 0 and not test_name_limit.startswith(module_name): +return + loader = importlib.machinery.SourceFileLoader(module_name, test_file) mod = loader.load_module() classes = get_test_case_classes_of_module(mod) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py |1 + 1 file changed, 1 insertion(+) New commits: commit 5b1bb8983bb2860d0a5fcdcb3fa25e3b082c7c48 Author: Markus MohrhardDate: Fri Jun 24 00:30:10 2016 +0200 uitest: also print number of skipped tests Change-Id: I7fbc6513358be252b091154b5ed44d10c8f51c4f diff --git a/uitest/test_main.py b/uitest/test_main.py index 72c18ba..41a1b16 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -99,6 +99,7 @@ if __name__ == '__main__': print("Tests run: %d" % result.testsRun) print("Tests failed: %d" % len(result.failures)) print("Tests errors: %d" % len(result.errors)) +print("Tests skipped: %d" % len(result.skipped)) if not result.wasSuccessful(): sys.exit(1) sys.exit(0) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: uitest/test_main.py
uitest/test_main.py |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit b722f3d6fc72877e8ce7291d5d736ddc494d Author: Markus MohrhardDate: Thu Jun 23 05:32:37 2016 +0200 uitest: improve the message of the ui test runner Change-Id: I5026590506b4ddf3db95fb14fe6b0890255a5a25 diff --git a/uitest/test_main.py b/uitest/test_main.py index 15e5d70..72c18ba 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -95,6 +95,12 @@ if __name__ == '__main__': sys.exit() test_suite = get_test_suite(opts) -unittest.TextTestRunner().run(test_suite) +result = unittest.TextTestRunner(verbosity=2).run(test_suite) +print("Tests run: %d" % result.testsRun) +print("Tests failed: %d" % len(result.failures)) +print("Tests errors: %d" % len(result.errors)) +if not result.wasSuccessful(): +sys.exit(1) +sys.exit(0) # vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits