This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
compilation:tests [2015/03/13 15:31] ltavard [Run the tests] |
compilation:tests [2016/11/10 16:49] (current) 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 | ||
< | < | ||
- | 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) | ||
</ | </ | ||
- | or | + | or to run only the tests whose names match the given regular expression |
< | < | ||
- | ctest -R Expresssion | + | ctest -R < |
</ | </ | ||
Line 20: | Line 23: | ||
Run the tests will print some informations: | Run the tests will print some informations: | ||
< | < | ||
- | ============================================================= | + | Start |
- | Test ElmerIce Solvers | + | 1/36 Test #1: Teterousse3a .....................***Passed |
- | + | | |
- | Option []: All tests without email option | + | 2/36 Test #2: Dating ...........................***Passed |
- | ============================================================= | + | |
- | test 1 : | + | |
- | Comparison failed: look at [File_log/OutputBuoyancy.log] for details | + | |
- | test 2 : | + | |
- | test 3 : Contact | + | |
</ | </ | ||
- | [FAILED] in case where difference between results are upper 1E-6\\ | ||
- | [PASSED] in case where there is no difference\\ | ||
- | [PASSED - Diff Time-] where there is a difference with time CPU\\ | ||
- | * In directory '' | + | * In directory '' |
- | This directory is created if there are some troubles in the simulation ('' | + | We can find some files:\\ |
+ | **'' | ||
+ | **'' | ||
+ | ===== How to make cmake test-case ===== | ||
+ | * Create new directory under '' | ||
- | ===== How to make test-case ===== | + | |
- | | + | ☛ In order to test a norm resulting from a solver <N>, add those lines at the end of .sif file |
- | ☛ Note, for the outputs, files named '' | + | < |
- | If do not exist, you can write a script | + | Solver 4 :: Reference Norm = real < |
+ | Solver 4 :: Reference Norm Tolerance = Real < | ||
+ | $fprintf( stderr, "TEST CASE 1\n"); | ||
+ | RUN | ||
+ | $fprintf( stderr, "END TEST CASE 1: Target NRM=< | ||
+ | </ | ||
+ | Equivalent | ||
+ | < | ||
+ | Reference Norm = real < | ||
+ | Reference Norm Tolerance = Real < | ||
+ | </code> | ||
- | * Define how to run the test write a Makefile (named Makefile), that details two targets: | + | * Create CMakeLists.txt file in the test directory with |
- | - '' | + | |
- | - '' | + | |
- | * Create repertory DATA/ in test-case repertory and put your validation-file named '' | + | |
< | < | ||
- | | + | INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/ |
- | Step2Data1 [space] Step2Data2 [space] Step2Data3 | + | CONFIGURE_FILE(< |
+ | ADD_ELMERICETEST_MODULE(< | ||
+ | FILE(COPY ELMERSOLVER_STARTINFO < | ||
+ | ADD_ELMERICE_TEST(< | ||
+ | ADD_ELMERICE_LABEL(< | ||
</ | </ | ||
- | Create a file named '' | + | |
+ | __For label__\\ | ||
+ | If the test is < 10s, < | ||
+ | If the test is > 100s, < | ||
+ | |||
+ | * Create runTest.cmake with | ||
< | < | ||
- | file established: | + | INCLUDE(${TEST_SOURCE}/ |
- | Date | + | EXECUTE_PROCESS(COMMAND < |
- | Author, | + | RUN_ELMERICE_TEST() |
- | | + | |
- | | + | |
</ | </ | ||
- | ---- | + | |
- | See details in '' | + | |
- | ---- | + | |