uitest/test_main.py |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 50962f29295e72bce0c45aef8fb3df9a291f22c0
Author: Markus Mohrhard <markus.mohrh...@googlemail.com>
Date:   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 <markus.mohrh...@googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com>

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

Reply via email to