Kaydet (Commit) 420b80a7 authored tarafından Miklos Vajna's avatar Miklos Vajna

uitest: improve conditional test suppression to limit by class and by function


make UITest_writerperfect_epubexport UITEST_TEST_NAME="epubexport.EPUBExportTest.testUIComponent"

Change-Id: I7960a71574d8d3d9cb06399813c7370700579c3d
Reviewed-on: https://gerrit.libreoffice.org/49246Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 03cee024
......@@ -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):
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):
obj = c(test_name, opts)
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