UnitTestFrameworkPkg: Add code coverage support for GCC

In order to collect code coverage after running executable
file, generate *.gcda and *.gcno file that require by lcov tool
to generate code coverage report.

Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com>
Signed-off-by: Gua Guo <gua.guo@intel.com>
This commit is contained in:
Gua Guo
2022-09-27 12:24:18 +08:00
committed by mergify[bot]
parent b670700ddf
commit 3701f105fa
3 changed files with 44 additions and 1 deletions

View File

@@ -27,7 +27,8 @@
GCC:*_*_*_CC_FLAGS = -D UNIT_TESTING_DEBUG=1
XCODE:*_*_*_CC_FLAGS = -D UNIT_TESTING_DEBUG=1
!endif
GCC:*_GCC5_*_CC_FLAGS = --coverage
GCC:*_GCC5_*_DLINK_FLAGS = --coverage
[BuildOptions.common.EDKII.HOST_APPLICATION]
#
# MSFT