Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
compilation:tests [2015/03/13 15:40]
ltavard [Results]
compilation:tests [2016/11/10 16:49]
ltavard
Line 9: Line 9:
 After building your installation of Elmer/Ice, you run the tests with the command line After building your installation of Elmer/Ice, you run the tests with the command line
 <code> <code>
-ctest+ctest -L elmerice (run all Elmer/Ice tests) 
 +ctest -L elmerice-fast (set of fast Elmer/Ice tests) 
 +ctest -L elmerice-long (set of slow Elmer/Ice tests) 
 +ctest -L netcdf (set of test using NetCDF library)
 </code> </code>
 or to run only the tests whose names match the given regular expression or to run only the tests whose names match the given regular expression
 <code> <code>
-ctest -R <expresssion>+ctest -R <expression>
 </code> </code>
  
Line 27: Line 30:
  
   * In directory ''build/elmerice/Testing/Temporary/''   * In directory ''build/elmerice/Testing/Temporary/''
-We can find some files: +We can find some files:\\ 
-**LastTest.log** with all the details about the tests and \\ +**''LastTest.log ''** with all the details about the tests and \\ 
-**LastTestsFailed.log**  with the list of failed tests. +**''LastTestsFailed.log''**  with the list of failed tests. 
-===== How to make test-case ===== +===== How to make cmake test-case ===== 
-  * Create new directory under ''elmerice/Tests/'', define your analysis (.SIF, mesh files, ...). +  * Create new directory under ''elmerice/Tests/''
-☛ Note, for the outputs, files named ''**results.dat**'' and ''**result.dat.names**'' __have to be created__. \\ +
-If do not exist, you can write a script to configure their creation see /Tests/InvMeth_AdjBeta for example).+
  
-  * Define how to run the test write a Makefile (named Makefile)that details two targets:\\ +  * Define your analysis: .SIF filemesh files, f-90 files and ELMERSOLVER_STARTINFO file 
-''run'': how to run the test\\ +☛ In order to test a norm resulting from a solver <N>, add those lines at the end of .sif file
-- ''clean'': how to clean up if successfull. +
-  * Create repertory DATA/ in test-case repertory and put your validation-file named ''valid_<NameDirectory>.txt''+
 <code> <code>
-     Step1Data1 [space] Step1Data2 [space] Step1Data3 .... +Solver 4 :: Reference Norm = real <norm> 
-     Step2Data1 [space] Step2Data2 [space] Step2Data3 ....+Solver 4 :: Reference Norm Tolerance = Real <tol> 
 +$fprintf( stderr, "TEST CASE 1\n"); 
 +RUN 
 +$fprintf( stderr, "END TEST CASE 1: Target NRM=<norm>,EPS=<tol>\n" );
 </code> </code>
-Create a file named ''version'' to describe author and date of the test, Research Institute & Cluster, Elmer(/Ice) version:+Equivalent to those lines inside the solver block to be tested
 <code> <code>
-                 file established: +Reference Norm = real <norm> 
-                 Date +Reference Norm Tolerance = Real <tol>
-                 Author,Institute +
-                 Cluster +
-                 Revision ID+
 </code> </code>
----- + 
-See details in ''[ELMER_TRUNK]/elmerice/Tests/ElmerIceSolver_test_how-to.txt''+  * Create CMakeLists.txt file in the test directory with 
-----+<code> 
 +INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) 
 +CONFIGURE_FILE(<sif_name>.sif <sif_name>.sif COPYONLY) 
 +ADD_ELMERICETEST_MODULE(<test_name> <module_name> <module_source.f90>
 +FILE(COPY ELMERSOLVER_STARTINFO <file1> <file2> <directory1> ...DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/") 
 +ADD_ELMERICE_TEST(<test_name>
 +ADD_ELMERICE_LABEL(<test_name> <label>
 +</code> 
 + 
 +__For label__\\ 
 +If the test is < 10s, <label>=elmerice-fast \\ 
 +If the test is > 100s, <label>=slow \\ 
 + 
 +  * Create runTest.cmake with 
 +<code> 
 +INCLUDE(${TEST_SOURCE}/../test_macros.cmake) 
 +EXECUTE_PROCESS(COMMAND <command_name> <arg1> <arg2> ...) 
 +RUN_ELMERICE_TEST() 
 +</code> 
  
compilation/tests.txt · Last modified: 2016/11/10 16:49 by ltavard
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0