Use alternate setup function for Tests#325
Merged
skliper merged 1 commit intonasa:merge-20190108from Jan 8, 2020
Merged
Conversation
Implements a more layered architecture for test code. Rather than having each test provide OS_Application_Startup() directly, now the UT assert library provides OS_Application_Startup() in common code. This also introduces a new function OS_Application_Run() to implement the test routine. This replaces UtTest_Run. The actual test setup is now done by a function called UtTest_Setup(). 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.
skliper
approved these changes
Jan 6, 2020
Contributor
|
CCB 20190108 - Reviewed and approved for integration candidate |
skliper
pushed a commit
that referenced
this pull request
Jan 8, 2020
skliper
pushed a commit
that referenced
this pull request
Jan 14, 2020
Fix #294: Use alternate setup function for Tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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