Page MenuHomePhabricator

VS project "RUN_TESTS" does not work
Closed, ResolvedPublic

Description

In Visual Studio the project "RUN_TESTS" does not work anymore. Most of the tests fail with an undefined error. The tests work correctly if started "by hand" in Visual Studio or when starting them from command line (after the path variable is correctly set).

I assume that the problem was introduced when introducing the feature that MITK solutions does not need a startVS*.bat anymore. Seems like the "RUN_TESTS" project is not started with the correct path setting and therefor the test driver fail.

Event Timeline

The project VerifyDICOMMitkImageDump (and its (deprecated ?) clone VerifyDCMMitkImageDump) does also not work currently within VS due to missing pathes.

kislinsk triaged this task as Low priority.

Some musings:

  • I can get the tests to run in the command line by extending the PATH environment variable to include all needed directories
  • The tests are run as a post-build event for RUN_TESTS, thus just adding the path to the environment part of the ConfigurationProperties->Debugging does not help
  • Adapting the CTestCustom.cmake to include a set(CTEST_CUSTOM_PRE_TEST ) which sets the PATH results in errors for me

I am going to look at modifying our test macros to include

SET_TESTS_PROPERTIES(the_test PROPERTIES ENVIRONMENT "PATH=...")