I am starting a test with Helgrind using Ctest:
find_program(VALGRIND_EXECUTABLE valgrind)
message(STATUS "Valgrind in ${VALGRIND_EXECUTABLE}")
configure_file(project.supp project.supp)
set(BOOST_TEST_ARGS --catch_system_errors=no)
set(VALGRIND_HELGRIND_OPTIONS --tool=helgrind --suppressions=${CMAKE_CURRENT_BINARY_DIR}/project.supp --xml=yes --read-var-info=yes)
add_test(NAME TestHelgrind COMMAND ${VALGRIND_EXECUTABLE} ${VALGRIND_HELGRIND_OPTIONS} --xml-file=${CMAKE_CURRENT_BINARY_DIR}/test.xml ${CMAKE_CURRENT_BINARY_DIR}/test ${BOOST_TEST_ARGS})
However the working directory in the test seems to be /usr/bin. Even when specifying:
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
which should be the default I guess. It works if I use memcheck for example.
The test is started from KDevelop.
It seems to be a problem with KDevelop. Running the test from the console did not change the working directory.
I've created a bug report: https://bugs.kde.org/show_bug.cgi?id=349378