Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a148b97

Browse files
authoredAug 19, 2020
Merge pull request nasa#816 from nasa/integration-candidate
Integration Candidate 2020-08-12
2 parents 5ac3f0a + fc8a020 commit a148b97

25 files changed

+708
-312
lines changed
 

‎README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ The detailed cFE user's guide can be viewed at <https://github.com/nasa/cFS/blob
1010

1111
## Version History
1212

13+
### Development Build: 6.8.0-rc1+dev13
14+
15+
- Deprecates `CFE_SB_GetLastSenderId()` API by introducing new `CFE_OMIT_DEPRECATED_6_8` tag
16+
- Documentation update remove deleted requiremements
17+
- 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.
18+
- See <https://github.com/nasa/cFE/pull/816>
19+
1320
### Development Build: 6.7.0+dev292
1421

1522
- Add missing include path to the target/h and wrn/coreip directory.
@@ -27,7 +34,7 @@ Remove unrelated comment about CEXP (remnant from RTEMS). No more errors about m
2734
- All parameters to the stub function are registered in the context object, so the values will be available to hook functions.
2835
- The names of all parameters match the prototype/documentation, so hook functions that use name-based argument value retrieval will work.
2936
- Adds to table search path in `arch_build.cmake`
30-
- Calls to OS_open() now use the OSAL-defined symbol, not the POSIX symbol.
37+
- Calls to OS_open() now use the OSAL-defined symbol, not the POSIX symbol.
3138
- 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.
3239
- 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).
3340
- `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.
@@ -39,7 +46,7 @@ Remove unrelated comment about CEXP (remnant from RTEMS). No more errors about m
3946
- Added cFE User's Guide Reference to README.md
4047
- Removes old license
4148
- See <https://github.com/nasa/cFE/pull/743>
42-
49+
4350
### Development Build: 6.7.20
4451

4552
- SB Unit use of the UT assert framework is closer to original design intent

‎cmake/mission_defaults.cmake

+7
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,10 @@ set(MISSION_MODULE_SEARCH_PATH
4545
set(cfe-core_SEARCH_PATH "cfe/fsw")
4646
set(osal_SEARCH_PATH ".")
4747
set(psp_SEARCH_PATH ".")
48+
49+
# If ENABLE_UNIT_TEST is enabled, then include the cfe_assert library in
50+
# all targets. This can still be overridden in targets.cmake.
51+
if (ENABLE_UNIT_TESTS)
52+
list(APPEND MISSION_GLOBAL_APPLIST cfe_assert cfe_testrunner cfe_testcase)
53+
endif (ENABLE_UNIT_TESTS)
54+

‎cmake/sample_defs/global_build_options.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
set(OMIT_DEPRECATED $ENV{OMIT_DEPRECATED} CACHE STRING "Omit deprecated elements")
2020
if (OMIT_DEPRECATED)
2121
message (STATUS "OMIT_DEPRECATED=true: Not including deprecated elements in build")
22-
add_definitions(-DCFE_OMIT_DEPRECATED_6_7 -DCFE_OMIT_DEPRECATED_6_6 -DOSAL_OMIT_DEPRECATED)
22+
add_definitions(-DCFE_OMIT_DEPRECATED_6_8 -DCFE_OMIT_DEPRECATED_6_7 -DCFE_OMIT_DEPRECATED_6_6 -DOSAL_OMIT_DEPRECATED)
2323
else()
2424
message (STATUS "OMIT_DEPRECATED=false: Deprecated elements included in build")
2525
endif (OMIT_DEPRECATED)

‎docs/README_functionaltest.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Mini-HOWTO guide for running CFE functional tests
2+
3+
This version of CFE includes additional modular libraries and an application
4+
to execute functional tests within an unmodified CFE environment. These are
5+
distinct from the unit tests, which are executed separately from CFE in a
6+
confined (non-CFE, test-specific) environment.
7+
8+
## Building the modules
9+
10+
These modules are built automatically when `ENABLE_UNIT_TESTS` is enabled
11+
in the build. However, they can be added to any CFE build by adding the
12+
following to the `APPLIST` of any target in `targets.cmake`:
13+
14+
- `cfe_assert`: a CFE-compatible library wrapping the basic UT assert library. This
15+
is the same library that all other unit tests use, but configured to be
16+
dynamically loaded into the CFE environment, and using CFE syslog for its output.
17+
This must be the first library loaded for any functional test.
18+
19+
- `cfe_testcase`: a CFE-compatible library implementing test cases for CFE core apps.
20+
This must be loaded after `cfe_assert`.
21+
22+
- `cfe_testrunner`: a CFE application that actually executes the tests. This is a very
23+
simple app that waits for CFE startup to complete, then executes all registered test
24+
cases. It also must be loaded after `cfe_assert`.
25+
26+
27+
## Example startup script entries
28+
29+
To execute tests at startup, the following lines can be added to `cfe_es_startup.scr` on the
30+
designated test target:
31+
32+
CFE_LIB, /cf/cfe_assert.so, CFE_Assert_LibInit, ASSERT_LIB, 0, 0, 0x0, 0;
33+
CFE_APP, /cf/cfe_testrunner.so, CFE_TestRunner_AppMain, TESTRUN_APP, 100, 16384, 0x0, 0;
34+
CFE_LIB, /cf/cfe_testcase.so, CFE_Test_Init, CFETEST_LIB, 0, 0, 0x0, 0;
35+
CFE_LIB, /cf/psp_test.so, PSP_Test_Init, PSPTEST_LIB, 0, 0, 0x0, 0;
36+
37+
It is important that `cfe_assert` is loaded first, as all other test libraries depend on
38+
symbols provided in this library. The order of loading other test cases should not
39+
matter with respect to symbol resolution, but note that test cases will be executed in
40+
the same order that they are registered.

‎docs/cFE Application Developers Guide.md

-10
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,6 @@ for extracting that field from the header:
17691769
| Total Message Length | CFE_SB_GetTotalMsgLength | Command & Telemetry |
17701770
| User Data Message Length | CFE_SB_GetUserDataLength | Command & Telemetry |
17711771
| Command Code | CFE_SB_GetCmdCode | Command Only |
1772-
| Sender ID | CFE_SB_GetLastSenderId | Command & Telemetry |
17731772
| Checksum | CFE_SB_GetChecksum | Command Only |
17741773

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

1781-
It should be noted that the function, CFE_SB_GetLastSendId, is ideal
1782-
for verifying that critical commands are arriving from a legitimate
1783-
source. This function allows the Developer(s) to define a strict ICD
1784-
between two or more Applications to ensure that an erroneous Application
1785-
does not accidentally issue a critical command. However, its use for
1786-
routine command verification is discouraged since it would increase the
1787-
cross-coupling between Applications and require multiple Applications to
1788-
be modified if a command's source changes.
1789-
17901780
If the Application's data structure definitions don't include the header
17911781
information, then the CFE_SB_GetUserData API could be used to obtain
17921782
the start address of the SB Message data.

0 commit comments

Comments
 (0)
Please sign in to comment.