Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A clear and concise description of what the contribution is.
**Testing performed**
Steps taken to test the contribution:
1. Build steps '...'
1. Execution steps '...'
2. Execution steps '...'

**Expected behavior changes**
A clear and concise description of how this contribution will change behavior and level of impact.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
codeql:
name: Codeql
uses: nasa/cFS/.github/workflows/codeql-reusable.yml@main
with:
with:
component-path: libs/sample_lib
make: 'make -C build/native/default_cpu1/apps/sample_lib'
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
project(CFE_SAMPLE_LIB C)
cmake_minimum_required(VERSION 3.5)
project(CFS_SAMPLE_LIB C)

# Create the app module
add_cfe_app(sample_lib fsw/src/sample_lib.c)
Expand Down
6 changes: 3 additions & 3 deletions fsw/src/sample_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int32 SAMPLE_LIB_Init(void)
/*
* Call a C library function, like strcpy(), and test its result.
*
* This is primary for a unit test example, to have more than
* This is primarily for a unit test example, to have more than
* one code path to exercise.
*
* The specification for strncpy() indicates that it should return
Expand All @@ -65,8 +65,8 @@ 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
20 changes: 11 additions & 9 deletions fsw/src/sample_lib_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,19 @@

/* Development Build Macro Definitions */

#define SAMPLE_LIB_BUILD_NUMBER 2 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_LIB_BUILD_BASELINE "equuleus-rc1" /*!< Development Build: git tag that is the base for the current development */
#define SAMPLE_LIB_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */
#define SAMPLE_LIB_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */
#define SAMPLE_LIB_BUILD_NUMBER 2 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_LIB_BUILD_BASELINE \
"equuleus-rc1" /*!< Development Build: git tag that is the base for the current development */
#define SAMPLE_LIB_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle \
*/
#define SAMPLE_LIB_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */

/*
* Version Macros, see \ref cfsversions for definitions.
*/
#define SAMPLE_LIB_MAJOR_VERSION 1 /*!< @brief Major version number */
#define SAMPLE_LIB_MINOR_VERSION 1 /*!< @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 1 /*!< @brief Major version number */
#define SAMPLE_LIB_MINOR_VERSION 1 /*!< @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 +73,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
2 changes: 1 addition & 1 deletion unit-test/coveragetest/coveragetest_sample_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static int32 UT_printf_hook(void *UserObj, int32 StubRetcode, uint32 CallCount,
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
4 changes: 2 additions & 2 deletions unit-test/inc/OCS_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
** strncpy().
*/

#ifndef OSC_STRING_H
#define OSC_STRING_H
#ifndef OCS_STRING_H
#define OCS_STRING_H

/* ----------------------------------------- */
/* prototypes normally declared in string.h */
Expand Down
2 changes: 1 addition & 1 deletion unit-test/override_src/libc_string_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ char *OCS_strncpy(char *dst, const char *src, unsigned long size)
memset(&dst[CopySize], 0, size - CopySize);
}

/* normal response is to return a pointer to the source */
/* normal response is to return a pointer to the destination */
return dst;
}
Loading