d26859d3bf | ||
---|---|---|
.. | ||
test_001_bulk_Si_1proc_Diag | ||
test_002_bulk_Si_1proc_OrderN | ||
test_003_bulk_BTO_polarisation | ||
.gitignore | ||
README.md | ||
run_conquest_tests.sh | ||
test_check_output.py |
README.md
CONQUEST test suite.
This directory currently contains three end-to-end tests
test_001_bulk_Si_1proc_Diag
test_002_bulk_Si_1proc_OrderN
test_003_bulk_BTO_polarisation
for Conquest, and a simple python pytest script for checking the correctness of the outputs.
Usage
To run the tests
- Compile Conquest with
make
in../src
- Run the
Conquest
executable in the subdirectories namedtest_00*
- Check the correctness of the outputs with
pytest
These steps can be run automatically using the script run_conquest_test.sh
in this directry.
Contributing
To add new tests
- Add input files and a sample output file (run with
IO.Iprint 0
and namedConquest_out.ref
) in a new subdirectory under testsuite. The naming convention is test directory names start withtest_
followed by a running index with three digits, e.g.004
. - Add a new test to
TestClass
intest_check_output.py
. You can use one of the current tests, namedtest_XXX
as templates.- Update the directory name passed to
path
- Update the list of parameters in the
@pytest.mark.parametrize
decorator. Thekey
parameters correspond to fields in theConquest_out
file to be checked against the reference. - If necessary, update the
read_conquest_out()
function to parse a new field from the output. - If necessary, update the
precision()
function to return a custom precision for a given value of thekey
parameter.
- Update the directory name passed to
- Add it as a new
Run test XXX
step to the CI workflow