Multiple Header Tests fail with Python 2.x (VTK 7.0.0)
Multiple tests fail if the installed version of Python is 2.x (i.e. PYTHON_EXECUTABLE in CMakeCache.txt
):
00:26:26.047 The following tests FAILED:
00:26:26.047 31 - vtkCommonCore-HeaderTest (Failed)
00:26:26.047 38 - vtkCommonExecutionModel-HeaderTest (Failed)
00:26:26.047 39 - vtkFiltersCore-HeaderTest (Failed)
00:26:26.047 41 - vtkFiltersGeneral-HeaderTest (Failed)
00:26:26.047 47 - vtkFiltersGeometry-HeaderTest (Failed)
00:26:26.047 49 - vtkRenderingCore-HeaderTest (Failed)
00:26:26.047 55 - vtkInteractionStyle-HeaderTest (Failed)
00:26:26.047 57 - vtkRenderingOpenGL2-HeaderTest (Failed)
00:26:26.047 152 - vtkRenderingAnnotation-HeaderTest (Failed)
00:26:26.047 154 - vtkInteractionWidgets-HeaderTest (Failed)
00:26:26.047 158 - vtkRenderingVolumeOpenGL2-HeaderTest (Failed)
These do NOT fail with Python 3.x.
This issue is caused because the relevant C++ headers include carriage returns between parent class and derived class, which Testing/Core/HeaderTesting.py
does not cope with (the CR ends up part of the class name used for comparison).
Simple fix is to strip control characters from the class name and parent name. For example:
re.sub(r'[\x00-\x1f\x7f-\x9f]', '', str1)
where str1
is the string to be stripped.