Skip to content
40 changes: 39 additions & 1 deletion docs/src/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
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=<libtrixi-julia_directory>
```
are passed to `cmake` during configuration.
The executables can then be found under `<build_directory>/test/c` (they will not be installed). To run them, execute
```
ctest [-V] [-R <regex>]
```
from `<build_directory>/test/c` or the top-level directory `<build_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=<julia-depot_directory> \
LIBTRIXI_DEBUG=all \
julia --project=./LibTrixi.jl -e 'import Pkg; Pkg.test()'
```