How to add code in science/physics_schemes/source but exclude it from the lfric_atm build? #417
Replies: 3 comments 6 replies
-
|
I think I ran into a similar problem before - my mistake was forgetting to do |
Beta Was this translation helpful? Give feedback.
-
|
Definitely more one for the SSD team, but elsewhere, the unit-test folders exist at the same level in the directory structure as the source folder. So probably if you created science/physics_schemes/unit_tests/convection/comorph/ to hold your code, it would work and not get confused with the source code. |
Beta Was this translation helpful? Give feedback.
-
|
I've had a quick look at this change it it looks more like an integration tests than unit tests. It appears that you have programs which are run and the output interrogated. This is the pattern integration tests take. If you want information on how such tests are supported check out the documentation: https://curly-memory-j58e8q8.pages.github.io/how_to_use_it/testing/integration_testing.html You will find detailed some infrastructure which supports the writing of such tests. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks,
I want to add some small bits of fortran code to the lfric_apps repository, that perform simple stand-alone unit tests for parts of the physics code. Having added my fortran files and a bash script to compile the unit-tests under:
science/physics_schemes/source/convection/comorph/unit_testsI'm now finding that the lfric_apps command-line build fails while trying to analyse the dependencies in the unit test code:
Does anyone know how I can tell the LFRic build system to ignore source files in the unit_tests directory? In the UM this was straightforward; you just set the directories to include and exclude under:
fcm-make/inc/um-atmos-common.cfgThere must be something similar somewhere in lfric_apps but I've so-far failed to find it. Any ideas?
If anyone wants more detail; I'm trying to add the CoMorph standalone unit-test (which has always been in the UM copy of comorph) into LFRic to ensure we keep it after the eventual retirement of the UM. The comorph/unit_tests directory wasn't ported across into lfric_apps with the rest of the UM physics for some reason. I'm trying to put it back again as part of this ticket:
lfric_apps:#941. I've confirmed that the comorph unit test compiles and runs fine from the lfric_apps branch, but the lfric_atm command-line build now won't work...
Cheers!
Mike
Beta Was this translation helpful? Give feedback.
All reactions