diff --git a/docs/src/developers.md b/docs/src/developers.md index a1326a85..0ead48c8 100644 --- a/docs/src/developers.md +++ b/docs/src/developers.md @@ -39,4 +39,42 @@ To create a new libtrixi release, follow these steps: whether the current state of the repository is identical to the latest release or not. The next development version is obtained by increasing the *patch* number and appending `-pre`. For example, if you just released version `v0.1.1`, the next development version - would be `v0.1.2-pre`. \ No newline at end of file + would be `v0.1.2-pre`. + + +## Testing + +### Testing the C interface + +For testing the C interface of libtrixi we rely on [GoogleTest](https://google.github.io/googletest). +The tests are contained in `cpp`-files located under `test/c`. They are processed by `cmake` and made available via +`ctest`, provided the options +``` +-DENABLE_TESTING=ON -DJULIA_PROJECT_PATH= +``` +are passed to `cmake` during configuration. +The executables can then be found under `/test/c` (they will not be installed). To run them, execute +``` +ctest [-V] [-R ] +``` +from `/test/c` or the top-level directory ``. +The optional argument `-V` turns on verbose output, and `-R` lets you specify a regular expression to select specific tests. +A list of available tests can be obtained via `ctest -N`. + +### Testing the Fortran interface + +For testing the Fortran interface of libtrixi we rely on [test-drive](https://github.com/fortran-lang/test-drive), +which integrates with `cmake` and `ctest` as well. The tests are contained in `f90`-files under `test/fortran`. Usage is +analogous to the C interface. + +### Testing the Julia interface + +For testing the Julia interface of libtrixi, which is contained in the Julia package `LibTrixi.jl`, we rely on +[Julia's testing infrastructure](https://docs.julialang.org/en/v1/stdlib/Test/). There is a dedicated test project, +located under `LibTrixi.jl/test`, which contains `runtest.jl` and further `jl`-files containing the actual tests. +Invoke via +``` +JULIA_DEPOT_PATH= \ +LIBTRIXI_DEBUG=all \ + julia --project=./LibTrixi.jl -e 'import Pkg; Pkg.test()' +```