Use alternate setup function for Tests #325
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the contribution
Fix #294
Implements a more layered architecture for test code. Rather than having each test provide
OS_Application_Startup()
directly, now the UT assert library providesOS_Application_Startup()
in common code.The actual test setup is now done by a function called UtTest_Setup().
This also introduces a new function
OS_Application_Run()
to implement the test routine. This replaces the existingUtTest_Run()
function.Note - by using a more generic name the
OS_Application_Run()
routine can apply to both normal applications and test applications. This is a prerequisite to a future removal of the separate UT BSP.This allows for better layering where UT-Assert provides the notion of an "OSAL application". This is a step toward simplifying the BSP architecture, eventually combining the normal application
and unit test BSP code into a single BSP.
Testing performed
Build with default config and ENABLE_UNIT_TESTS=TRUE for all three supported platforms (pc-linux, pc-rtems, and mcp750-vxworks).
Confirm normal operation of CFE core (no change) and all unit tests run normally.
Expected behavior changes
No changes to behavior.
System(s) tested on:
Additional context
Needs to be merged in coordination with issue in nasa/cFE#435
Contributor Info
Joseph Hickey, Vantage Systems, Inc.
Community contributors
You must attach a signed CLA (required for acceptance) or reference one already submitted