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

Use alternate setup function for Tests #325

Merged
merged 1 commit into from
Jan 8, 2020

Conversation

jphickey
Copy link
Contributor

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 provides OS_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 existing UtTest_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:

  • Ubuntu 18.04 LTS 64-bit (via SIMULATION=native)

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

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 skliper added this to the 5.1.0 milestone Dec 30, 2019
@skliper
Copy link
Contributor

skliper commented Jan 8, 2020

CCB 20190108 - Reviewed and approved for integration candidate

@skliper skliper added the CCB:Approved Indicates code review and approval by community CCB label Jan 8, 2020
@skliper skliper changed the base branch from master to merge-20190108 January 8, 2020 20:46
skliper added a commit that referenced this pull request Jan 8, 2020
Fix #294 #335
Reviewd and approved at 2020-01-08 CCB
@skliper skliper closed this Jan 8, 2020
@skliper skliper reopened this Jan 8, 2020
@skliper skliper merged commit 971e90b into nasa:merge-20190108 Jan 8, 2020
skliper added a commit that referenced this pull request Jan 14, 2020
Fix #294: Use alternate setup function for Tests
@jphickey jphickey deleted the fix-294-ut-entry-point branch February 13, 2020 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants