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

Setup unit tests #24

Open
wants to merge 3 commits into
base: minimal_cmake
Choose a base branch
from
Open

Setup unit tests #24

wants to merge 3 commits into from

Conversation

tlestang
Copy link

@tlestang tlestang commented Mar 4, 2022

This is a PR into branch minimal_cmake, to have a smaller diff and make review easier. It should either be merged before #20 is, or alternatively this branch will be rabased on the tip of master

This adds a placeholder unit test, built with CMake and pFUnit.
Test is built and run each time commits are pushed to this repo.

The test code itself is defined in tests/ as a free-form Fortran file. This file is parsed when the pFUnit CMake module is invoked:

# tests/CmakeLists.txt
# ...
add_pfunit_ctest(tests TEST_SOURCES ${test_src})

Test executable is built typically as

mkdir build && cd build
cmake ..
make tests # create test executable in build/tests/

The GitHub actions workflow unit_tests.yml is very similar to the one introduced in #18 , but it build and caches pFUnit in additon to openmpi, and uses cmake to build the test exe.

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.

1 participant