You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ut_assert now has UtTest_AddStartup and UtTest_AddTeardown to support setup and teardown. Action to close this issue is to scrub unit tests to confirm cleaning up.
One potential issue here is that we don't have the equivalent teardown function for e.g. OS_API_Init(). Once we set up OSAL it is expected to remain set up until a reboot. While all user-created objects in OSAL can be deleted, the OSAL itself and its internal objects cannot be cleaned up via the current API.
If the intent is to allow multiple tests to be run on system like VxWorks, without a reboot in between, then we'll likely need to implement #871 to allow this to happen.
Otherwise all user objects can be easily cleaned up by making sure every test program has a Teardown function that invokes OS_DeleteAllObjects() (this shouldn't be a big deal to implement).
Unit tests should utilize a SetUp and TearDown approach to ensure each test runs in an expected and known configuration.
The TearDown function needs to ensure that all test objects and resources have been deallocated and cleanup.
The text was updated successfully, but these errors were encountered: