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
Is your feature request related to a problem? Please describe.
Currently, OSAL only provides the stub library (ut_osapi_stubs) when ENABLE_UNIT_TESTS is set.
However, the ENABLE_UNIT_TESTS switch is supposed to cover the testing of OSAL itself, but the stubs are mostly relevant for testing other components.
In a modular deployment, OSAL may be treated as an external/independent component. As such, it may be built separately from the application, with headers and binary libraries installed in a system location e.g. /usr/local or similar. To keep the installation footprint smaller and cleaner, generally build intended for system install like this would be done without unit tests.
However, the lack of ut_osapi_stubs when compiled in this mode means that other components in the system based on OSAL cannot be unit tested either.
Describe the solution you'd like
Always provide ut_osapi_stubs, independently of the ENABLE_UNIT_TESTS switch. This will enable dependent applications to be unit tested, even if OSAL itself is not being tested.
Additional context
Note that UT assert is always provided this way for similar reasons - it is still useful for external "black box" testing (which is done using binaries that are built and linked normally, not stubbed out binaries), and furthermore other applications can be tested even if OSAL itself is not being tested.
In a CFS build, this disconnect was not apparent because the entire system gets the same ENABLE_UNIT_TESTS setting, but in a decoupled/standalone build this is not the case.
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, OSAL only provides the stub library (
ut_osapi_stubs
) whenENABLE_UNIT_TESTS
is set.However, the
ENABLE_UNIT_TESTS
switch is supposed to cover the testing of OSAL itself, but the stubs are mostly relevant for testing other components.In a modular deployment, OSAL may be treated as an external/independent component. As such, it may be built separately from the application, with headers and binary libraries installed in a system location e.g.
/usr/local
or similar. To keep the installation footprint smaller and cleaner, generally build intended for system install like this would be done without unit tests.However, the lack of
ut_osapi_stubs
when compiled in this mode means that other components in the system based on OSAL cannot be unit tested either.Describe the solution you'd like
Always provide
ut_osapi_stubs
, independently of theENABLE_UNIT_TESTS
switch. This will enable dependent applications to be unit tested, even if OSAL itself is not being tested.Additional context
Note that UT assert is always provided this way for similar reasons - it is still useful for external "black box" testing (which is done using binaries that are built and linked normally, not stubbed out binaries), and furthermore other applications can be tested even if OSAL itself is not being tested.
In a CFS build, this disconnect was not apparent because the entire system gets the same
ENABLE_UNIT_TESTS
setting, but in a decoupled/standalone build this is not the case.Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: