Closed rs028 closed 1 year ago
Merging #482 (0257d2d) into master (6650b8a) will decrease coverage by
0.05%
. The diff coverage isn/a
.
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
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?
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 ;)~
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.
@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 :)
More detail about the tests.
Ubuntu:
unittests
, oldtests
and modeltests
pass on all versionsMacOS:
unittests
and oldtests
passmodeltests
failAll 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).
Improving the logs of the various tests (see #423).