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/uitest | |
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/uitest')
-rw-r--r-- | uitest/uitest/config.py | 10 | ||||
-rw-r--r-- | uitest/uitest/debug.py | 16 |
2 files changed, 26 insertions, 0 deletions
diff --git a/uitest/uitest/config.py b/uitest/uitest/config.py new file mode 100644 index 000000000000..fa13274863ff --- /dev/null +++ b/uitest/uitest/config.py @@ -0,0 +1,10 @@ +# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-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/. +# + +use_sleep = False + +# vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/uitest/uitest/debug.py b/uitest/uitest/debug.py new file mode 100644 index 000000000000..8af6d8af9e7a --- /dev/null +++ b/uitest/uitest/debug.py @@ -0,0 +1,16 @@ +# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-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/. +# + +import uitest.config + +import time + +def sleep(seconds): + if uitest.config.use_sleep: + time.sleep(seconds) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: */ |