dev:regtesting
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dev:regtesting [2015/11/18 09:37] – Add a note about -j in make test rivanvx | dev:regtesting [2026/10/14 08:41] (current) – fstein | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== CP2K Regression Testing ====== | ====== CP2K Regression Testing ====== | ||
| - | CP2K comes with over 2500 test input files (located in [[src> | + | This page has been moved to [[https://manual.cp2k.org/ |
| - | * all developers complete a regression test before committing any changes to SVN. | + | |
| - | * all users complete a test before using a self-compiled binary for their projects | + | |
| - | + | ||
| - | ==== Dashboard ==== | + | |
| - | A number of regtests are run automatically by various members of our community. The results of these tests are collected centrally at the [[http://dashboard.cp2k.org | + | |
| - | + | ||
| - | ==== Code Coverage ==== | + | |
| - | We aim that the regression test suite covers all the functionality of CP2K. For this purpose we regularly create [[http:// | + | |
| - | + | ||
| - | ===== How does it work? ===== | + | |
| - | + | ||
| - | The regression test suite is run using the [[src> | + | |
| - | It performs the following tasks: | + | |
| - | * update to the current SVN version (including new tests) | + | |
| - | * performs a realclean build of the source | + | |
| - | * executes a list of tests | + | |
| - | * compares the results (outputs) with those of the last known result (reference) | + | |
| - | * produces a summary | + | |
| - | + | ||
| - | + | ||
| - | ===== Running the regtests ===== | + | |
| - | + | ||
| - | ==== Step 0: make based testing ==== | + | |
| - | + | ||
| - | * If you are able to build and run cp2k on the local machine the easiest way is to start the regtesting by running '' | + | |
| - | * Be careful about the value of '' | + | |
| - | * If this fails (e.g. on batch systems), continue with Step 1 else go to interpretation. | + | |
| - | + | ||
| - | ==== Step 1: Preparation ==== | + | |
| - | * Decide on a directory for doing the regtest, there will be plenty of files in this dir (after a while) so make it something like '' | + | |
| - | * Checkout a version of cp2k into '' | + | |
| - | * Set up the arch files so that you can cleanly build cp2k (test this) | + | |
| - | + | ||
| - | ==== Step 2: Running ==== | + | |
| - | < | + | |
| - | $ cp2k/ | + | |
| - | Usage: do_regtest [OPTION] | + | |
| - | Run the CP2K regression test suite | + | |
| - | Example: do_regtest -c my_regtest.conf | + | |
| - | + | ||
| - | General: | + | |
| - | -h, -help, --help | + | |
| - | -c, -config FILE read any of the following configuration switches from FILE. | + | |
| - | -cp2kdir PATH | + | |
| - | + | ||
| - | Svn: | + | |
| - | -svndate DATE | + | |
| - | -nosvn | + | |
| - | -noemptycheck | + | |
| - | + | ||
| - | Build: | + | |
| - | -version VERSION | + | |
| - | -arch ARCH ARCH passed to make. Default: Linux-x86-64-gfortran. | + | |
| - | -quick | + | |
| - | -nobuild | + | |
| - | + | ||
| - | Runtime: | + | |
| - | -mpiranks NRANKS | + | |
| - | -ompthreads NTHREADS | + | |
| - | -maxtasks NPROCS | + | |
| - | -jobmaxtime SECONDS | + | |
| - | + | ||
| - | Testing: | + | |
| - | -noreset | + | |
| - | -skiptest | + | |
| - | -skipdir TESTDIR | + | |
| - | -restrictdir TESTDIR | + | |
| - | -retest | + | |
| - | + | ||
| - | Exit codes: | + | |
| - | 0 clean exit with testing | + | |
| - | 1 | + | |
| - | 3 | + | |
| - | 4 build errors | + | |
| - | 5 | + | |
| - | 6 | + | |
| - | 7 | + | |
| - | 8 | + | |
| - | 100 no svn changes since last run - clean exit without testing | + | |
| - | + | ||
| - | For more information visit: <http://cp2k.org/ | + | |
| - | </ | + | |
| - | + | ||
| - | ==== Step 3: Interpretation ==== | + | |
| - | A test results can be any of the following: | + | |
| - | ^ Test Result | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | + | ||
| - | The last two outcomes generally mean that a bug has been introduced, which requires investigation. | + | |
| - | Since regtesting only yields information relative to a previously known result, it is most useful to do a regtest before and after you make changes. To allow per-test numerical difference higher than that set as a default, add third column in appropriate TEST_FILES file with a relative value of the difference. | + | |
| - | + | ||
| - | + | ||
| - | ===== Adding and Resetting Tests===== | + | |
| - | The test-suite is fully controlled by the following files in the [[src> | + | |
| - | + | ||
| - | ^ File Name ^ Content | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | | '' | + | |
| - | + | ||
dev/regtesting.1447839435.txt.gz · Last modified: (external edit)
