-
Notifications
You must be signed in to change notification settings - Fork 26
Catch2 unit testing capability, a few example/basic unit tests, and tests running on Travis CI. #60
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
Conversation
@manavbhatia Since catch2 is header only we've just included it in the repo. John originally stuck it in the |
Fixed bug that could cause timpi libaries to not be found in FindlibMesh.cmake Added code to find libmesh_devel (development) libraries Added logic to handle cases when when a version (opt, dbg, devel) of libMesh is not present, so that MAST is buildable as long as at least one of these libraries are present
- This is done by specifying CMAKE_BUILD_TYPE=RelWithDebInfo or by setting the CMake variable USE_LIBMESH_DEVEL=1. - It should not adversely effect the previously working build for dbg/opt versions on Linux or macOS.
It would be best to keep all external packages in |
Base functions: parameter, function_set_base, constant_field_function, libMesh mesh generation. Use "make check" to run these tests after building MAST via "make"
- Debug build now occurs first because it has extra assertions that may cause test failures. Earlier feedback than doing Release first.
@manavbhatia @JohnDN90 Once the last commit clears the CI, I'm going to go ahead and merge this first increment of unit test capability into We can then start implementing other changes/features that have tests defined. We also have code that is just pure unit tests for existing capability that we will put into another PR so it doesn't hold things up. |
@jdeaton Sounds good to me. |
This pull request introduces unit test capability initially developed primarily by @JohnDN90 using the Catch2 framework. A small number of basic unit tests are included as examples of how to add them based on our current understanding of Catch2 and CTest.
Also, in this PR the Travis CI system is setup to run the unit tests using
ctest
after building the Debug and Release versions of the MAST library. This architecture should automatically pick-up any new unit tests that are added inside thetests
directory.