Changes between Version 39 and Version 40 of CMakeFAQ


Ignore:
Timestamp:
01/10/13 15:08:06 (6 years ago)
Author:
briadam
Comment:

Update testing procedure information

Legend:

Unmodified
Added
Removed
Modified
  • CMakeFAQ

    v39 v40  
    215215 
    216216=== Recommended Process === 
    217  * Files required for testing, e.g., dakota_*.in, *.dat, various scripts, will be copied from test/ in the source tree to test/ in the build tree at configure time.  (If a needed file isn't copied, it must be called out in test/CMakeLists.txt.) 
     217 * Files required for testing, e.g., dakota_*.in, *.dat, various scripts, will be copied from test/ in the source tree to per-test subdirectories in test/ in the build tree at configure time.  (If a needed file isn't copied, it must be called out in test/CMakeLists.txt.  If a file is added, you must rerun CMake to update dependencies) 
    218218 * Test executables (drivers) are built in test/ in the binary tree at make time 
    219219 * There are a couple of ways to perform testing: 
    220   1. Change into test in the build tree and run dakota_test.perl as usual 
    221   1. Run ctest, either from the top level or from the test directory (can't currently run ctest in parallel due to restart) 
    222     * When using CTest you can run select tests using globs or regular expressions (see http://www.cmake.org/cmake/help/ctest-2-8-docs.html) 
    223     * ''Experimental:'' You may optionally run tests in parallel with {{{ctest -j N}}}, where {{{N}}} is the number of parallel processes.  This will misorder the dakota_diffs.out and may result in file collisions (hence experimental). 
     220  1. Change into test in the build tree and run dakota_test.perl as usual, specifying the name of an input file.  While the file won't exist in build/test, it will be found from the source tree. 
     221  1. '''Preferred:''' Run ctest, either from the top level or (preferrably) from the test directory (see http://cmake.org/cmake/help/v2.8.5/ctest.html for options) 
     222    * You may run select tests using globs or regular expressions, e.g., {{{-R dakota_ pdakota_}}}.  Note that parallel tests are named separately as pdakota_ 
     223    * You may run test files concurrently with {{{-j N}}} 
     224    * There are some make targets to help generate the usual diffs files from the subdirectories.  A typical full process might look like: 
     225{{{ 
     226cd build && make 
     227cd test 
     228# clean removes all diffs files, otherwise files will be appended to:  
     229make dakota-diffs-clean 
     230ctest -j 4 -R dakota_ -R pdakota_ 
     231make dakota-diffs 
     232}}} 
     233    * The usual dakota_diffs.out and dakota_pdiffs.out will results, as will a new file dakota_results.log, with a concise summary. 
    224234 * If you change a source dir test input file (or add one?) re-run make at least in test in build tree 
    225235