This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
compilation:tests [2014/01/31 10:13] ltavard [Tests] |
compilation:tests [2016/11/10 16:49] (current) ltavard |
||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
====== Tests ====== | ====== Tests ====== | ||
- | As of revision 6515, directory | + | Recently, Elmer' |
+ | |||
+ | Directory | ||
+ | \\ | ||
+ | For some test-cases, more tools (.SIF, grd) are available under '' | ||
+ | ===== Run the tests ===== | ||
+ | After building your installation of Elmer/Ice, you run the tests with the command line | ||
+ | < | ||
+ | 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 to run only the tests whose names match the given regular expression | ||
+ | < | ||
+ | ctest -R < | ||
+ | </ | ||
+ | |||
+ | ===== Results ===== | ||
+ | * On screen | ||
+ | Run the tests will print some informations: | ||
+ | < | ||
+ | Start 1: Teterousse3a | ||
+ | 1/36 Test #1: Teterousse3a .....................***Passed | ||
+ | Start 2: Dating | ||
+ | 2/36 Test #2: Dating ...........................***Passed | ||
+ | </ | ||
+ | |||
+ | * In directory '' | ||
+ | We can find some files:\\ | ||
+ | **'' | ||
+ | **'' | ||
+ | ===== How to make cmake test-case ===== | ||
+ | * Create new directory under '' | ||
+ | |||
+ | * Define your analysis: .SIF file, mesh files, f-90 files and ELMERSOLVER_STARTINFO file | ||
+ | ☛ In order to test a norm resulting from a solver <N>, add those lines at the end of .sif file | ||
+ | < | ||
+ | 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 to those lines inside the solver block to be tested | ||
+ | < | ||
+ | Reference Norm = real < | ||
+ | Reference Norm Tolerance = Real < | ||
+ | </ | ||
+ | |||
+ | * Create CMakeLists.txt file in the test directory with | ||
+ | < | ||
+ | INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/ | ||
+ | CONFIGURE_FILE(< | ||
+ | ADD_ELMERICETEST_MODULE(< | ||
+ | FILE(COPY ELMERSOLVER_STARTINFO < | ||
+ | ADD_ELMERICE_TEST(< | ||
+ | ADD_ELMERICE_LABEL(< | ||
+ | </ | ||
+ | |||
+ | __For label__\\ | ||
+ | If the test is < 10s, < | ||
+ | If the test is > 100s, < | ||
+ | |||
+ | * Create runTest.cmake with | ||
+ | < | ||
+ | INCLUDE(${TEST_SOURCE}/ | ||
+ | EXECUTE_PROCESS(COMMAND < | ||
+ | RUN_ELMERICE_TEST() | ||
+ | </ | ||