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

Port "CFE_UtAssert_SuccessCheck" and related macros from coverage test to functional test #1784

Closed
jphickey opened this issue Aug 10, 2021 · 1 comment · Fixed by #1790 or #1808
Closed
Assignees
Milestone

Comments

@jphickey
Copy link
Contributor

jphickey commented Aug 10, 2021

Is your feature request related to a problem? Please describe.
The CFE coverage test has a number of useful test macros:

  • CFE_UtAssert_SETUP
  • CFE_UtAssert_TEARDOWN
  • CFE_UtAssert_SUCCESS
  • CFE_UtAssert_MSGID_EQ
  • CFE_UtAssert_RESOURCEID_EQ
  • CFE_UtAssert_MEMOFFSET_EQ

However, these are only accessible/usable from the coverage test environment. It would be helpful if equivalent macros/functions existed in the functional test environment.

Describe the solution you'd like
Define the same basic set of macros in cfe_assert.h so they can be used by any functional test.

Additional context
Due to the considerable differences in the application linkage, there currently is no (real) library that is common between the coverage test and functional test environments, aside from UtAssert itself.

Unfortunately this means there is no easy way to use the exact same definition of these macros, but as they are just wrappers around UtAssert functions so it isn't that bad to duplicate them.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey
Copy link
Contributor Author

Additionally I would recommend moving some of the existing macros which are defined in cfe_testcase module to the cfe_assert module as well:

  • cFE_FTAssert_ResourceID_EQ -> CFE_UtAssert_RESOURCEID_EQ
  • cFE_FTAssert_ResourceID_Undefined -> CFE_UtAssert_RESOURCEID_UNDEFINED
  • cFE_FTAssert_NOT_CFE_SUCCESS -> CFE_UtAssert_NOT_SUCCESS

@jphickey jphickey self-assigned this Aug 10, 2021
jphickey added a commit to jphickey/cFE that referenced this issue Aug 10, 2021
Adds the following macros to CFE assert library in cfe_assert.h:

- CFE_UtAssert_SETUP
- CFE_UtAssert_SUCCESS
- CFE_UtAssert_NOT_SUCCESS
- CFE_UtAssert_TEARDOWN
- CFE_UtAssert_RESOURCEID_EQ
- CFE_UtAssert_RESOURCEID_UNDEFINED
- CFE_UtAssert_MEMOFFSET_EQ
- CFE_UtAssert_MSGID_EQ
jphickey added a commit to jphickey/cFE that referenced this issue Aug 10, 2021
Adds the following macros to CFE assert library in cfe_assert.h:

- CFE_UtAssert_SETUP
- CFE_UtAssert_SUCCESS
- CFE_UtAssert_NOT_SUCCESS
- CFE_UtAssert_TEARDOWN
- CFE_UtAssert_RESOURCEID_EQ
- CFE_UtAssert_RESOURCEID_UNDEFINED
- CFE_UtAssert_MEMOFFSET_EQ
- CFE_UtAssert_MSGID_EQ
jphickey added a commit to jphickey/cFE that referenced this issue Aug 10, 2021
Adds the following macros to CFE assert library in cfe_assert.h:

- CFE_UtAssert_SETUP
- CFE_UtAssert_SUCCESS
- CFE_UtAssert_NOT_SUCCESS
- CFE_UtAssert_TEARDOWN
- CFE_UtAssert_RESOURCEID_EQ
- CFE_UtAssert_RESOURCEID_UNDEFINED
- CFE_UtAssert_MEMOFFSET_EQ
- CFE_UtAssert_MSGID_EQ
jphickey added a commit to jphickey/cFE that referenced this issue Aug 10, 2021
Change cFE_FTAssert macros defined in cfe_testcase to use the
macros now provided in cfe_assert.h instead.
jphickey added a commit to jphickey/cFE that referenced this issue Aug 11, 2021
Adds the following macros to CFE assert library in cfe_assert.h:

- CFE_UtAssert_SUCCESS
- CFE_UtAssert_NOT_SUCCESS
- CFE_UtAssert_RESOURCEID_EQ
- CFE_UtAssert_RESOURCEID_UNDEFINED
- CFE_UtAssert_MEMOFFSET_EQ
- CFE_UtAssert_MSGID_EQ
jphickey added a commit to jphickey/cFE that referenced this issue Aug 11, 2021
Change cFE_FTAssert macros defined in cfe_testcase to use the
macros now provided in cfe_assert.h instead.
jphickey added a commit to jphickey/cFE that referenced this issue Aug 11, 2021
Adds the following macros to CFE assert library in cfe_assert.h:

- CFE_UtAssert_STATUS_OK
- CFE_UtAssert_STATUS_ERROR
- CFE_UtAssert_RESOURCEID_EQ
- CFE_UtAssert_RESOURCEID_UNDEFINED
- CFE_UtAssert_MEMOFFSET_EQ
- CFE_UtAssert_MSGID_EQ
jphickey added a commit to jphickey/cFE that referenced this issue Aug 11, 2021
Change cFE_FTAssert macros defined in cfe_testcase to use the
macros now provided in cfe_assert.h instead.
jphickey added a commit to jphickey/cFE that referenced this issue Aug 11, 2021
Adds the following macros to CFE assert library in cfe_assert.h:

- CFE_UtAssert_STATUS_OK
- CFE_UtAssert_STATUS_ERROR
- CFE_UtAssert_RESOURCEID_EQ
- CFE_UtAssert_RESOURCEID_UNDEFINED
- CFE_UtAssert_MEMOFFSET_EQ
- CFE_UtAssert_MSGID_EQ
jphickey added a commit to jphickey/cFE that referenced this issue Aug 11, 2021
Change cFE_FTAssert macros defined in cfe_testcase to use the
macros now provided in cfe_assert.h instead.
jphickey added a commit to jphickey/cFE that referenced this issue Aug 11, 2021
Adds the following macros to CFE assert library in cfe_assert.h:

- CFE_UtAssert_STATUS_OK
- CFE_UtAssert_STATUS_ERROR
- CFE_UtAssert_RESOURCEID_EQ
- CFE_UtAssert_RESOURCEID_UNDEFINED
- CFE_UtAssert_MEMOFFSET_EQ
- CFE_UtAssert_MSGID_EQ
jphickey added a commit to jphickey/cFE that referenced this issue Aug 11, 2021
Change cFE_FTAssert macros defined in cfe_testcase to use the
macros now provided in cfe_assert.h instead.
astrogeco added a commit that referenced this issue Aug 12, 2021
Fix #1784, add CFE assert macros to functional test
@skliper skliper added this to the 7.0.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants