diff --git a/testsuite/README.md b/testsuite/README.md index b120d2af..99207ee7 100644 --- a/testsuite/README.md +++ b/testsuite/README.md @@ -1 +1,18 @@ -This directory contains the CONQUEST test suite. +# CONQUEST test suite. + +This directry currently contains two end-to-end tests + + - `test_001_bulk_Si_1proc_Diag` + - `test_002_bulk_Si_1proc_OrderN` + +for Conquest, and a simple python pytest script for checking the correctness of the outputs. + +## Usage + +To run the tests + + 1. Compile Conquest with `make` in `../src` + 2. Run the `Conquest` executable in the subdirectories named `test_00*` + 3. Check the correctness of the outputs with `pytest` + +These steps can be run automatically using the script `run_conquest_test.sh` in this directry. diff --git a/testsuite/run_conquest_tests.sh b/testsuite/run_conquest_tests.sh new file mode 100755 index 00000000..5916ae63 --- /dev/null +++ b/testsuite/run_conquest_tests.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# This script checks if the Conquest executable exists in ../bin and +# compiles it if it does not exist. Then it executes all tests found +# in directories named test_000_* to test_999_*, and runs pytest to +# check the results using test_check_output.py +# +# You can pass in the number of parallel processes as a command line +# argument, by default it is 1. + +NP=${1:-1} +FILE=../bin/Conquest +if [ ! -f "$FILE" ]; then + (cd ../src; make -j $NP) +fi + +for dn in $(ls -d test_[0-9][0-9][0-9]_*) +do + (cd $dn; mpirun -np $NP ../../bin/Conquest) +done + +pytest test_check_output.py