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

Testsuite logging #482

Merged
merged 23 commits into from
May 15, 2023
Merged

Testsuite logging #482

merged 23 commits into from
May 15, 2023

Conversation

rs028
Copy link
Collaborator

@rs028 rs028 commented Oct 1, 2022

Improving the logs of the various tests (see #423).

@codecov
Copy link

codecov bot commented Oct 1, 2022

Codecov Report

Merging #482 (0257d2d) into master (6650b8a) will decrease coverage by 0.05%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #482      +/-   ##
==========================================
- Coverage   66.81%   66.76%   -0.05%     
==========================================
  Files          17       17              
  Lines        2046     2046              
==========================================
- Hits         1367     1366       -1     
- Misses        679      680       +1     
Flag Coverage Δ
build 52.81% <ø> (ø)
tests 66.92% <ø> (-0.25%) ⬇️
unittests 54.86% <ø> (ø)

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

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6650b8a...0257d2d. Read the comment docs.

@rs028
Copy link
Collaborator Author

rs028 commented Oct 3, 2022

To avoid overcrowding the terminal, the idea here is to output to screen a message saying that the test has failed or passed at the end of all tests. Initally limited to indent and style tests only for simplicity.
The initial submit works for individual tests (eg make indenttest) but not when they are put together (make alltests) because the temporary file gets deleted at the start of each test.

Desired output:

Running indent script on:
src/argparse.f90
src/atchem2.f90
src/atmosphereFunctions.f90
src/configFunctions.f90
src/constraintFunctions.f90
src/dataStructures.f90
src/inputFunctions.f90
src/interpolationFunctions.f90
src/outputFunctions.f90
src/parameterModules.f90
src/solarFunctions.f90
src/solverFunctions.f90
Indent script finished

Running style script on:
src/argparse.f90
src/atchem2.f90
src/atmosphereFunctions.f90
src/configFunctions.f90
src/constraintFunctions.f90
src/dataStructures.f90
src/inputFunctions.f90
src/interpolationFunctions.f90
src/outputFunctions.f90
src/parameterModules.f90
src/solarFunctions.f90
src/solverFunctions.f90
Style script finished

Indent test PASSED
Style test PASSED

@rs028
Copy link
Collaborator Author

rs028 commented Oct 4, 2022

A different approach is to log all the output of the test to a file and just output to screen a message.
This is much simpler and cleaner. @spco, any thoughts?

@rs028
Copy link
Collaborator Author

rs028 commented Oct 13, 2022

This works for indent, style, model and old tests. The only annoying thing is that for the test spec_yes_env_no_with_jfac_fail1, which is meant to fail, the executable prints a STOP 2 message (I think) and it looks a bit untidy ;)

@rs028
Copy link
Collaborator Author

rs028 commented Oct 14, 2022

I can't find a way to log the unit tests. If I understand it, it is all hard wired in the FRUIT code and I don't really want to modify that.
But the printout to screen is actually reasonably clear, so I think this is okay.

@rs028
Copy link
Collaborator Author

rs028 commented Jan 4, 2023

@spco I think I have done the merge correctly, but for some reasons, it is failing the macos tests again!
If you have some time to review this PR as well, it would be great :)

@rs028 rs028 mentioned this pull request Mar 23, 2023
@rs028
Copy link
Collaborator Author

rs028 commented Mar 28, 2023

More detail about the tests.

Ubuntu:

  • unittests, oldtests and modeltests pass on all versions

MacOS:

  • run fails with gfortran 9
  • unittests and oldtests pass
  • 4 out of 7 modeltests fail

All systems report a warning about cmake becoming obsolete during the installation of sundials, but I don't think that is causing a problem here.

Another warning message is ld: warning: dylib (cvode/lib/libsundials_cvode.dylib) was built for newer macOS version (11.7) than being linked (11.0), I don't know if that is why the MacOS tests fail (?)

In general the whole setup is a bit clunky now. I had to run each test manually and individually (sometimes more than once) to get it to complete the run. Perhaps it is all just a problem on the github actions side. (this is okay now that the yml file has been modified to run all tests, regardless of their success).

@rs028 rs028 requested a review from spco May 10, 2023 11:00
@@ -128,6 +128,7 @@ AtChem2 v1.3-dev
6 BLHEIGHT NOTUSED
7 DILUTE NOTUSED
8 JFAC J4
STOP 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be correct? A STOP being printed, then further output afterwards? Seems odd.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest I do not know! The test is meant to fail, and it seems that STOP is being printed to screen at least on my Linux machine. It seems it is not necessary for the jobs that run on actions. A bit puzzled.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference between the two is probably something to do with how the two streams (output and error) are being handled, either piped to the same location or different ones. The main question is does it pass/fail the tests correctly I guess :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This particular test passes. It is four others that fail but only on mac.

Copy link
Collaborator

@spco spco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rs028 . All looks fine to me really, so long as you've tested it yourself then I see no problems (see the one comment above for a question). I don't want to hold things up if this is all working!

@rs028 rs028 merged commit eec8c80 into AtChem:master May 15, 2023
@rs028 rs028 deleted the testlog branch May 15, 2023 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants