DunePythonTestCommand¶
Helpers for integrating Python-based tests into the DUNE test infrastructure.
- dune_python_add_test¶
Register a Python script or module as a DUNE test.
dune_python_add_test( [SCRIPT <script...>] [MODULE <module...>] [LABELS <labels...>] [WORKING_DIRECTORY <dir>] [TIMEOUT <seconds>] [NAME <name>] ... )
SCRIPTScript path to execute with the Python interpreter. Pass the script path only, not the interpreter itself. Either
SCRIPTorMODULEmust be provided.MODULEPython module to execute with
python -m. EitherSCRIPTorMODULEmust be provided.LABELSLabels attached to the test. The label
pythonis added by default. The labels are forwarded todune_add_test().WORKING_DIRECTORYWorking directory used for the command. The default is the current build directory.
TIMEOUTTimeout in seconds. This overrides the default ctest timeout.
NAMEExplicit ctest name for the generated test. If omitted, the name is derived from the command and working directory.
The command integrates a Python-based test into the DUNE build system so it is built through
test_pythonand executed throughctest. Unparsed arguments are forwarded todune_add_test().