Skip to content

Commit

Permalink
Merge pull request #2091 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
cFE Integration Candidate: Caelum-rc4+dev8
  • Loading branch information
astrogeco authored Apr 19, 2022
2 parents a6c6b65 + 8be2d24 commit 5e99081
Show file tree
Hide file tree
Showing 12 changed files with 93 additions and 148 deletions.
12 changes: 6 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
**Checklist (Please check before submitting)**

* [ ] I reviewed the [Contributing Guide](https://github.com/nasa/cFE/blob/main/CONTRIBUTING.md).
* [ ] I signed and emailed the appropriate [Contributor License Agreement](https://github.com/nasa/cFS/blob/main/CONTRIBUTING.md#contributor-license-agreement-cla) to GSFC-SoftwareRelease@mail.nasa.gov and copied cfs-program@lists.nasa.gov.

**Describe the contribution**
A clear and concise description of what the contribution is.
- Include explicitly what issue it addresses [e.g. Fixes #X]
Expand Down Expand Up @@ -26,9 +31,4 @@ If included, identify any third party code and provide text file of license

**Contributor Info - All information REQUIRED for consideration of pull request**
Full name and company/organization/center of all contributors ("Personal" if individual work)
- If NASA Civil Servant Employee or GSFC Contractor on SES II
- Address/email/phone and contract/task information (if applicable) must be on file
- Else if Company
- **HAND SIGNED** Company CLA must be on file (once per release): [Company CLA](../docs/GSC_18128_Corp_CLA_form_1219.pdf)
- Else if Individual
- **HAND SIGNED** Individual CLA must be on file (once per release): [Individual CLA](../docs/GSC_18128_Ind_CLA_form_1219.pdf)
- Note CLAs apply to only software contributions.
155 changes: 38 additions & 117 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: "Build cFE Documentation"
name: cFS Documentation and Guides

on:
push:
pull_request:

env:
SIMULATION: native
BUILDTYPE: debug

jobs:

#Check for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action.
check-for-duplicates:
# Checks for duplicate actions. Skips push actions if there is a matching or
# duplicate pull-request action.
checks-for-duplicates:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
Expand All @@ -22,82 +18,15 @@ jobs:
with:
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'

build-docs:
#Continue if check-for-duplicates found no duplicates. Always runs for pull-requests.
needs: check-for-duplicates
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
runs-on: ubuntu-18.04
timeout-minutes: 15

steps:
- name: Install Dependencies
run: sudo apt-get install doxygen graphviz -y

# Check out the cfs bundle
- name: Checkout bundle
uses: actions/checkout@v2
with:
repository: nasa/cFS
submodules: true

- name: Checkout submodule
uses: actions/checkout@v2
with:
path: cfe

- name: Check versions
run: git submodule

# Setup the build system
- name: Set up for build
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
make prep
- name: Build Docs
run: |
make doc > make_doc_stdout.txt 2> make_doc_stderr.txt
mv build/docs/detaildesign-warnings.log detaildesign-warnings.log
# Upload documentation logs as artifacts
- name: Archive Documentation Build Logs
uses: actions/upload-artifact@v2
with:
name: cFS Docs Artifacts
path: |
make_doc_stdout.txt
make_doc_stderr.txt
detaildesign-warnings.log
- name: Error Check
run: |
if [[ -s make_doc_stderr.txt ]]; then
cat make_doc_stderr.txt
exit -1
fi
- name: Warning Check
run: |
if [[ -s detaildesign-warnings.log ]]; then
cat detaildesign-warnings.log
exit -1
fi
do_not_skip: '["push", "workflow_dispatch", "schedule"]'

build-usersguide:
#Continue if check-for-duplicates found no duplicates. Always runs for pull-requests.
needs: check-for-duplicates
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
runs-on: ubuntu-18.04
timeout-minutes: 15
checkout-and-cache:
name: Custom checkout and cache for cFS documents
needs: checks-for-duplicates
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest

steps:
- name: Install Dependencies
run: sudo apt-get install doxygen graphviz -y

# Check out the cfs bundle
- name: Checkout bundle
uses: actions/checkout@v2
with:
Expand All @@ -109,40 +38,32 @@ jobs:
with:
path: cfe

- name: Check versions
run: git submodule

# Setup the build system
- name: Set up for build
run: |
cp ./cfe/cmake/Makefile.sample Makefile
cp -r ./cfe/cmake/sample_defs sample_defs
make prep
- name: Build Usersguide
run: |
make usersguide > make_usersguide_stdout.txt 2> make_usersguide_stderr.txt
mv build/docs/users_guide/cfe-usersguide-warnings.log cfe-usersguide-warnings.log
- name: Archive Users Guide Build Logs
uses: actions/upload-artifact@v2
- name: Cache Source and Build
id: cache-src-bld
uses: actions/cache@v2
with:
name: Users Guide Artifacts
path: |
make_usersguide_stdout.txt
make_usersguide_stderr.txt
cfe-usersguide-warnings.log
- name: Error Check
run: |
if [[ -s make_usersguide_stderr.txt ]]; then
cat make_usersguide_stderr.txt
exit -1
fi
- name: Warning Check
run: |
if [[ -s cfe-usersguide-warnings.log ]]; then
cat cfe-usersguide-warnings.log
exit -1
fi
path: /home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/*
key: cfs-doc-${{ github.run_number }}

build-cfe-usersguide:
needs: checkout-and-cache
name: Build and deploy cFS documents
uses: nasa/cFS/.github/workflows/build-deploy-doc.yml@main
with:
target: "[\"cfe-usersguide\"]"
cache-key: cfs-doc-${{ github.run_number }}
checkout: false
buildpdf: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
deploy: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}

build-mission-doc:
needs: checkout-and-cache
name: Build and deploy cFS documents
#uses: nasa/cFS/.github/workflows/build-deploy-doc.yml
uses: skliper/cFS/.github/workflows/build-deploy-doc.yml@fix447-deploy_mission_doc
with:
target: "[\"mission-doc\"]"
cache-key: cfs-doc-${{ github.run_number }}
checkout: false
deploy: false
buildpdf: false # No need for mission pdf within cFE, done at bundle level
6 changes: 4 additions & 2 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
# Build the code
- name: Build
run: |
make -C build/native/default_cpu1/config
make -C build/native/default_cpu1/core_api
make -C build/native/default_cpu1/core_private
make -C build/native/default_cpu1/es
Expand All @@ -78,6 +79,7 @@ jobs:
- name: Test
run: |
lcov --capture --initial --directory build --output-file coverage_base.info
make -C build/native/default_cpu1/config test
make -C build/native/default_cpu1/core_api test
make -C build/native/default_cpu1/core_private test
make -C build/native/default_cpu1/es test
Expand All @@ -98,8 +100,8 @@ jobs:
- name: Confirm Minimum Coverage
run: |
missed_branches=76
missed_lines=33
missed_branches=52
missed_lines=18
branch_nums=$(grep -A 3 "Overall coverage rate" lcov_out.txt | grep branches | grep -oP "[0-9]+[0-9]*")
line_nums=$(grep -A 3 "Overall coverage rate" lcov_out.txt | grep lines | grep -oP "[0-9]+[0-9]*")
Expand Down
4 changes: 1 addition & 3 deletions cmake/Makefile.sample
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,12 @@ lcov:

doc:
$(MAKE) --no-print-directory -C "$(O)" mission-doc
@/bin/echo -e "\n\nDetail Design: \nfile://$(CURDIR)/$(O)/docs/detaildesign/html/index.html\n"

usersguide:
$(MAKE) --no-print-directory -C "$(O)" cfe-usersguide
@/bin/echo -e "\n\ncFE Users Guide: \nfile://$(CURDIR)/$(O)/docs/users_guide/html/index.html\n"

osalguide:
$(MAKE) --no-print-directory -C "$(O)" osalguide
$(MAKE) --no-print-directory -C "$(O)" osal-apiguide

# Make all the commands that use the build tree depend on a flag file
# that is used to indicate the prep step has been done. This way
Expand Down
4 changes: 2 additions & 2 deletions cmake/cfe-usersguide.doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

# Document specific settings
PROJECT_NAME = "Core Flight Executive Users Guide"
OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/docs/users_guide
WARN_LOGFILE = @CMAKE_BINARY_DIR@/docs/users_guide/cfe-usersguide-warnings.log
OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/docs/cfe-usersguide
WARN_LOGFILE = cfe-usersguide-warnings.log

# For purposes of the user guide, reference the "stock" mission configuration
# Although missions may override these files, for the users guide we are mainly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
# Common configuration and default settings
@INCLUDE = @MISSION_BINARY_DIR@/docs/cfe-common.doxyfile

# Example detailed design setup
# Example mission doc design setup
PROJECT_NAME = "@MISSION_NAME@"
PROJECT_BRIEF = "Core Flight System project built using \"@MISSIONCONFIG@\" configuration"
OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/docs/detaildesign
WARN_LOGFILE = @CMAKE_BINARY_DIR@/docs/detaildesign-warnings.log
OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/docs/mission-doc
WARN_LOGFILE = mission-doc-warnings.log

# Include mission defs directory
INPUT += @MISSION_DEFS@
Expand Down
22 changes: 10 additions & 12 deletions cmake/mission_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -305,30 +305,28 @@ function(prepare)
"${CMAKE_BINARY_DIR}/docs/cfe-common.doxyfile"
@ONLY)

file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/docs/detaildesign")
configure_file("${CFE_SOURCE_DIR}/cmake/mission-detaildesign.doxyfile.in"
"${CMAKE_BINARY_DIR}/docs/detaildesign/Doxyfile"
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/docs/mission-doc")
configure_file("${CFE_SOURCE_DIR}/cmake/mission-doc.doxyfile.in"
"${CMAKE_BINARY_DIR}/docs/mission-doc/Doxyfile"
@ONLY)
add_custom_target(mission-doc doxygen
COMMAND echo "Detail Design: file://${CMAKE_BINARY_DIR}/docs/detaildesign/html/index.html"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/docs/detaildesign")
COMMAND echo "Detail Design: file://${CMAKE_BINARY_DIR}/docs/mission-doc/html/index.html"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/docs/mission-doc")

file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/docs/users_guide")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/docs/cfe-usersguide")
configure_file("${CFE_SOURCE_DIR}/cmake/cfe-usersguide.doxyfile.in"
"${CMAKE_BINARY_DIR}/docs/users_guide/Doxyfile"
"${CMAKE_BINARY_DIR}/docs/cfe-usersguide/Doxyfile"
@ONLY)
add_custom_target(cfe-usersguide doxygen
COMMAND echo "Users Guide: file://${CMAKE_BINARY_DIR}/docs/users_guide/html/index.html"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/docs/users_guide")
COMMAND echo "Users Guide: file://${CMAKE_BINARY_DIR}/docs/cfe-usersguide/html/index.html"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/docs/cfe-usersguide")

# OSAL API GUIDE include PUBLIC API
set(OSAL_API_INCLUDE_DIRECTORIES
"${osal_MISSION_DIR}/src/os/inc"
"${CMAKE_BINARY_DIR}/docs"
)
add_subdirectory(${osal_MISSION_DIR}/docs/src ${CMAKE_BINARY_DIR}/docs/osalguide)
add_custom_target(osalguide)
add_dependencies(osalguide osal-apiguide)
add_subdirectory(${osal_MISSION_DIR}/docs/src ${CMAKE_BINARY_DIR}/docs/osal-apiguide)

# Pull in any application-specific mission-scope configuration
# This may include user configuration files such as cfe_mission_cfg.h,
Expand Down
Binary file removed docs/GSC_18128_Corp_CLA_form_1219.pdf
Binary file not shown.
Binary file removed docs/GSC_18128_Ind_CLA_form_1219.pdf
Binary file not shown.
15 changes: 14 additions & 1 deletion modules/es/ut-coverage/es_UT.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
*/
#include "es_UT.h"
#include "target_config.h"
#include "cfe_config.h"

#define ES_UT_CDS_BLOCK_SIZE 16

Expand Down Expand Up @@ -1123,6 +1124,14 @@ static void ES_UT_ForEachObjectFail(void *UserObj, UT_EntryKey_t FuncKey, const
(*callback_ptr)(id, callback_arg);
}

static void ES_UT_Config_IterateAll(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context)
{
CFE_Config_Callback_t Callback = UT_Hook_GetArgValueByName(Context, "Callback", CFE_Config_Callback_t);

(*Callback)(NULL, CFE_CONFIGID_UNDEFINED, "Test");
(*Callback)(NULL, CFE_CONFIGID_UNDEFINED, "MOD_SRCVER_test");
}

void TestApps(void)
{
int NumBytes;
Expand Down Expand Up @@ -3498,11 +3507,15 @@ void TestTask(void)
UT_CallTaskPipe(CFE_ES_TaskPipe, &CmdBuf.Msg, sizeof(CmdBuf.NoArgsCmd), UT_TPID_CFE_ES_CMD_NOOP_CC);
CFE_UtAssert_PRINTF("Error sending build info event");

/* Test CFE_ES_GenerateVersionEvents error when sending mission event */
/*
* Test CFE_ES_GenerateVersionEvents error when sending mission event and add hook
* to cover CFE_ES_ModSrcVerCallback
*/
ES_ResetUnitTest();
ES_UT_SetupSingleAppId(CFE_ES_AppType_CORE, CFE_ES_AppState_RUNNING, NULL, NULL, NULL);
CFE_ES_Global.ResetDataPtr->ResetVars.ResetType = 1;
UT_SetDeferredRetcode(UT_KEY(CFE_EVS_SendEvent), 3, CFE_EVS_INVALID_PARAMETER);
UT_SetHandlerFunction(UT_KEY(CFE_Config_IterateAll), ES_UT_Config_IterateAll, NULL);
UtAssert_VOIDCALL(CFE_ES_TaskInit());
CFE_UtAssert_PRINTF("Error sending mission version event");

Expand Down
4 changes: 2 additions & 2 deletions modules/sb/fsw/src/cfe_sb_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1988,8 +1988,8 @@ CFE_Status_t CFE_SB_ReceiveBuffer(CFE_SB_Buffer_t **BufPtr, CFE_SB_PipeId_t Pipe
CFE_SB_DecrBufUseCnt(BufDscPtr);
}

/* Before unlocking, check the PendingEventID and increment relevant error counter */
if (Status != CFE_SUCCESS)
/* Before unlocking, increment relevant error counter if needed */
if (Status != CFE_SUCCESS && Status != CFE_SB_NO_MESSAGE && Status != CFE_SB_TIME_OUT)
{
if (PendingEventID == CFE_SB_RCV_BAD_ARG_EID || PendingEventID == CFE_SB_BAD_PIPEID_EID)
{
Expand Down
Loading

0 comments on commit 5e99081

Please sign in to comment.