Skip to content
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
5 changes: 3 additions & 2 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ on:
jobs:
codeql:
name: Codeql
uses: nasa/cFS/.github/workflows/codeql-reusable.yml@main
uses: nasa/cFS/.github/workflows/codeql-reusable.yml@dev
with:
component-path: libs/sample_lib
component-path: apps/sample_lib
prep: 'make prep; make -C build/tools/elf2cfetbl'
make: 'make -C build/native/default_cpu1/apps/sample_lib'
7 changes: 6 additions & 1 deletion .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ name: Format Check

# Run on all push and pull requests
on:
push:
branches:
- dev
- main
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:

jobs:
format-check:
name: Run format check
uses: nasa/cFS/.github/workflows/format-check.yml@main
uses: nasa/cFS/.github/workflows/format-check.yml@dev
8 changes: 6 additions & 2 deletions fsw/src/sample_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ int32 SAMPLE_LIB_Init(void)
/* ensure termination */
SAMPLE_LIB_Buffer[sizeof(SAMPLE_LIB_Buffer) - 1] = 0;

CFE_Config_GetVersionString(VersionString, SAMPLE_LIB_CFG_MAX_VERSION_STR_LEN, "Sample Lib",
SAMPLE_LIB_VERSION, SAMPLE_LIB_BUILD_CODENAME, SAMPLE_LIB_LAST_OFFICIAL);
CFE_Config_GetVersionString(VersionString,
SAMPLE_LIB_CFG_MAX_VERSION_STR_LEN,
"Sample Lib",
SAMPLE_LIB_VERSION,
SAMPLE_LIB_BUILD_CODENAME,
SAMPLE_LIB_LAST_OFFICIAL);

OS_printf("SAMPLE Lib Initialized.%s\n", VersionString);

Expand Down
19 changes: 10 additions & 9 deletions fsw/src/sample_lib_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@

/* Development Build Macro Definitions */

#define SAMPLE_LIB_BUILD_NUMBER 0 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_LIB_BUILD_BASELINE "v7.0.0" /*!< Development Build: git tag that is the base for the current development */
#define SAMPLE_LIB_BUILD_DEV_CYCLE "v7.0.0" /**< @brief Development: Release name for current development cycle */
#define SAMPLE_LIB_BUILD_CODENAME "Draco" /**< @brief: Development: Code name for the current build */
#define SAMPLE_LIB_BUILD_NUMBER 0 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_LIB_BUILD_BASELINE \
"v7.0.0" /*!< Development Build: git tag that is the base for the current development */
#define SAMPLE_LIB_BUILD_DEV_CYCLE "v7.0.0" /**< @brief Development: Release name for current development cycle */
#define SAMPLE_LIB_BUILD_CODENAME "Draco" /**< @brief: Development: Code name for the current build */

/*
* Version Macros, see \ref cfsversions for definitions.
*/
#define SAMPLE_LIB_MAJOR_VERSION 7 /*!< @brief Major version number */
#define SAMPLE_LIB_MINOR_VERSION 0 /*!< @brief Minor version number */
#define SAMPLE_LIB_REVISION 0 /*!< @brief Revision version number. Value of 0 indicates a development version.*/
#define SAMPLE_LIB_MAJOR_VERSION 7 /*!< @brief Major version number */
#define SAMPLE_LIB_MINOR_VERSION 0 /*!< @brief Minor version number */
#define SAMPLE_LIB_REVISION 0 /*!< @brief Revision version number. Value of 0 indicates a development version.*/

/**
* @brief Last official release.
Expand Down Expand Up @@ -71,9 +72,9 @@

/**
* @brief Max Version String length.
*
*
* Maximum length that a sample_lib version string can be.
*
*
*/
#define SAMPLE_LIB_CFG_MAX_VERSION_STR_LEN 256

Expand Down
10 changes: 6 additions & 4 deletions unit-test/coveragetest/coveragetest_sample_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ typedef struct
* A local helper (hook) function for the OS_printf stub provided by OSAL.
* This confirms internal content of the format string and arguments.
*/
static int32 UT_printf_hook(void *UserObj, int32 StubRetcode, uint32 CallCount, const UT_StubContext_t *Context,
va_list va)
static int32
UT_printf_hook(void *UserObj, int32 StubRetcode, uint32 CallCount, const UT_StubContext_t *Context, va_list va)
{
SAMPLE_LIB_Function_TestState_t *State = UserObj;
const char * string = UT_Hook_GetArgValueByName(Context, "string", const char *);
const char *string = UT_Hook_GetArgValueByName(Context, "string", const char *);

/*
* The OS_printf() stub passes format string as the argument
Expand Down Expand Up @@ -173,7 +173,9 @@ void Sample_UT_Setup(void)
/*
* Teardown function after every test
*/
void Sample_UT_TearDown(void) {}
void Sample_UT_TearDown(void)
{
}

/*
* Register the test cases to execute with the unit test tool
Expand Down
Loading