Page MenuHomePhabricator

Module loading tests should force test modules to be built
Closed, InvalidPublic

Description

While setting up the CDash client "core-ubuntu-10.04" (compiling only MITK core) I found that mitkModuleTest (Core/Code/Testing/mitkModuleTest.cpp) depends on 5 modules that are built only for the purpose of testing.

When a project builts MITK with the CMake option MITK_MODULES_TO_BUILD option, mentioned test modules are only built when they are listed explicitly by the project which builds MITK.

This solution is not optimal because the "outer" project will not be interested in internal testing ideas and implicit dependencies. Each time these change, the project would need to take notice and update a couple of build environments or CDash clients.

I found that the simpler solution would be if the testmodules force themselves to be built explicitly, because they are always required for core testing.

Sascha, if you have a short look at my change and don't have objections, this could easily be integrated.

Event Timeline

Seems that I first checked an outdated version of MITK. I found the modules to be relocated from

Core/Code/Testing/TestModules/CMakeLists.txt

to

Core/Code/CppMicroServices/test/modules/CMakeLists.txt

Also the CMake code seems to be more lengthy now, I don't know if the fix is still necessary. Sascha, could you give a quick opinion?

(In reply to comment #1)

Also the CMake code seems to be more lengthy now, I don't know if the fix is
still necessary. Sascha, could you give a quick opinion?

On this diff...

http://mitk.org/git/?p=MITK.git;a=commitdiff;h=0df96585eee6a42d71b5726bf701969f716b12ae

After talking to Sascha, this issue seems to be fixed. Was fixed only a couple of days after the master version that I used.

kislinsk changed the task status from Invalid to Spite.Jun 27 2018, 1:32 PM
kislinsk added a project: Bulk Edit.
kislinsk changed the task status from Spite to Invalid.Jun 27 2018, 1:37 PM
kislinsk removed a project: Bulk Edit.