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 #197, test teardown cleanup #949

Closed
wants to merge 2 commits into from

Conversation

jphickey
Copy link
Contributor

@jphickey jphickey commented Apr 7, 2021

Describe the contribution
Invokes OS_API_Teardown as a test teardown function for all unit tests. This returns the global state objects to their initial state and therefore allows the test to be re-run/repeated without rebooting. It also ensures that any resources allocated by the test are removed before the test finishes.

Testing performed
Build and run all unit tests, confirm passing

Expected behavior changes
Test resources are cleaned up to the extent possible, and set back to initial state. Tests can be repeated if desired.

System(s) tested on
Ubuntu 20.04
MCP750 Vxworks 6.9

Additional context
Depends on #948

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

This cleans up all OSAL resources as best as possible, ideally leaving
the system in a state where OS_API_Init() may be invoked again.
Invoke OS_API_Teardown to reset state for next test
@jphickey
Copy link
Contributor Author

jphickey commented Apr 7, 2021

Pushed initially as draft since this depends on #948.

@jphickey jphickey closed this Apr 7, 2021
@jphickey jphickey deleted the fix-197-teardown-cleanup branch April 7, 2021 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants