Skip to content

Commit

Permalink
expand on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroBarker committed Sep 27, 2024
1 parent 67e3613 commit e9f92ad
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions doc/sphinx/src/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.. _singularity-eos: https://lanl.github.io/singularity-eos
.. _Catch2: https://github.com/catchorg/Catch2

Contributing
=============================
Expand Down Expand Up @@ -47,6 +48,16 @@ useful output. For example:
CFM=clang-format-12 VERBOSE=1 ./scripts/bash/format.sh
In order for a pull request to merge, we require:

- Provide a thorough summary of changes, especially if they are breaking changes
- Obey style guidleines (format with ``clang-format`` and pass the necessary test)
- Pass the existing test suite
- Have at least one approval from a Maintainer
- If Applicable:
- Write new tests for new features or bugs
- Include or update documentation in ``doc/``

Test Suite
----------

Expand All @@ -59,20 +70,33 @@ and ensure a consistent code style.
Adding Tests
````````````

There are two primary categories of tests written in ``Phoebus``:
.. todo::

This section is incomplete.

* Unit tests
* Regression tests
There are two primary categories of tests written in ``Phoebus``:
unit tests and regression tests.

Unit
^^^^

Regression
^^^^
Unit tests live in ``tst/unit/``. They are implemented using the
`Catch2`_ unit testing framework. They are integrated with ``cmake``
and can be run, when enabled, with ``ctest``. There are a few necessary ``cmake``
configurations to beuild tests:

.. todo::
========================== ========= =======================================
Option Default Description
========================== ========= =======================================
PHOEBUS_ENABLE_UNIT_TESTS OFF Enables Catch2 unit tests
PHOEBUS_ENABLE_DOWNLOADS OFF Enables unit tests using tabulated EOS
========================== ========= =======================================

This section is incomplete.
Regression
^^^^^^^^^^
Regression tests run existing simulations and test against saved output
in order to verify sustained capabilities. They are implemented in Python in
``test/regression/``.

Expectations for code review
-----------------------------
Expand Down

0 comments on commit e9f92ad

Please sign in to comment.