aboutsummaryrefslogtreecommitdiff
path: root/vk_layer_documentation_generate.py
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-05-11 07:26:33 -0600
committerTobin Ehlis <tobine@google.com>2016-05-12 17:46:33 -0600
commit743b48215ad6ef3a6cbc876c6009df10dea47bbc (patch)
tree5c8ef40dbed694f8f69220b17180667d420af4e8 /vk_layer_documentation_generate.py
parent44a77bda6639de54539eb23fbfc34b8080689580 (diff)
downloadusermoji-743b48215ad6ef3a6cbc876c6009df10dea47bbc.tar.xz
tests: Enhance doc validator to recognize Wsi tests
Enable doc validator to recognize tests in VkWsiEnabledLayerTest group.
Diffstat (limited to 'vk_layer_documentation_generate.py')
-rwxr-xr-xvk_layer_documentation_generate.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/vk_layer_documentation_generate.py b/vk_layer_documentation_generate.py
index 4f23cd60..96eb3d5a 100755
--- a/vk_layer_documentation_generate.py
+++ b/vk_layer_documentation_generate.py
@@ -133,10 +133,13 @@ class bcolors:
# Class to parse the validation layer test source and store testnames
class TestParser:
- def __init__(self, test_file_list, test_group_name='VkLayerTest'):
+ def __init__(self, test_file_list, test_group_name=['VkLayerTest', 'VkWsiEnabledLayerTest']):
self.test_files = test_file_list
self.tests_set = set()
- self.test_trigger_txt = 'TEST_F(%s' % test_group_name
+ self.test_trigger_txt_list = []
+ for tg in test_group_name:
+ self.test_trigger_txt_list.append('TEST_F(%s' % tg)
+ #print('Test trigger test list: %s' % (self.test_trigger_txt_list))
# Parse test files into internal data struct
def parse(self):
@@ -148,7 +151,7 @@ class TestParser:
if True in [line.strip().startswith(comment) for comment in ['//', '/*']]:
continue
- if self.test_trigger_txt in line:
+ if True in [ttt in line for ttt in self.test_trigger_txt_list]:
#print('Test wildcard in line: %s' % (line))
testname = line.split(',')[-1]
testname = testname.strip().strip(' {)')
@@ -272,7 +275,8 @@ class LayerDoc:
self.layer_doc_dict[layer_name][check_name]['notes'] = detail_sections[6].strip()
# strip any unwanted commas from api and test names
self.layer_doc_dict[layer_name][check_name]['api_list'] = [a.strip(',') for a in self.layer_doc_dict[layer_name][check_name]['api_list']]
- self.layer_doc_dict[layer_name][check_name]['tests'] = [a.strip(',') for a in self.layer_doc_dict[layer_name][check_name]['tests']]
+ test_list = [a.strip(',') for a in self.layer_doc_dict[layer_name][check_name]['tests']]
+ self.layer_doc_dict[layer_name][check_name]['tests'] = [a.split('.')[-1] for a in test_list]
# Trigger details parsing when we have table header
if detail_trigger in line:
parse_layer_details = True