[vtk-developers] Possible issue with the VTK Master

David Gobbi david.gobbi at gmail.com
Tue Mar 12 09:23:53 EDT 2013


On Tue, Mar 12, 2013 at 7:13 AM, Kyle Lutz <kyle.lutz at kitware.com> wrote:
> On Tue, Mar 12, 2013 at 3:39 AM, Andrew Maclean
> <andrew.amaclean at gmail.com> wrote:
>> OK ... I deleted the build directory and ran CMake again and things are much
>> improved. See: http://open.cdash.org/viewTest.php?onlyfailed&buildid=2843128
>>
>> However:
>> vtkpython TestProjectedTerrainPath.py
>> Traceback (most recent call last):
>>   File "TestProjectedTerrainPath.py", line 15, in <module>
>>     lo = lindex(demReader.GetOutput().GetScalarRange(),0)
>> NameError: name 'lindex' is not defined
>>
>> yet:
>>
>> ctest -R TestProjectedTerrainPath
>> Test project /home/amaclean/Code/Kitware/build/VTK
>>     Start 674: vtkFiltersHybridPython-TestProjectedTerrainPath
>> 1/2 Test #674: vtkFiltersHybridPython-TestProjectedTerrainPath ...   Passed
>> 2.24 sec
>>     Start 693: vtkFiltersHybridTcl-TestProjectedTerrainPath
>> 2/2 Test #693: vtkFiltersHybridTcl-TestProjectedTerrainPath ......   Passed
>> 1.69 sec
>>
>> 100% tests passed, 0 tests failed out of 2
>>
>> Could someone please point me to an explanation as to why ctest works, I
>> would have expected a fail at line 15 because of lindex(). My concern here
>> is that if it is Python code you would reasonably expect just Python code
>> lindex() is certainly not that.
>> I don't understand how these Python equivalents of the Tcl names are being
>> brought in by CTest.
>
> Hi Andrew,
>
> Most (all?) of the converted TCL scripts are run through the
> rtImageTest.py driver which defines a few functions/variables (one of
> which is lindex).
>
> If you run "ctest -R vtkFiltersHybridPython-TestProjectedTerrainPath
> -V -N" you can see the command line that ctest uses on the line that
> starts with "Test command:". Running that entire command should give
> you the same results as running the test with ctest.
>
> -kyle

I'm not a fan of all the "tcl-isms" in the python tests, myself.  The
vtkTclTestToPy converter that was used for most test generates
python code that is barely legible.  We have another converter,
tcl2py.py, which isn't quite as powerful but which produces much
nicer output.

 - David



More information about the vtk-developers mailing list