From d5c7a7d1416d5aed8d9c2d3345686e79c7bade29 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Thu, 23 Jul 2020 10:21:59 -0400 Subject: [PATCH 1/3] Fix #26, Install unit test --- unit-test/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) 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() From be156713083872b2d59cf284e9d192f92e6f4094 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" Date: Tue, 4 Aug 2020 21:28:28 -0400 Subject: [PATCH 2/3] Close #25, Add build number and baseline to version report Add new build macros for baseline and build number. Add string helper macros. Add version strings. --- fsw/src/sample_lib.c | 3 +- fsw/src/sample_lib_version.h | 54 ++++++++++++++++++++++++++---------- 2 files changed, 41 insertions(+), 16 deletions(-) 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..146fca4 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 26 /*!< 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 */ From fd5058cf1a091105f6d490b4c6390c6eb188dfe8 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" Date: Wed, 5 Aug 2020 14:29:39 -0400 Subject: [PATCH 3/3] Increase version to v1.1.0+dev27 and update README Format "development build" string portion as ALL CAPS for readability --- README.md | 24 +++++++++++++++--------- fsw/src/sample_lib_version.h | 4 ++-- 2 files changed, 17 insertions(+), 11 deletions(-) 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_version.h b/fsw/src/sample_lib_version.h index 146fca4..e0775cf 100644 --- a/fsw/src/sample_lib_version.h +++ b/fsw/src/sample_lib_version.h @@ -32,7 +32,7 @@ /* Development Build Macro Definitions */ -#define SAMPLE_LIB_BUILD_NUMBER 26 /*!< Development Build: Number of commits since baseline */ +#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 */ @@ -56,7 +56,7 @@ * See @ref cfsversions for format differences between development and release versions. */ #define SAMPLE_LIB_VERSION_STRING \ - " Sample Lib Development Build " \ + " Sample Lib DEVELOPMENT BUILD " \ SAMPLE_LIB_VERSION \ ", Last Official Release: v1.1.0" /* For full support please use this version */