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

Separate the CFE stubs from UT test cases #417

Merged
merged 1 commit into from
Dec 31, 2019

Conversation

jphickey
Copy link
Contributor

Describe the contribution
Fix issue #415

Build the CFE UT stub library separately from the test cases.
This moves the stub files into a separate ut-stubs directory,
and the library is now called "ut_cfe_core_stubs"

Note: Minor cleanup also done as part of moving. Two stub
files were in the source tree but not being built or used
by any framework test config. These were:
ut_arinc653_stubs.c
ut_configdata_stubs.c

These are now removed. Also cleaned up some old macros/ifdefs
that were never enabled or used in the current tests.

Testing performed
Build CFE using default configuration with ENABLE_UNIT_TEST=TRUE. Confirm CFE core executes normally. Confirm all CFE unit tests build and run as normal.

Expected behavior changes
No impact to behavior. CFE FSW code is unchanged, this only affects UT build/link procedure.

System(s) tested on:
Ubuntu 18.04 LTS 64-bit

Contributor Info
Joseph Hickey, Vantage Systems, Inc.

Community contributors
You must attach a signed CLA (required for acceptance) or reference one already submitted

Build the CFE UT stub library separately from the test cases.
This moves the stub files into a separate ut-stubs directory,
and the library is now called "ut_cfe_core_stubs"

Note: Minor cleanup also done as part of moving.  Two stub
files were in the source tree but not being built or used
by any framework test config.  These were:
  ut_arinc653_stubs.c
  ut_configdata_stubs.c

These are now removed.  Also cleaned up some old macros/ifdefs
that were never enabled or used in the current tests.
@jphickey
Copy link
Contributor Author

Also note: I noticed that the stub for the CFE_TBL_GetInfo function was missing, so this also adds it.

@skliper
Copy link
Contributor

skliper commented Nov 21, 2019

fsw to me means "flight software". Could the stubs and unit tests be moved out of the flight software directory as part of this change? I'd expect the fsw directory to only contain flight code.

@jphickey
Copy link
Contributor Author

fsw to me means "flight software". Could the stubs and unit tests be moved out of the flight software directory as part of this change? I'd expect the fsw directory to only contain flight code.

Yes, I concur that it doesn't make sense for this to be under "fsw".

But the difficulty for CFE stuff is that the "cfe-core" dir is considered the top level for all source code (i.e. this is where ${cfe-core_MISSION_DIR} points to) which is unfortunately a subdir of "fsw".

Perhaps the easiest solution would be swapping the "fsw" and "cfe-core" subdirs, so the path to the FSW would become:
cfe-core/fsw/src/<module>
rather than:
fsw/cfe-core/src/<module
as it is today. That way the unit test stubs can reside at:
cfe-core/ut-stubs

Such a directory change seems like it should be a separate ticket/pull request though.

@skliper
Copy link
Contributor

skliper commented Nov 24, 2019

Such a directory change seems like it should be a separate ticket/pull request though.

I concur, a bigger change as suggested is worth a separate ticket.

@skliper skliper added this to the 6.8.0 milestone Dec 17, 2019
@skliper skliper added enhancement CCB:Approved Indicates code review and approval by community CCB labels Dec 17, 2019
@skliper
Copy link
Contributor

skliper commented Dec 18, 2019

CCB 20191218 - Reviewed and approved for IC

skliper added a commit that referenced this pull request Dec 30, 2019
Removed conflicting files, not needed after #417 changes.
skliper added a commit that referenced this pull request Dec 30, 2019
Fix #415, #429
Reviewed and approved at 2019-12-18 CCB
@skliper skliper changed the base branch from master to merge-20191230 December 31, 2019 15:54
@skliper skliper merged commit de7c761 into nasa:merge-20191230 Dec 31, 2019
@jphickey jphickey deleted the fix-415-separate-ut-stubs branch February 13, 2020 15:59
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 enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants