CMakeLists.txt 3.53 KB
Newer Older
Dion Haefner's avatar
Dion Haefner committed
1
message(STATUS "Handling system tests")
2

3
4
5
6
7
8
9
10
# dorie dummy simulation transport test
dorie_add_metaini_test(
	SOURCE test-simulation-dummy-transport.cc
	BASENAME test-simulation-dummy-transport
	CREATED_TARGETS test-simulation-dummy-transport
	METAINI test-simulation-dummy-transport.mini.in
	SCRIPT dune_execute.py
)
11
target_link_libraries(${test-simulation-dummy-transport} spdlog)
12
13
14
15
16
17

add_custom_target(test-simulation-dummy-transport
	COMMAND ctest --output-on-failure --tests-regex ^.+test-simulation-dummy-transport_.+$
)


18
# dorie run: ODE tests
Lukas Riedel's avatar
Lukas Riedel committed
19
20
21
dorie_add_metaini_test(TARGET dorie METAINI ode_homogeneous_sand.mini.in)
dorie_add_metaini_test(TARGET dorie METAINI ode_homogeneous_silt.mini.in)
dorie_add_metaini_test(TARGET dorie METAINI ode_layered.mini.in)
22

23
24
# add target for ODE tests
add_custom_target(test_run_ode
25
26
	COMMAND ctest --output-on-failure --tests-regex ^dorie_ode.+$)
add_dependencies(test_run_ode prepare_testing)
27

28
# dorie run: Reference tests
Lukas Riedel's avatar
Lukas Riedel committed
29
dorie_add_metaini_test(TARGET dorie METAINI muphi.mini.in)
30
31
32
33
34

add_custom_target(test_run_ref
	COMMAND ctest --output-on-failure --tests-regex ^.+_ref_.+$
)

35
# dorie run: Transport coupling tests
36
dorie_add_metaini_test(
37
38
	TARGET dorie
	METAINI test-transport-coupling.mini.in
39
)
40

41
42
add_custom_target(test-transport-coupling
	COMMAND ctest --output-on-failure --tests-regex ^.+test-transport-coupling.+$
43
44
)

Lukas Riedel's avatar
Lukas Riedel committed
45
46
47
48
# dorie_add_metaini_test(TARGET dorie METAINI reference_2d.mini.in)
# dorie_add_metaini_test(TARGET dorie METAINI reference_3d.mini.in)
# dorie_add_metaini_test(TARGET dorie METAINI reference_evaporation.mini.in)
# dorie_add_metaini_test(TARGET dorie METAINI reference_interpolators.mini.in)
49
50

# dorie in parallel
Lukas Riedel's avatar
Lukas Riedel committed
51
52
dorie_add_metaini_test(TARGET dorie METAINI parallel_reference.mini.in)
dorie_add_metaini_test(TARGET dorie METAINI parallel_reference_compare.mini.in)
53

54
set_tests_properties(dorie_parallel_reference PROPERTIES FIXTURES_SETUP dorie_par)
55
56
57
58
59
60
set_tests_properties(dorie_parallel_reference_compare_0000 PROPERTIES FIXTURES_REQUIRED dorie_par)
set_tests_properties(dorie_parallel_reference_compare_0001 PROPERTIES FIXTURES_REQUIRED dorie_par)

add_custom_target(test_run_parallel
	COMMAND ctest --output-on-failure --tests-regex ^dorie_parallel_.+$
)
61
add_dependencies(test_run_parallel prepare_testing)
62

63
# dorie exec tests
Lukas Riedel's avatar
Lukas Riedel committed
64
dorie_add_metaini_test(TARGET dorie METAINI run.mini.in)
65

Lukas Riedel's avatar
Lukas Riedel committed
66
dorie_add_metaini_test(TARGET dorie METAINI plot.mini.in)
67
68
set_tests_properties(dorie_exec_run PROPERTIES FIXTURES_SETUP dorie_plot)
set_tests_properties(dorie_exec_plot PROPERTIES FIXTURES_REQUIRED dorie_plot)
69

Lukas Riedel's avatar
Lukas Riedel committed
70
dorie_add_metaini_test(TARGET dorie METAINI create.mini.in)
71

72
73
add_custom_target(test_dorie_exec
	COMMAND ctest --output-on-failure --tests-regex ^.+_exec.+$
74
75
)

76
dorie_add_metaini_test(
77
	SOURCE test-mass-conservation.cc
78
	BASENAME mass-conservation
79
	CREATED_TARGETS mc_target
Lukas Riedel's avatar
Lukas Riedel committed
80
	METAINI mass_conservation.mini.in
81
	SCRIPT dune_execute.py
82
)
83
target_link_libraries(${mc_target} spdlog)
84
85

add_custom_target(test_mass_conservation
86
	COMMAND ctest --output-on-failure --tests-regex ^.+mass-conservation.+$
87
88
)

89
90
91
92
93
94
95
dorie_add_metaini_test(
	SOURCE test-conforming-flux-jumps.cc
	BASENAME conforming-flux-jumps
	CREATED_TARGETS conforming_flux_jumps
	METAINI conforming_flux_jumps.mini.in
	SCRIPT dune_execute.py
)
96
target_link_libraries(${conforming_flux_jumps} spdlog)
97
98
99
100
101
102

add_custom_target(test_conforming_flux_jumps
	COMMAND ctest --output-on-failure --tests-regex ^.+conforming-flux-jumps.+$
)


103
104
# dune excludes test targets from 'make all'; undo that here where applicable
set_property(TARGET dorie PROPERTY EXCLUDE_FROM_ALL 0)
Lukas Riedel's avatar
Lukas Riedel committed
105
set_property(TARGET dorie-rfg PROPERTY EXCLUDE_FROM_ALL 0)