Skip to content

Unit Test Cross Compiling #556

Answered by skliper
ewong-canadensys asked this question in Q&A
Discussion options

You must be logged in to vote

The coverage flags get added here when not cross-compiling and on linux:
https://github.com/nasa/osal/blob/6e6afb4d3ea611f5d11e4e94a5adee595cc08b99/src/bsp/generic-linux/build_options.cmake#L20-L23

To add coverage for other cases it may just be easiest to add those flags from whatever toolchain.cmake file you are using. for example in toolchain-cpu1.cmake just add:

set(UT_COVERAGE_COMPILE_FLAGS -pg --coverage)
set(UT_COVERAGE_LINK_FLAGS    -pg --coverage)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ewong-canadensys
Comment options

@skliper
Comment options

@ewong-canadensys
Comment options

Answer selected by ewong-canadensys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants