-
Notifications
You must be signed in to change notification settings - Fork 45
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
pFUnit silently fails on Actions #423
Comments
Hmm. That is odd. It should return a non-zero exit if any tests fail. That check does not even care about what sort of asserts were involved; just that Failures or Errors is non-zero. Please let me know which compiler/version you are using and if relevant which MPI flavor. Note that MPI does not promise to propagate Fortran returns, so there is no standard we can rely on. (And now hoping my various CI tests are not experiencing the same faux success.) |
We're using gfortran 11.3.0 as compiler with cmake 3.24.4, no MPI is used. We're building pFUnit with
As for the version of pFUnit itself, we're restoring from cache in our CI but I can see the issue popping up in various merged PRs over the last weeks in which a fresh clone was fetched. As far as I can see our failing tests with green exit first appeared on March 2, which luckily coincides with a clean pFUnit install (so that would be commit 027393b if I'm not mistaken). |
OK - I've gone to look at the relevant source now: Lines 167 to 173 in 74e6f4a
I think there once was an If you use the ctest macro provided by pFUnit: https://github.com/Goddard-Fortran-Ecosystem/pFUnit/blob/main/include/add_pfunit_ctest.cmake Then the ctest triggers on the string produced for failures. If you don't want to use that CMake macro, you'll need to grep on that string in your CI. I could probably be talked into putting the Apologies that this is not better documented. |
@n-claes Can you also point me to your GitHub Action? I just engineered a pFUnit failure both in MAPL and in pFUnit itself. The MAPL GitHub Action failed on both GNU and Intel: https://github.com/GEOS-ESM/MAPL/actions/runs/4821478926 and the PR shows that (GEOS-ESM/MAPL#2103) But MAPL is running with a slightly older pFUnit, so I put in a failure into pFUnit itself and it too failed: https://github.com/Goddard-Fortran-Ecosystem/pFUnit/actions/runs/4821717640 and the PR shows the red X: |
I just saw @tclune's post. I edited |
Hmm. I engineered a failure in https://github.com/Goddard-Fortran-Ecosystem/pFUnit/actions/runs/4821822710/jobs/8588226893 |
@mathomp4 that's indeed puzzling... Somehow in our case it doesn't trigger an @tclune thanks for the macro suggestion, I'm currently fixing the failing tests and will probably fall back on that instead of my grep-for-failure patch |
We've just been bitten by this. What about the possibility of restoring the |
We just noticed some very interesting behaviour in our unit testing suite (GitHub Actions). Apparently a few tests have been failing for the past month, without actually triggering a failure status.
As you can see below we have 3 tests that are failing while Actions nicely exits with a green check mark, so it took us about a month to notice.
I forced a proper fail by piping the output log to a file and grepping for
FAILURES
, which throws anexit 1
if found. Doing this fails Actions like it should, so I'm inclined to think this is a pFUnit bug.Any thoughts on this? The failing tests are two
@assertExceptionRaised
and one@assertTrue
if that's useful.The text was updated successfully, but these errors were encountered: