diff --git a/unit_tests/.gitignore b/unit_tests/.gitignore index aee357234f..43d4fb9d9d 100644 --- a/unit_tests/.gitignore +++ b/unit_tests/.gitignore @@ -3,3 +3,4 @@ build*/ gcov_working_area triggers unittest*.logicdata +coverage/ diff --git a/unit_tests/generate_coverage.sh b/unit_tests/generate_coverage.sh new file mode 100755 index 0000000000..ac3fa6d734 --- /dev/null +++ b/unit_tests/generate_coverage.sh @@ -0,0 +1,4 @@ +mkdir coverage + +lcov -c --directory . --output-file ./coverage/main_coverage.info +genhtml ./coverage/main_coverage.info --output-directory ./coverage/html_report diff --git a/unit_tests/run_gcov.bat b/unit_tests/run_gcov.bat deleted file mode 100644 index 0efdc00527..0000000000 --- a/unit_tests/run_gcov.bat +++ /dev/null @@ -1,23 +0,0 @@ - -echo TL,DR: gcov does NOT work on windows! -exit - -rm -rf gcov_working_area - -mkdir gcov_working_area -cd gcov_working_area -ls -l - - -find_cyg .. -name *.c* > source_files.txt -find_cyg ../../firmware/console/ -name *.c* >> source_files.txt -find_cyg ../../firmware/controllers/ -name *.c* >> source_files.txt - - -xargs -L 1 -I {} cp {} . < source_files.txt - -cp ../build/obj/* . - -gcov *.c* > gcov.log 2>gcov.err - -rem TODO find a windows solution, I was not able to find a working lcov for Windows :( \ No newline at end of file