Skip to content
Snippets Groups Projects
Commit 59f7bce2 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

HeaderTesting: support exclusions with C comments

parent 8f3cabed
No related merge requests found
......@@ -128,6 +128,8 @@ class TestVTKFiles:
def CheckExclude(self):
prefix = '// VTK-HeaderTest-Exclude:'
prefix_c = '/* VTK-HeaderTest-Exclude:'
suffix_c = ' */'
exclude = 0
for l in self.FileLines:
if l.startswith(prefix):
......@@ -136,6 +138,12 @@ class TestVTKFiles:
exclude += 1
else:
self.Error("Wrong exclusion: "+l.rstrip())
elif l.startswith(prefix_c) and l.rstrip().endswith(suffix_c):
e = l[len(prefix_c):-len(suffix_c)].strip()
if e == os.path.basename(self.FileName):
exclude += 1
else:
self.Error("Wrong exclusion: "+l.rstrip())
if exclude > 1:
self.Error("Multiple VTK-HeaderTest-Exclude lines")
return exclude > 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment