diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-26 03:03:52 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-26 03:28:09 +0200 |
commit | 65979ca6ebf341a4733b2755d099e365e6dd0fa0 (patch) | |
tree | 634ad89fb2676c0b138b8840171a8181a25a2ea1 /uitest/test_main.py | |
parent | 901aa845b7b7fe0e0f2ed483d3b8e7b7ffd8b894 (diff) |
uitest: add a way to have sleeps in some test runs
Now adding a -d or --debug to the command line options will enable the
sleeps in the uitest.debug part. This makes it much easier to debug a
test in the visual mode.
Only remaining part is now to add a test runner into the build system
that makes use of that mode.
Change-Id: I03d55b10f06dd12a63a8d87c135967901bef0fba
Diffstat (limited to 'uitest/test_main.py')
-rw-r--r-- | uitest/test_main.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/uitest/test_main.py b/uitest/test_main.py index c75533685174..97afeb43f60c 100644 --- a/uitest/test_main.py +++ b/uitest/test_main.py @@ -13,13 +13,15 @@ import calc_tests import importlib import importlib.machinery +import uitest.config + from uitest.framework import UITestCase from libreoffice.connection import OfficeConnection def parseArgs(argv): - (optlist,args) = getopt.getopt(argv[1:], "hr", - ["help", "soffice=", "userdir=", "dir=", "file="]) + (optlist,args) = getopt.getopt(argv[1:], "hdr", + ["help", "debug", "soffice=", "userdir=", "dir=", "file="]) return (dict(optlist), args) def usage(): @@ -101,6 +103,9 @@ if __name__ == '__main__': usage() sys.exit() + if "-d" in opts or "--debug" in opts: + uitest.config.use_sleep = True + result = unittest.TextTestRunner(verbosity=2).run(test_suite) print("Tests run: %d" % result.testsRun) print("Tests failed: %d" % len(result.failures)) |