code coverage - how to change the path of source file which was referred gcda? -
when build project coverage testing "--coverage -fprofile-arcs -ftest-coverage", , move build , source other user directory execute testing. many problems such "xxx/cc/cc/getopt_log.c:cannot open source file" the details below: processing cs/cmakefiles/cfa/__/src/base/fault_injection.c.gcda /home/cov/build/xfcq/src/base/fault_injection.c:cannot open source file the path of "/home/cov/build/xfcq/src/base/fault_injection.c" path of build environment, how change relative path or path specified. i tried use gcov_prefix , gcov_prefix_strip, these can't work me. i tried add -b option lcov, not work me. e.g., lcov --gcov-tool=/bin/gcov -d . -b xx/src -t "xfcq" -o test_cov.info do have idea resolve it? well using gcov coverage process should never move files after building project, instead should modify automated build scripts build desired location. when compile project specified options generates *.gcno files each source ...