dune_python_add_testΒΆ
dune_python_add_test(
[SCRIPT script1 [script2 ...]]
[MODULE module1 [module2 ...]]
[INTERPRETER interpreter]
[WORKING_DIRECTORY dir]
[NAME name]
)
- SCRIPT
The script to execute using the python interpreter. It will be executed during
make test_python
and during ctest. You are required to either pass SCRIPT or MODULE.Note
The script will be executed using
${Python3_EXECUTABLE} SCRIPT
. If the INTERPRETER option is given, that interpreter is used instead.- MODULE
The Python module to be executed. It will be executed during
make test_python
and during ctest. You are required to either pass SCRIPT or MODULE.Note
The script will be executed using
${Python3_EXECUTABLE} -m MODULE
. If the INTERPRETER option is given, that interpreter is used instead.- INTERPRETER
The Python interpreter to use for this test. It defaults to the one found by CMake.
- WORKING_DIRECTORY
The working directory of the command. Defaults to the current build directory.
- NAME
A name to identify this test in ctest. Names must be unique throughout the project. If omitted, defaults to mangling of the command.
Integrates a python testing framework command into the Dune
build system. Added commands are run, when the target
test_python
is built and during ctest
.