I am trying to understand/use a pre-defined Makefile (from CppUTest, MakefileWorker.mk).
Around line 515 there is a gcov
command available. However, when I use make gcov
gcov is (once) invoked with apparantly invalid parameters as it (once) prints its usage:
D:\devel\ctest>make gcov
Running ctest_tests
..............................................
OK (46 tests, 46 ran, 407 checks, 0 ignored, 0 filtered out, 0 ms)
./../cpputest/scripts/filterGcov.sh gcov_output.txt gcov_error.txt gcov_report.txt ctest_tests.txt
0.00%
0.00% -a, --all-blocks Show information for every basic block
0.00% -b, --branch-probabilities Include branch probabilities in output
0.00% -c, --branch-counts Output counts of branches taken
0.00% -d, --display-progress Display progress information
0.00% -f, --function-summaries Output summaries for each function
0.00% -h, --help Print this help, then exit
0.00% -i, --intermediate-format Output .gcov file in intermediate text format
0.00% -l, --long-file-names Use long output file names for included
0.00% -m, --demangled-names Output demangled function names
0.00% -n, --no-output Do not create an output file
0.00% -o, --object-directory DIR|FILE Search for object files in DIR or called FILE
0.00% -p, --preserve-paths Preserve all pathname components
0.00% -r, --relative-only Only show data for relative sources
0.00% -s, --source-prefix DIR Source prefix to elide
0.00% -u, --unconditional-branches Show unconditional branch counts too
0.00% -v, --version Print version number, then exit
0.00% <http://sourceforge.net/projects/mingw-w64>.
0.00% For bug reporting instructions, please see:
0.00% Print code coverage information.
0.00% rather than percentages
0.00% source files
0.00% Usage: gcov [OPTION]... SOURCE|OBJ...
96.97% src/HomeAutomation/LightScheduler.c
100.00% src/HomeAutomation/RandomMinute.c
File src/HAL/UART/hal_uart_baudrate.c Lines executed:97.22% of 72
See gcov directory for details
D:\devel\ctest>
But I am all but skilled in unravelling Makefiles/bash scripts and have no clue where things might go wrong. As for the settings used:
CPPUTEST_USE_VPATH = N
SRC_DIRS = \
src/util\
src/HomeAutomation\
src/HAL/UART
SRC_FILES is empty
It is going "wrong" at the gcov --object-directory etc
invocation, but that is all I know.