Labels in consistency tests with ctest

Discussion about building and installing Elmer
Post Reply
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Labels in consistency tests with ctest

Post by raback »

Hi All,

We have recently introduced labels in cmake to make it easier to pick or exclude subset of tests. The final motivation came from merging Elmer/Ice tests into elmer devel branch. Many of those tests take a very long to to compute.

Currently the following labels are introduced:
- quick: tests running in ~1s or less (171 tests)
- slow: tests running in ~100s or less (11 tests)
- benchmark: representative set of medium fast tests (14 tests)
- elmerice: tests of elmerice

To run all the quick tests after compilation say

Code: Select all

ctest -L quick 
To run all except slow tests with four cores say

Code: Select all

ctest -j4 -LE slow 
For information of the options look at the ctest --help.

The way to introduce the labels is to append in the test directory "testname" for file CMakeLists.txt:

Code: Select all

ADD_ELMER_LABEL(testname label)
We could introduce further labels. For example, for given application fields.
- cfd: computational fluid dynamics
- cem: computational electromagnetics
- csm: computational solid mechanics

Any ideas on what kind of labels to introduce are welcome.

-Peter
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Labels in consistency tests with ctest

Post by annier »

Hi Peter,
-It is nice to know that there are now options to run the desired tests according to the "fastness" of the test example as well as "computational area or field (recent future)".





Yours Sincerely
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Post Reply