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: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 | ||
< | < | ||
- | 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 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 | ||
< | < | ||
- | ctest -R <expresssion> | + | ctest -R <expression> |
</ | </ | ||
Line 27: | Line 30: | ||
* In directory '' | * In directory '' | ||
- | We can find some files: | + | We can find some files:\\ |
- | **LastTest.log** with all the details about the tests and \\ | + | **'' |
- | **LastTestsFailed.log** | + | **'' |
- | ===== How to make test-case ===== | + | ===== How to make cmake test-case ===== |
- | * Create new directory under '' | + | * Create new directory under '' |
- | ☛ Note, for the outputs, files named '' | + | |
- | If do not exist, you can write a script to configure their creation see / | + | |
- | * Define | + | * Define |
- | - '' | + | ☛ In order to test a norm resulting from a solver |
- | - '' | + | |
- | * Create repertory DATA/ in test-case repertory and put your validation-file named '' | + | |
< | < | ||
- | | + | Solver 4 :: Reference Norm = real < |
- | Step2Data1 [space] Step2Data2 [space] Step2Data3 .... | + | Solver 4 :: Reference Norm Tolerance = Real < |
+ | $fprintf( stderr, "TEST CASE 1\n" | ||
+ | RUN | ||
+ | $fprintf( stderr, "END TEST CASE 1: Target NRM=< | ||
</ | </ | ||
- | Create a file named '' | + | Equivalent |
< | < | ||
- | file established: | + | Reference Norm = real < |
- | Date | + | Reference Norm Tolerance = Real <tol> |
- | | + | |
- | | + | |
- | | + | |
</ | </ | ||
- | ---- | + | |
- | See details | + | * Create CMakeLists.txt file in the test directory with |
- | ---- | + | < |
+ | INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../test_macros.cmake) | ||
+ | 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() | ||
+ | </ | ||