Skip to content
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

Fix #32, compile out CF_Asserts by default #153

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

jphickey
Copy link
Contributor

@jphickey jphickey commented Jan 6, 2022

Describe the contribution
Changes CF_Assert to be opt-in rather than opt-out, so that under normal verification and validation the asserts will not be included, but they can still be added back during development, if desired.

They mainly exist as notes to developers as to what is supposed to be true, once debugged it is impossible to get these conditions, by definition.

Also removes one channel calculation that was only for assert. Note that the same condition is asserted later, so it was redundant anyway.

Fixes #32

Testing performed
Build and sanity check CF with CF_DEBUG_BUILD set both ways

Expected behavior changes
Branch coverage on LCOV report is much better with asserts compiled out.

System(s) tested on
Ubuntu 21.10

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Changes CF_Assert to be opt-in rather than opt-out, so that under normal
verification and validation the asserts will _not_ be included, but they
can still be added back during development, if desired.

They mainly exist as notes to developers as to what is supposed to be true,
once debugged it is impossible to get these conditions, by definition.

Also removes one channel calculation that was only for assert.  Note that
the same condition is asserted later, so it was redundant anyway.
@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jan 10, 2022
@astrogeco astrogeco merged commit c25b663 into nasa:main Jan 12, 2022
@astrogeco astrogeco removed the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jan 12, 2022
@jphickey jphickey deleted the fix-32-cf-assert-debug-only branch January 12, 2022 16:52
@jphickey jphickey linked an issue Jan 18, 2022 that may be closed by this pull request
@skliper skliper added this to the Draco milestone Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants