test_tensor_layout.py tests fail when doxygen is not installed

Issue #830 resolved
Prof Garth Wells created an issue

When doxygen is not installed, the tests in test/unit/python/la/test_tensor_layout.py fail. The error is

E       TypeError: SparsityPatternBuilder_build() takes no keyword arguments

The tests pass when doxygen is installed.

I'm testing with Python 3 and Swig 3.0.12

Comments (10)

  1. Tormod Landet

    OK, so merely mentioning that the method exists causes SWIG to do the right thing. If we do not mention the method in the interface files SWIG will still generate a callable, but with wrong parameters (I did not look at the code yet, only on what you wrote, so this is me guessing).

    The rest of the SWIG interface generation routines needs to be looked at, they may have some missing parts that are covered up by the generation of docstrings. Maybe just outputing empty docstrings in the interface generation routine and then overwriting them with the doxygen ones later will work if the docstrings.i file is included after the interface definition files.

    I am going to the mountains in a couple of hours, and I will not be able to look at this until sometimes next week

  2. Prof Garth Wells reporter

    @chris_richardson Do you have some idea what's going on? This issue is a release blocker.

  3. Jan Blechta

    Sorry for my ignorance of CMake. Are the custom targets run automatically? I can't find any reference to them anywhere.

  4. Tormod Landet

    From a bit of googling (I am no CMake expert)

    ......8<............
    
    Yes, the target from ADD_CUSTOM_TARGET is always out-of-date so it
    will be invoked every time. That means that if you would have a
    COMMAND in the target (which you don't), that command would be run
    every time, like the command "blablabla" below:
    
     add_custom_target (
        generateheader ALL
        DEPENDS results/header.h
        COMMAND blablabla
     )
    

    https://cmake.org/pipermail/cmake/2008-December/026117.html

  5. Log in to comment