-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --coverage
option for local.py, make clang coverage builds use -fcoverage-mapping/-fprofile-instr-generate
#37457
base: master
Are you sure you want to change the base?
Add --coverage
option for local.py, make clang coverage builds use -fcoverage-mapping/-fprofile-instr-generate
#37457
Conversation
Changed Files
|
PR #37457: Size comparison from 8deebeb to 678832f Full report (14 builds for cc13x4_26x4, cc32xx, nrfconnect, qpg, stm32, tizen)
|
--coverage
option for local.py--coverage
option for local.py, make clang coverage builds use -fcoverage-mapping/-fprofile-instr-generate
PR #37457: Size comparison from 8deebeb to 43f94d6 Full report (45 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, nrfconnect, psoc6, qpg, stm32, telink, tizen)
|
This pull request enables building the Python test example apps with the --coverage option. However, while the example apps are now built with coverage instrumentation, they still build the SDK independently and don't use the SDK built during the unit tests. I believe this won't affect the final coverage results because the example app's binary isn't included in the statistics folder used by lgcov. But this is good step forward. |
PR #37457: Size comparison from 8deebeb to b839967 Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
I need to iterate on it. Sample apps also use the SDK built through "third_party/...." so paths do not match. I am not sure how (if even possible) to combine them. Still iterating on "gather results" part. |
This pull request enables building and running Python tests with the --coverage option. Future work will focus on how the build_coverage.sh script can utilize this new functionality to improve coverage results. Lets split the work |
PR #37457: Size comparison from 8deebeb to a18015d Full report (3 builds for cc32xx, stm32)
|
PR #37457: Size comparison from 8deebeb to 4c507c4 Full report (9 builds for cc13x4_26x4, cc32xx, stm32, tizen)
|
PR #37457: Size comparison from 8deebeb to 7317c8d Full report (20 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, nrfconnect, qpg, stm32, tizen)
|
PR #37457: Size comparison from 8deebeb to 6c8219e Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #37457: Size comparison from 8deebeb to 96f1443 Full report (70 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink)
|
PR #37457: Size comparison from 8deebeb to 9adddfc Full report (20 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, nrfconnect, qpg, stm32, tizen)
|
PR #37457: Size comparison from 8deebeb to 1d15fed Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
This allows coverage option to be passed in to the
local.py
script as a persistent option (once you build with coverage, tests start running with coverage).Changes:
--coverage/--no-coverage
as command line options to local.py-fprofile-generate
and-fcoverage-mapping
instead of--coverage
since otherwise I get errors regarding lcov version. Since we pull pigweed clang, we also pull compatible llvm-cov binaries so using that seems to be more consistent.Testing
Ran
build
locally, observed coverage flag was used in outputs. Ranpython-tests
and observed coverage settings were picked up.