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

Integration Candidate 2020-08-12 #816

Merged
merged 13 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ The detailed cFE user's guide can be viewed at <https://github.com/nasa/cFS/blob

## Version History

### Development Build: 6.8.0-rc1+dev13

- Deprecates `CFE_SB_GetLastSenderId()` API by introducing new `CFE_OMIT_DEPRECATED_6_8` tag
- Documentation update remove deleted requiremements
- Add a new *cfe_assert* module for functional testing by making it possible to load the UT assert object code as a CFE library. These are compiled as separate, independent modules and only loaded on demand. Also includes a draft example for cFE testing, which calls some basic ES AppId functions.
- See <https://github.com/nasa/cFE/pull/816>

### Development Build: 6.7.0+dev292

- Add missing include path to the target/h and wrn/coreip directory.
Expand All @@ -27,7 +34,7 @@ Remove unrelated comment about CEXP (remnant from RTEMS). No more errors about m
- All parameters to the stub function are registered in the context object, so the values will be available to hook functions.
- The names of all parameters match the prototype/documentation, so hook functions that use name-based argument value retrieval will work.
- Adds to table search path in `arch_build.cmake`
- Calls to OS_open() now use the OSAL-defined symbol, not the POSIX symbol.
- Calls to OS_open() now use the OSAL-defined symbol, not the POSIX symbol.
- Defines new macros to report the build number and build baseline and new strings containing the version number of cFE and a combined string with the version number for OSAL, PSP, and CFE.
- Allow explicitly setting of the processor ID in `targets.cmake`. The `TGTx_PROCESSOR_ID` setting will be passed to the final build/link of CFE core as the CPU ID. If unspecified, then the CMake index value is used instead (backward compatible).
- `cmake` now detects conditions where no files were present to fulfill an config include file requirement and reports an error during `make prep` lists the files it checked for rather than generating an empty file.
Expand All @@ -39,7 +46,7 @@ Remove unrelated comment about CEXP (remnant from RTEMS). No more errors about m
- Added cFE User's Guide Reference to README.md
- Removes old license
- See <https://github.com/nasa/cFE/pull/743>

### Development Build: 6.7.20

- SB Unit use of the UT assert framework is closer to original design intent
Expand Down
7 changes: 7 additions & 0 deletions cmake/mission_defaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,10 @@ set(MISSION_MODULE_SEARCH_PATH
set(cfe-core_SEARCH_PATH "cfe/fsw")
set(osal_SEARCH_PATH ".")
set(psp_SEARCH_PATH ".")

# If ENABLE_UNIT_TEST is enabled, then include the cfe_assert library in
# all targets. This can still be overridden in targets.cmake.
if (ENABLE_UNIT_TESTS)
list(APPEND MISSION_GLOBAL_APPLIST cfe_assert cfe_testrunner cfe_testcase)
endif (ENABLE_UNIT_TESTS)

2 changes: 1 addition & 1 deletion cmake/sample_defs/global_build_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
set(OMIT_DEPRECATED $ENV{OMIT_DEPRECATED} CACHE STRING "Omit deprecated elements")
if (OMIT_DEPRECATED)
message (STATUS "OMIT_DEPRECATED=true: Not including deprecated elements in build")
add_definitions(-DCFE_OMIT_DEPRECATED_6_7 -DCFE_OMIT_DEPRECATED_6_6 -DOSAL_OMIT_DEPRECATED)
add_definitions(-DCFE_OMIT_DEPRECATED_6_8 -DCFE_OMIT_DEPRECATED_6_7 -DCFE_OMIT_DEPRECATED_6_6 -DOSAL_OMIT_DEPRECATED)
else()
message (STATUS "OMIT_DEPRECATED=false: Deprecated elements included in build")
endif (OMIT_DEPRECATED)
40 changes: 40 additions & 0 deletions docs/README_functionaltest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Mini-HOWTO guide for running CFE functional tests

This version of CFE includes additional modular libraries and an application
to execute functional tests within an unmodified CFE environment. These are
distinct from the unit tests, which are executed separately from CFE in a
confined (non-CFE, test-specific) environment.

## Building the modules

These modules are built automatically when `ENABLE_UNIT_TESTS` is enabled
in the build. However, they can be added to any CFE build by adding the
following to the `APPLIST` of any target in `targets.cmake`:

- `cfe_assert`: a CFE-compatible library wrapping the basic UT assert library. This
is the same library that all other unit tests use, but configured to be
dynamically loaded into the CFE environment, and using CFE syslog for its output.
This must be the first library loaded for any functional test.

- `cfe_testcase`: a CFE-compatible library implementing test cases for CFE core apps.
This must be loaded after `cfe_assert`.

- `cfe_testrunner`: a CFE application that actually executes the tests. This is a very
simple app that waits for CFE startup to complete, then executes all registered test
cases. It also must be loaded after `cfe_assert`.


## Example startup script entries

To execute tests at startup, the following lines can be added to `cfe_es_startup.scr` on the
designated test target:

CFE_LIB, /cf/cfe_assert.so, CFE_Assert_LibInit, ASSERT_LIB, 0, 0, 0x0, 0;
CFE_APP, /cf/cfe_testrunner.so, CFE_TestRunner_AppMain, TESTRUN_APP, 100, 16384, 0x0, 0;
CFE_LIB, /cf/cfe_testcase.so, CFE_Test_Init, CFETEST_LIB, 0, 0, 0x0, 0;
CFE_LIB, /cf/psp_test.so, PSP_Test_Init, PSPTEST_LIB, 0, 0, 0x0, 0;

It is important that `cfe_assert` is loaded first, as all other test libraries depend on
symbols provided in this library. The order of loading other test cases should not
matter with respect to symbol resolution, but note that test cases will be executed in
the same order that they are registered.
10 changes: 0 additions & 10 deletions docs/cFE Application Developers Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,6 @@ for extracting that field from the header:
| Total Message Length | CFE_SB_GetTotalMsgLength | Command & Telemetry |
| User Data Message Length | CFE_SB_GetUserDataLength | Command & Telemetry |
| Command Code | CFE_SB_GetCmdCode | Command Only |
| Sender ID | CFE_SB_GetLastSenderId | Command & Telemetry |
| Checksum | CFE_SB_GetChecksum | Command Only |

In addition to the function for reading the checksum field, there is
Expand All @@ -1778,15 +1777,6 @@ and compares it to the checksum in the header. The API is called
CFE_SB_ValidateChecksum() and it simply returns a success or failure
indication.

It should be noted that the function, CFE_SB_GetLastSendId, is ideal
for verifying that critical commands are arriving from a legitimate
source. This function allows the Developer(s) to define a strict ICD
between two or more Applications to ensure that an erroneous Application
does not accidentally issue a critical command. However, its use for
routine command verification is discouraged since it would increase the
cross-coupling between Applications and require multiple Applications to
be modified if a command's source changes.

If the Application's data structure definitions don't include the header
information, then the CFE_SB_GetUserData API could be used to obtain
the start address of the SB Message data.
Expand Down
Loading