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

Build system needs to better separate the UT stub function from the UT test cases #415

Closed
jphickey opened this issue Nov 20, 2019 · 0 comments · Fixed by #448
Closed

Build system needs to better separate the UT stub function from the UT test cases #415

jphickey opened this issue Nov 20, 2019 · 0 comments · Fixed by #448
Assignees
Milestone

Comments

@jphickey
Copy link
Contributor

Describe the bug
Currently the "unit-test" subdirectory generates libraries that provide stubs for all public API calls defined in the CFE core apps, as well as test cases and executables for unit testing the CFE itself.

Having these combined like this causes a few problems:

  • the two products have different scopes. The UT stubs apply globally across the entire mission and can/should be used for all UT (platform-independent), but the test cases do need to be tuned to the platform, so a separate set of test cases needs to be built per-platform.
  • As a result, the UT stubs themselves are also built per-platform. This is wasteful but more importantly this makes linking to the CFE stubs from application UT code difficult.
  • It is also undesirable just from a general code organization standpoint. The directory structure would be cleaner if these were in separate subdirectories.

To Reproduce
Build code with ENABLE_UNIT_TESTS=TRUE and observe that the CFE "stub" library is named "libut_cfe_core_default_cpu1_stubs.a" (i.e. build specifically for the default/cpu1 platform config) and it resides in the same directory as the UT executables/test cases.

Expected behavior
The stub library should be named only "libut_cfe_core_stubs.a" and it should be in a separate subdirectory from the unit test cases themselves.

System observed on:
Ubuntu 18.04 LTS 64 bit

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Nov 20, 2019
@skliper skliper added this to the 6.8.0 milestone Dec 2, 2019
skliper added a commit that referenced this issue Dec 30, 2019
Fix #415, #429
Reviewed and approved at 2019-12-18 CCB
@skliper skliper closed this as completed in de7c761 Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants