From dd1ebcc79e559a2c4d4d9dd8bb934fa105b70a58 Mon Sep 17 00:00:00 2001 From: Niall Mullane Date: Mon, 26 Jul 2021 12:12:43 -0400 Subject: [PATCH 1/2] Fix #1115, Add absolute branch coverage check Check for absolute number of missed branches in github workflow instead of checking a percentage. Ensure that the number of missed branches does not increase from the current 4 missed branches. --- .github/workflows/local_unit_test.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/local_unit_test.yml b/.github/workflows/local_unit_test.yml index 17da300b9..c5c89587f 100644 --- a/.github/workflows/local_unit_test.yml +++ b/.github/workflows/local_unit_test.yml @@ -31,7 +31,7 @@ jobs: - name: Calculate coverage run: make lcov | tee lcov_out.txt - + - name: Confirm 100% line coverage run: | if [[ `grep -A 3 "Overall coverage rate" lcov_out.txt | grep lines` != *"100.0%"* ]]; then @@ -39,3 +39,17 @@ jobs: echo "Lacks 100.0% line unit test coverage" exit -1 fi + + - name: Confirm absolute line coverage + run: | + # Current best possible branch coverage is all but 4, with associated issues for each missing case + missed_branches=4 + coverage_nums=$(grep -A 3 "Overall coverage rate" lcov_out.txt | grep branches | grep -oP "[1-9]+[0-9]*") + + diff=$(echo $coverage_nums | awk '{ print $4 - $3 }') + if [ $(($diff > $missed_branches)) == 1 ] + then + grep -A 3 "Overall coverage rate" lcov_out.txt + echo "More than $missed_branches branches missed" + exit -1 + fi From 42bc5a1653f31737c89caae6c70665a650f03356 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Tue, 10 Aug 2021 21:45:51 -0400 Subject: [PATCH 2/2] IC:2021-08-10, Bump to v5.1.0-rc1+dev590 --- README.md | 6 ++++++ src/os/inc/osapi-version.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 06a364a99..251d556af 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,12 @@ The autogenerated OSAL user's guide can be viewed at and + ### Development Build: v5.1.0-rc1+dev586 - Add UtAssert_MIR macro diff --git a/src/os/inc/osapi-version.h b/src/os/inc/osapi-version.h index 1cecb3e75..df169ed51 100644 --- a/src/os/inc/osapi-version.h +++ b/src/os/inc/osapi-version.h @@ -36,7 +36,7 @@ /* * Development Build Macro Definitions */ -#define OS_BUILD_NUMBER 586 +#define OS_BUILD_NUMBER 590 #define OS_BUILD_BASELINE "v5.1.0-rc1" /*