Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce branch coverage in workflow (set limit on uncovered branches) #1115

Closed
skliper opened this issue Jul 21, 2021 · 1 comment · Fixed by #1117 or #1127
Closed

Enforce branch coverage in workflow (set limit on uncovered branches) #1115

skliper opened this issue Jul 21, 2021 · 1 comment · Fixed by #1117 or #1127

Comments

@skliper
Copy link
Contributor

skliper commented Jul 21, 2021

Is your feature request related to a problem? Please describe.
#1114 gets us down to 4 uncovered branches (with issues for each), need to enforce so this doesn't slip w/ future updates.

Describe the solution you'd like
Workflow currently checks for 100% line coverage:

- name: Confirm 100% line coverage
run: |
if [[ `grep -A 3 "Overall coverage rate" lcov_out.txt | grep lines` != *"100.0%"* ]]; then
grep -A 3 "Overall coverage rate" lcov_out.txt
echo "Lacks 100.0% line unit test coverage"
exit -1
fi

Add check of branches, suggesting reading in the branches*(AAA of BBB branches) and confirming BBB-AAA <= 4 (suggesting the bash math support to keep things simple).

Describe alternatives you've considered
Minimum % coverage is somewhat weak since it doesn't really catch if you add more uncovered branches (as long as you add enough covered ones also). Hard count check is better. Really getting to 100% is even better, but we aren't there yet.

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

@nmullane
Copy link
Contributor

I'll start working on this.

nmullane added a commit to nmullane/osal that referenced this issue Jul 26, 2021
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.
nmullane added a commit to nmullane/osal that referenced this issue Jul 26, 2021
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.
nmullane added a commit to nmullane/osal that referenced this issue Jul 27, 2021
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.
nmullane added a commit to nmullane/osal that referenced this issue Jul 29, 2021
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.
nmullane added a commit to nmullane/osal that referenced this issue Jul 29, 2021
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.
nmullane added a commit to nmullane/osal that referenced this issue Aug 4, 2021
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.
astrogeco added a commit that referenced this issue Aug 6, 2021
Fix #1115, Add absolute branch coverage check
@skliper skliper added this to the 6.0.0 milestone Sep 24, 2021
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Fix nasa#1071, Initialize Status in CFE_ES_WaitForSystemState
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants