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

Ensure unit tests don't fail silently #138

Merged
merged 5 commits into from
May 3, 2023
Merged

Ensure unit tests don't fail silently #138

merged 5 commits into from
May 3, 2023

Conversation

n-claes
Copy link
Owner

@n-claes n-claes commented Apr 27, 2023

PR description

Apparently for some cases when unit tests fail pFUnit flags them as failures in the terminal, but does not properly exit with an error. This affected two minor unit tests which have been silently failing for the past month. This PR ensures a proper exit by piping the terminal output to a log file, grepping for failures and exiting with a 1 status if these are found.

Bugfixes

Legolas

  • Fixed two unit tests that were silently failing
  • Ensure proper exit 1 status when the unit testing suite fails

For future reference: Goddard-Fortran-Ecosystem/pFUnit#423

Testing

Unit tests

  • Fixed the two failing minor tests
  • CI now uses gcc-9, gcc-10, gcc-11 and gcc-12 for unit testing (coverage only with 11)

@n-claes n-claes added bug Something isn't working tests-unit Modified or new unit tests labels Apr 27, 2023
@n-claes n-claes added this to the Legolas 2.0 milestone Apr 27, 2023
@n-claes n-claes force-pushed the ci/fix_unit_tests branch from 8d3144b to 32eadc5 Compare April 27, 2023 15:50
@codecov
Copy link

codecov bot commented Apr 27, 2023

Codecov Report

Merging #138 (19281e4) into develop (9fd0bdc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #138   +/-   ##
========================================
  Coverage    90.69%   90.69%           
========================================
  Files          158      158           
  Lines         8965     8967    +2     
========================================
+ Hits          8131     8133    +2     
  Misses         834      834           
Flag Coverage Δ
legolas 93.13% <100.00%> (+<0.01%) ⬆️
pylbo 86.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@n-claes n-claes force-pushed the ci/fix_unit_tests branch 3 times, most recently from 4d203e2 to 7bab544 Compare May 2, 2023 06:29
@n-claes n-claes force-pushed the ci/fix_unit_tests branch from 7bab544 to 19281e4 Compare May 2, 2023 06:49
@n-claes n-claes merged commit 508725a into develop May 3, 2023
@n-claes n-claes deleted the ci/fix_unit_tests branch May 3, 2023 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests-unit Modified or new unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant