X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=README.md;h=9f43ec6e7c8e45f096b723028b73dc4351ccd540;hb=931b2b0f50e4446a705d2238274914f78b681b6d;hp=52e650368d4f3ddac3f42d77ad09aa7c23bf09d0;hpb=91a224f190867869d2d0b14a5f96e44a0593e682;p=ric-plt%2Fsdl.git diff --git a/README.md b/README.md index 52e6503..9f43ec6 100644 --- a/README.md +++ b/README.md @@ -172,6 +172,31 @@ line options gtest supports, for example: make testrunner ./testrunner --help +## Running unit tests with gcov + +Enable unit test gcov code coverage analysis by configuring gcov reporting +directory: + + configure --with-gcov-report-dir=DIR + +Directory can be an absolute path or a relative path to an SDL source root. +Unit test build creates directory if it does not exist. + +Build and run unit tests with code coverage analysis: + + make test_gcov + +After successful unit test run code coverage (.gcov) result files are in +a directory, what was defined by '--with-gcov-report-dir' configure option. + +In addition, graphical gcov front-ends such as lcov can be used for coverage +analysis: + + lcov --directory tst/ --directory src --capture --output-file coverage.info + genhtml coverage.info --output-directory out + +Open the out/index.html using any web browser. + ## Using SDL in application pod SDL is not yet available in O-RAN-SC PackageCloud.io repository.