mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
updated test suite readme
This commit is contained in:
parent
3187698adc
commit
8da770c4cf
1 changed files with 24 additions and 16 deletions
|
|
@ -4,29 +4,37 @@ OpenMC Test Suite
|
|||
|
||||
The purpose of this test suite is to ensure that OpenMC compiles using various
|
||||
combinations of compiler flags and options and that all user input options can
|
||||
be used successfully without breaking the code. The test suite is by no means
|
||||
complete and should not be viewed as a comprehensive unit test suite will full
|
||||
coverage. Until more effort can be put into actual unit testing, this suite is a
|
||||
simple means of making sure that new features added into the code don't break
|
||||
existing features.
|
||||
be used successfully without breaking the code. The test suite is based on
|
||||
regression or integrated testing where different types of input files are
|
||||
configured and the full OpenMC code is executed. Results from simulations
|
||||
are compared with expected results. The test suite is comprised of many
|
||||
build configurations (e.g. debug, mpi, hdf5) and the actual tests which
|
||||
reside in sub-directories in the tests directory.
|
||||
|
||||
The test suite is designed to run with the third-party Python package
|
||||
nose_. Running the test suite is as simple as going to the tests/ directory and
|
||||
running:
|
||||
The test suite is designed to integrate with cmake using ctest_. To run the
|
||||
full test suite run:
|
||||
|
||||
.. sh::
|
||||
nosetests
|
||||
python run_tests.py
|
||||
|
||||
However, usually testing is split into two parts: compilation and running. To
|
||||
run the compilation tests, use:
|
||||
A subset of build configurations and/or tests can be run. To see how to use
|
||||
the script run:
|
||||
|
||||
.. sh::
|
||||
nosetests test_compile
|
||||
python run_tests.py --help
|
||||
|
||||
Then, to run all the normal tests (which require that an OpenMC executable is
|
||||
already built):
|
||||
As an example, say we want to run all tests with debug flags only on tests
|
||||
that have cone and plot in their name. Also, we would like to run this on
|
||||
4 processors. We can run:
|
||||
|
||||
.. sh::
|
||||
nosetests --exclude-dir=test_compile
|
||||
python run_tests.py -j 4 -C debug -R "cone|plot"
|
||||
|
||||
.. _nose: https://nose.readthedocs.org
|
||||
Note that standard regular expression syntax is used for selecting build
|
||||
configurations and tests. To print out a list of build configurations, we
|
||||
can run:
|
||||
|
||||
.. sh::
|
||||
python run_tests.py -p
|
||||
|
||||
.. _ctest: http://www.cmake.org/cmake/help/v2.8.8/ctest.html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue