Skip to content

Alternative entry point for UT-Assert based test applications #294

@jphickey

Description

@jphickey

Describe the bug
Applications which utilize the UT Assert library to do testing (either functional or coverage) share the same entry point with "normal" OSAL applications, specifically the OS_Application_Startup function.

For testing, this is not ideal as there is some extra setup/teardown when using UT Assert. This prevents using the OSAL-provided BSP directly and necessitates an alternative BSP that includes the extra setup/teardown.

If the UT Assert based applications used a differently-named entry point, this could be properly layered and some duplicate logic in the OSAL BSPs can then be removed.

To Reproduce
Build with ENABLE_UNIT_TESTS=TRUE, and observe that the system builds a ut-bsp in addition to the normal OSAL BSP. On pc-linux for instance, both of this libraries include a main() function. The difference is that the ut-bsp includes extra UT Assert setup/teardown logic before and after the call to OS_Application_Startup(). It also duplicates the OS_VolumeTable object.

Expected behavior
The main() routine and OS_VolumeTable should not be duplicated. Rather, the UT Assert setup/teardown should be an extension layer to the normal BSP.

System observed on:
Ubuntu 18.04 LTS, 64 Bit

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions