From 788a01aa2c2705296945adac8679766081c3aa15 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Thu, 23 Jul 2020 10:14:50 -0400 Subject: [PATCH 1/3] Fix #81, 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 38cad88..130fd8f 100644 --- a/unit-test/CMakeLists.txt +++ b/unit-test/CMakeLists.txt @@ -67,6 +67,7 @@ foreach(SRCFILE sample_app.c) # 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 03f4efa917919b5a38e74a75af8646cb47848568 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" Date: Tue, 4 Aug 2020 22:10:35 -0400 Subject: [PATCH 2/3] Close #80, Add baseline and build number Add build number and baseline macros Add version string macros Use new version string in noop and version report --- fsw/src/sample_app.c | 13 ++------- fsw/src/sample_app_version.h | 53 ++++++++++++++++++++++++++---------- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/fsw/src/sample_app.c b/fsw/src/sample_app.c index beafedb..bc10da3 100644 --- a/fsw/src/sample_app.c +++ b/fsw/src/sample_app.c @@ -239,11 +239,8 @@ int32 SAMPLE_AppInit( void ) CFE_EVS_SendEvent (SAMPLE_STARTUP_INF_EID, CFE_EVS_EventType_INFORMATION, - "SAMPLE App Initialized. Version %d.%d.%d.%d", - SAMPLE_APP_MAJOR_VERSION, - SAMPLE_APP_MINOR_VERSION, - SAMPLE_APP_REVISION, - SAMPLE_APP_MISSION_REV); + "SAMPLE App Initialized.%s", + SAMPLE_APP_VERSION_STRING); return ( CFE_SUCCESS ); @@ -387,11 +384,7 @@ int32 SAMPLE_Noop( const SAMPLE_Noop_t *Msg ) CFE_EVS_SendEvent(SAMPLE_COMMANDNOP_INF_EID, CFE_EVS_EventType_INFORMATION, - "SAMPLE: NOOP command Version %d.%d.%d.%d", - SAMPLE_APP_MAJOR_VERSION, - SAMPLE_APP_MINOR_VERSION, - SAMPLE_APP_REVISION, - SAMPLE_APP_MISSION_REV); + "SAMPLE: NOOP command %s", SAMPLE_APP_VERSION); return CFE_SUCCESS; diff --git a/fsw/src/sample_app_version.h b/fsw/src/sample_app_version.h index 4844a96..0cd19c1 100644 --- a/fsw/src/sample_app_version.h +++ b/fsw/src/sample_app_version.h @@ -18,26 +18,49 @@ ** See the License for the specific language governing permissions and ** limitations under the License. ** -** File: sample_app_version.h -** -** Purpose: -** The Sample Application header file containing version number -** -** Notes: -** -** *************************************************************************/ -#ifndef _sample_app_version_h_ -#define _sample_app_version_h_ +/*! @file sample_app_version.h + * @brief Purpose: + * + * The Sample App header file containing version information + * + */ + +#ifndef SAMPLE_APP_VERSION_H +#define SAMPLE_APP_VERSION_H + +/* Development Build Macro Definitions */ + +#define SAMPLE_APP_BUILD_NUMBER 64 /*!< Development Build: Number of commits since baseline */ +#define SAMPLE_APP_BUILD_BASELINE "v1.1.0" /*!< Development Build: git tag that is the base for the current development */ + +/* Version Macro Definitions */ + +#define SAMPLE_APP_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */ +#define SAMPLE_APP_MINOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */ +#define SAMPLE_APP_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */ +#define SAMPLE_APP_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */ + +#define SAMPLE_APP_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer macros */ +#define SAMPLE_APP_STR(x) SAMPLE_APP_STR_HELPER(x) /*!< @brief Helper function to concatenate strings from integer macros */ -#define SAMPLE_APP_MAJOR_VERSION 1 -#define SAMPLE_APP_MINOR_VERSION 1 -#define SAMPLE_APP_REVISION 11 -#define SAMPLE_APP_MISSION_REV 0 +/*! @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_APP_VERSION SAMPLE_APP_BUILD_BASELINE "+dev" SAMPLE_APP_STR(SAMPLE_APP_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_APP_VERSION_STRING \ + " Sample App Development Build " \ + SAMPLE_APP_VERSION \ + ", Last Official Release: v1.1.0" /* For full support please use this version */ -#endif /* _sample_app_version_h_ */ +#endif /* SAMPLE_APP_VERSION_H */ /************************/ /* End of File Comment */ From 4c8fa6d5f051b81536764b3cfbbf64aa51cdd642 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" Date: Wed, 5 Aug 2020 14:15:52 -0400 Subject: [PATCH 3/3] Increase version to 1.1.0+dev65 and update README Make "development version" part of version string ALL CAPS to make it easier to identify in event among event messages --- README.md | 6 ++++++ fsw/src/sample_app_version.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 59bd85f..8316b5d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,12 @@ sample_app is an example for how to build and link an application in cFS. See al ## Version History +### Development Build: 1.1.0+dev65 + +- Add build number and baseline to version report +- Install unit test as part of cmake recipe. Sample app test runner now shows up in expected install directory +- See + ### Development Build: 1.1.11 - Move the table to fsw/tables and renames "sample_table" to "sample_app_table diff --git a/fsw/src/sample_app_version.h b/fsw/src/sample_app_version.h index 0cd19c1..e80f1d7 100644 --- a/fsw/src/sample_app_version.h +++ b/fsw/src/sample_app_version.h @@ -32,7 +32,7 @@ /* Development Build Macro Definitions */ -#define SAMPLE_APP_BUILD_NUMBER 64 /*!< Development Build: Number of commits since baseline */ +#define SAMPLE_APP_BUILD_NUMBER 65 /*!< Development Build: Number of commits since baseline */ #define SAMPLE_APP_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_APP_VERSION_STRING \ - " Sample App Development Build " \ + " Sample App DEVELOPMENT BUILD " \ SAMPLE_APP_VERSION \ ", Last Official Release: v1.1.0" /* For full support please use this version */