Kaydet (Commit) 50962f29 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

provide a way to limit the UI tests through env

Change-Id: If0af462f20f3541a183e00732944b0650d94639d
Reviewed-on: https://gerrit.libreoffice.org/31512Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst ce17ebb6
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment