diff --git a/README.md b/README.md index 1d1494a..0a1e0c9 100644 --- a/README.md +++ b/README.md @@ -8,29 +8,35 @@ sample_lib implements SAMPLE_Function, as an example for how to build and link a ## Version History -#### Development Build: 1.1.4 +### Development Build: 1.1.0+dev27 + +- Install unit test as part of cmake recipe. Sample lib test runner now shows up in expected install directory +- Add build number and baseline to version reporting +- See + +### Development Build: 1.1.4 - Apply code style -- See https://github.com/nasa/sample_lib/pull/24 +- See -#### Development Build: 1.1.3 +### Development Build: 1.1.3 - Coverage data `make lcov` includes the sample_lib code -- See https://github.com/nasa/sample_lib/pull/22 for more details +- See -#### Development Build: 1.1.2 +### Development Build: 1.1.2 - Added coverage test and a stub library to facilitate unit test -- Minor updates (see https://github.com/nasa/sample_lib/pull/16) +- See -#### Development Build: 1.1.1 +### Development Build: 1.1.1 -- Minor updates (see https://github.com/nasa/sample_lib/pull/14) +- See ### ***OFFICIAL RELEASE: 1.1.0 - Aquila*** -- Minor updates (see https://github.com/nasa/sample_lib/pull/6) - Released as part of cFE 6.7.0, Apache 2.0 +- See ### ***OFFICIAL RELEASE: 1.0.0a*** diff --git a/fsw/src/sample_lib.c b/fsw/src/sample_lib.c index 7536590..bc3d9ae 100644 --- a/fsw/src/sample_lib.c +++ b/fsw/src/sample_lib.c @@ -65,8 +65,7 @@ int32 SAMPLE_LibInit(void) /* ensure termination */ SAMPLE_Buffer[sizeof(SAMPLE_Buffer) - 1] = 0; - OS_printf("SAMPLE Lib Initialized. Version %d.%d.%d.%d\n", SAMPLE_LIB_MAJOR_VERSION, SAMPLE_LIB_MINOR_VERSION, - SAMPLE_LIB_REVISION, SAMPLE_LIB_MISSION_REV); + OS_printf("SAMPLE Lib Initialized.%s\n", SAMPLE_LIB_VERSION_STRING); return CFE_SUCCESS; diff --git a/fsw/src/sample_lib_version.h b/fsw/src/sample_lib_version.h index 97b3751..e0775cf 100644 --- a/fsw/src/sample_lib_version.h +++ b/fsw/src/sample_lib_version.h @@ -18,23 +18,49 @@ ** See the License for the specific language governing permissions and ** limitations under the License. ** -** File: sample_lib_version.h -** -** Purpose: -** The SAMPLE Lib header file containing version number -** -** Notes: -** *************************************************************************/ -#ifndef _sample_lib_version_h_ -#define _sample_lib_version_h_ -#define SAMPLE_LIB_MAJOR_VERSION 1 -#define SAMPLE_LIB_MINOR_VERSION 1 -#define SAMPLE_LIB_REVISION 4 -#define SAMPLE_LIB_MISSION_REV 0 +/*! @file sample_lib_version.h + * @brief Purpose: + * + * The Sample Lib header file containing version information + * + */ + +#ifndef SAMPLE_LIB_VERSION_H +#define SAMPLE_LIB_VERSION_H + +/* Development Build Macro Definitions */ + +#define SAMPLE_LIB_BUILD_NUMBER 27 /*!< Development Build: Number of commits since baseline */ +#define SAMPLE_LIB_BUILD_BASELINE "v1.1.0" /*!< Development Build: git tag that is the base for the current development */ + +/* Version Macro Definitions */ + +#define SAMPLE_LIB_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */ +#define SAMPLE_LIB_MINOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */ +#define SAMPLE_LIB_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */ +#define SAMPLE_LIB_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */ + +#define SAMPLE_LIB_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer macros */ +#define SAMPLE_LIB_STR(x) SAMPLE_LIB_STR_HELPER(x) /*!< @brief Helper function to concatenate strings from integer macros */ + +/*! @brief Development Build Version Number. + * @details Baseline git tag + Number of commits since baseline. @n + * See @ref cfsversions for format differences between development and release versions. + */ +#define SAMPLE_LIB_VERSION SAMPLE_LIB_BUILD_BASELINE "+dev" SAMPLE_LIB_STR(SAMPLE_LIB_BUILD_NUMBER) + +/*! @brief Development Build Version String. + * @details Reports the current development build's baseline, number, and name. Also includes a note about the latest official version. @n + * See @ref cfsversions for format differences between development and release versions. +*/ +#define SAMPLE_LIB_VERSION_STRING \ + " Sample Lib DEVELOPMENT BUILD " \ + SAMPLE_LIB_VERSION \ + ", Last Official Release: v1.1.0" /* For full support please use this version */ -#endif /* _sample_lib_version_h_ */ +#endif /* SAMPLE_LIB_VERSION_H */ /************************/ /* End of File Comment */ diff --git a/unit-test/CMakeLists.txt b/unit-test/CMakeLists.txt index 82a146d..cc53e2e 100644 --- a/unit-test/CMakeLists.txt +++ b/unit-test/CMakeLists.txt @@ -92,6 +92,7 @@ foreach(SRCFILE ${LIB_SRC_FILES}) # Add it to the set of tests to run as part of "make test" add_test(${TESTNAME} ${TESTNAME}-testrunner) + install(TARGETS ${TESTNAME}-testrunner DESTINATION ${TGTNAME}/${UT_INSTALL_SUBDIR}) endforeach()