-
Notifications
You must be signed in to change notification settings - Fork 217
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
Subtle bug in Code Coverage CI workflow #1418
Comments
thnkslprpt
added a commit
to thnkslprpt/osal
that referenced
this issue
Sep 23, 2023
2 tasks
thnkslprpt
added a commit
to thnkslprpt/osal
that referenced
this issue
Mar 23, 2024
thnkslprpt
added a commit
to thnkslprpt/osal
that referenced
this issue
Aug 8, 2024
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist
Describe the bug
It seems that the intent of the
standalone-build.yml
workflow is to only run the 'Enforce coverage minimum' steps in the debug-ubuntu-20.04 build (there is a separate check for the release builds - osal_apicheck). However, I think they are currently running in all builds (incl. the 2 release builds in the matrix).Therefore, they are referencing non-existent variables, because in the release and debug-ubuntu-22.04 builds the
ncov_lines/functions/branches
variables are never created.The reason the checks normally 'pass' silently in those 3 builds is because they are comparing a non-existent variable (which they seem to treat as zero?) as greater than the
env.allowed_ncov_functions/lines/branches
variables (which will always evaluate to false as they obviously cannot be negative).If you change any/all of the
allowed_ncov_lines/branches/functions
variables to-1
, suddenly all 4 builds will fail (but the non-existentncov_lines/functions/branches
variables will not be able to be printed in 3/4 of the builds. This shows that these steps are running in all builds, whether intentionally or not:They do print correctly (see inside the brackets at the end of the error strings) with the debug-20.04 build though. As mentioned, this is the only build in which the coverage data is actually created:
osal/.github/workflows/standalone-build.yml
Lines 36 to 38 in b5dd01c
osal/.github/workflows/standalone-build.yml
Lines 84 to 89 in b5dd01c
Code snips
Here are the coverage checks:
osal/.github/workflows/standalone-build.yml
Lines 91 to 107 in b5dd01c
Expected behavior
The coverage checks in the code snippet above should be set to run only on the debug builds (no reason not to add them in for ubuntu-22.04 as well, from what I can see), and not run on the release builds.
Reporter Info
Avi Weiss @thnkslprpt
The text was updated successfully, but these errors were encountered: