ROOT library loading tests fail

Issue #204 resolved
Jochem Snuverink created an issue

Since the include paths were removed in ca5efb3 the ROOT library tests are failing (on Linux). ROOT_INCLUDE_PATH needs to be set appropriately in the tests. See also #197

Comments (7)

  1. Laurie Nevay

    I'm in the midst of fixing this. I'd set the environmental variable through:

    set(CTEST_ENVIRONMENT
     "ROOT_INCLUDE_PATH=$ENV{BDS_SRC_DIR}/include/:$ENV{BDS_SRC_DIR}/analysis/"
     )
    

    However, this doesn't seem to work. The ctest documentation is quite vague about this and when it should appear in the script. I'll probably move it to the submission script.

    I was waiting each day to see how the tests faired.

    One issue was that the build directory doesn't contain any headers, so I've pointed it to the appropriate source directories. We don't use an install directory for the ctest tests of course.

    @stewartboogert will your ROOT_INCLUDE_PATH solution work if I point it at the source directory includes?

  2. Laurie Nevay

    They fail with the environment set both in the bash script and in CTEST_ENVIRONMENT so I can only conclude that the ROOT_INCLUDE_DIR solution doesn't work in this case and it's not a scripting fault.

  3. Jochem Snuverink reporter

    The CTEST_ENVIRONMENT seems not to work? https://cmake.org/pipermail/cmake/2009-September/031900.html

    Something like this should work I think:

    set_property(
        TEST
            root-test
        PROPERTY
            ENVIRONMENT ROOT_INCLUDE_PATH=${CMAKE_SOURCE_DIR}/include/:${CMAKE_SOURCE_DIR}/analysis/)
    

    To see if it works, you could try printing the variable in the test inside ROOT with:

    .!echo $ROOT_INCLUDE_DIR

  4. Jochem Snuverink reporter

    I checked and confirm the set-property solution works (for me on Linux). I can push this if you agree.

  5. Log in to comment