Skip to content

Commit ce70d3d

Browse files
authored
Merge pull request #28 from nasa/integration-candidate
Integration Candidate 2020-07-29
2 parents 32d2d01 + fd5058c commit ce70d3d

File tree

4 files changed

+57
-25
lines changed

4 files changed

+57
-25
lines changed

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,35 @@ sample_lib implements SAMPLE_Function, as an example for how to build and link a
88

99
## Version History
1010

11-
#### Development Build: 1.1.4
11+
### Development Build: 1.1.0+dev27
12+
13+
- Install unit test as part of cmake recipe. Sample lib test runner now shows up in expected install directory
14+
- Add build number and baseline to version reporting
15+
- See <https://github.com/nasa/sample_lib/pull/28>
16+
17+
### Development Build: 1.1.4
1218

1319
- Apply code style
14-
- See https://github.com/nasa/sample_lib/pull/24
20+
- See <https://github.com/nasa/sample_lib/pull/24>
1521

16-
#### Development Build: 1.1.3
22+
### Development Build: 1.1.3
1723

1824
- Coverage data `make lcov` includes the sample_lib code
19-
- See https://github.com/nasa/sample_lib/pull/22 for more details
25+
- See <https://github.com/nasa/sample_lib/pull/22>
2026

21-
#### Development Build: 1.1.2
27+
### Development Build: 1.1.2
2228

2329
- Added coverage test and a stub library to facilitate unit test
24-
- Minor updates (see https://github.com/nasa/sample_lib/pull/16)
30+
- See <https://github.com/nasa/sample_lib/pull/16>
2531

26-
#### Development Build: 1.1.1
32+
### Development Build: 1.1.1
2733

28-
- Minor updates (see https://github.com/nasa/sample_lib/pull/14)
34+
- See <https://github.com/nasa/sample_lib/pull/14>
2935

3036
### ***OFFICIAL RELEASE: 1.1.0 - Aquila***
3137

32-
- Minor updates (see https://github.com/nasa/sample_lib/pull/6)
3338
- Released as part of cFE 6.7.0, Apache 2.0
39+
- See <https://github.com/nasa/sample_lib/pull/6>
3440

3541
### ***OFFICIAL RELEASE: 1.0.0a***
3642

fsw/src/sample_lib.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ int32 SAMPLE_LibInit(void)
6565
/* ensure termination */
6666
SAMPLE_Buffer[sizeof(SAMPLE_Buffer) - 1] = 0;
6767

68-
OS_printf("SAMPLE Lib Initialized. Version %d.%d.%d.%d\n", SAMPLE_LIB_MAJOR_VERSION, SAMPLE_LIB_MINOR_VERSION,
69-
SAMPLE_LIB_REVISION, SAMPLE_LIB_MISSION_REV);
68+
OS_printf("SAMPLE Lib Initialized.%s\n", SAMPLE_LIB_VERSION_STRING);
7069

7170
return CFE_SUCCESS;
7271

fsw/src/sample_lib_version.h

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,49 @@
1818
** See the License for the specific language governing permissions and
1919
** limitations under the License.
2020
**
21-
** File: sample_lib_version.h
22-
**
23-
** Purpose:
24-
** The SAMPLE Lib header file containing version number
25-
**
26-
** Notes:
27-
**
2821
*************************************************************************/
29-
#ifndef _sample_lib_version_h_
30-
#define _sample_lib_version_h_
3122

32-
#define SAMPLE_LIB_MAJOR_VERSION 1
33-
#define SAMPLE_LIB_MINOR_VERSION 1
34-
#define SAMPLE_LIB_REVISION 4
35-
#define SAMPLE_LIB_MISSION_REV 0
23+
/*! @file sample_lib_version.h
24+
* @brief Purpose:
25+
*
26+
* The Sample Lib header file containing version information
27+
*
28+
*/
29+
30+
#ifndef SAMPLE_LIB_VERSION_H
31+
#define SAMPLE_LIB_VERSION_H
32+
33+
/* Development Build Macro Definitions */
34+
35+
#define SAMPLE_LIB_BUILD_NUMBER 27 /*!< Development Build: Number of commits since baseline */
36+
#define SAMPLE_LIB_BUILD_BASELINE "v1.1.0" /*!< Development Build: git tag that is the base for the current development */
37+
38+
/* Version Macro Definitions */
39+
40+
#define SAMPLE_LIB_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
41+
#define SAMPLE_LIB_MINOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
42+
#define SAMPLE_LIB_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */
43+
#define SAMPLE_LIB_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */
44+
45+
#define SAMPLE_LIB_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer macros */
46+
#define SAMPLE_LIB_STR(x) SAMPLE_LIB_STR_HELPER(x) /*!< @brief Helper function to concatenate strings from integer macros */
47+
48+
/*! @brief Development Build Version Number.
49+
* @details Baseline git tag + Number of commits since baseline. @n
50+
* See @ref cfsversions for format differences between development and release versions.
51+
*/
52+
#define SAMPLE_LIB_VERSION SAMPLE_LIB_BUILD_BASELINE "+dev" SAMPLE_LIB_STR(SAMPLE_LIB_BUILD_NUMBER)
53+
54+
/*! @brief Development Build Version String.
55+
* @details Reports the current development build's baseline, number, and name. Also includes a note about the latest official version. @n
56+
* See @ref cfsversions for format differences between development and release versions.
57+
*/
58+
#define SAMPLE_LIB_VERSION_STRING \
59+
" Sample Lib DEVELOPMENT BUILD " \
60+
SAMPLE_LIB_VERSION \
61+
", Last Official Release: v1.1.0" /* For full support please use this version */
3662

37-
#endif /* _sample_lib_version_h_ */
63+
#endif /* SAMPLE_LIB_VERSION_H */
3864

3965
/************************/
4066
/* End of File Comment */

unit-test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ foreach(SRCFILE ${LIB_SRC_FILES})
9292

9393
# Add it to the set of tests to run as part of "make test"
9494
add_test(${TESTNAME} ${TESTNAME}-testrunner)
95+
install(TARGETS ${TESTNAME}-testrunner DESTINATION ${TGTNAME}/${UT_INSTALL_SUBDIR})
9596

9697
endforeach()
9798

0 commit comments

Comments
 (0)