0

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.

4

1 回答 1

0

KDevelop 似乎有问题。从控制台运行测试不会更改工作目录。

我创建了一个错误报告:https ://bugs.kde.org/show_bug.cgi?id=349378

于 2015-06-19T10:18:50.243 回答