Commit 3d42ae21 authored by Lukas Riedel's avatar Lukas Riedel

Switch to new CMake test functions. Fix bug in gitlab-ci.yml.

parent 937482a4
......@@ -173,7 +173,7 @@ test:unit-tests:
- build:unit-tests
script:
# install coverage reporter
- $DUNECONTROL --only=dorie bexec "run-in-dune-env python3 -m pip install gcovr"
- $DUNECONTROL --only=dorie bexec "./run-in-dune-env python3 -m pip install gcovr"
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make unit_tests
# report coverage
......
......@@ -11,21 +11,17 @@ function(dorie_add_system_test_dependency test1 test2)
endfunction()
# dorie run: ODE tests
# dorie_add_system_test(dorie ode_homogeneous_sand.mini)
dorie_add_metaini_test(
TARGET dorie
METAINI ode_homogeneous_sand.mini
)
dorie_add_system_test(dorie ode_homogeneous_silt.mini)
dorie_add_system_test(dorie ode_layered.mini)
dorie_add_metaini_test(TARGET dorie METAINI ode_homogeneous_sand.mini)
dorie_add_metaini_test(TARGET dorie METAINI ode_homogeneous_silt.mini)
dorie_add_metaini_test(TARGET dorie METAINI ode_layered.mini)
# add target for ODE tests
add_custom_target(test_run_ode
COMMAND ctest --output-on-failure --tests-regex ^dorie_ode.+$)
# dorie run: Reference tests
dorie_add_system_test(dorie-rfg parfield_muphi.mini)
dorie_add_system_test(dorie muphi.mini)
dorie_add_metaini_test(TARGET dorie-rfg METAINI parfield_muphi.mini)
dorie_add_metaini_test(TARGET dorie METAINI muphi.mini)
set_tests_properties(dorie-rfg_ref_muphi_pfg PROPERTIES FIXTURES_SETUP muphi_ref)
set_tests_properties(dorie_ref_muphi PROPERTIES FIXTURES_REQUIRED muphi_ref)
......@@ -39,8 +35,8 @@ add_custom_target(test_run_ref
# dorie_add_system_test(dorie reference_interpolators.mini)
# dorie in parallel
dorie_add_system_test(dorie parallel_reference.mini)
dorie_add_system_test(dorie parallel_reference_compare.mini)
dorie_add_metaini_test(TARGET dorie METAINI parallel_reference.mini)
dorie_add_metaini_test(TARGET dorie METAINI parallel_reference_compare.mini)
set_tests_properties(dorie_parallel_reference_0000 PROPERTIES FIXTURES_SETUP dorie_par)
set_tests_properties(dorie_parallel_reference_0001 PROPERTIES FIXTURES_SETUP dorie_par)
......@@ -54,34 +50,22 @@ add_custom_target(test_run_parallel
)
# dorie exec tests
dorie_add_system_test(dorie-rfg parfield.mini)
dorie_add_system_test(dorie run.mini)
dorie_add_metaini_test(TARGET dorie-rfg METAINI parfield.mini)
dorie_add_metaini_test(TARGET dorie METAINI run.mini)
set_tests_properties(dorie-rfg_exec_0000 PROPERTIES FIXTURES_SETUP dorie_run)
set_tests_properties(dorie_exec_run PROPERTIES FIXTURES_REQUIRED dorie_run)
dorie_add_system_test(dorie plot.mini)
dorie_add_metaini_test(TARGET dorie METAINI plot.mini)
dorie_add_system_test_dependency(dorie_exec_plot dorie_exec_run)
set_tests_properties(dorie_exec_run PROPERTIES FIXTURES_SETUP dorie_plot)
set_tests_properties(dorie_exec_plot PROPERTIES FIXTURES_REQUIRED dorie_plot)
dorie_add_system_test(dorie create.mini)
dorie_add_metaini_test(TARGET dorie METAINI create.mini)
add_custom_target(test_dorie_exec
COMMAND ctest --output-on-failure --tests-regex ^.+_exec.+$
)
# dorie mass conservation
# configure_file(mass_conservation.mini.in ${CMAKE_CURRENT_SOURCE_DIR}/mass_conservation.mini)
# dune_add_system_test(
# SOURCE test-mass-conservation.cc
# BASENAME test-mass-conservation
# CREATED_TARGETS mc_target
# INIFILE mass_conservation.mini
# )
# message(STATUS "target called ${mc_target}")
# dune_target_link_libraries(${mc_target} ${DUNE_LIBS})
dorie_add_metaini_test(
SOURCE test-mass-conservation.cc
BASENAME mass-conservation
......@@ -102,7 +86,6 @@ dorie_add_metaini_test(UNIT_TEST
METAINI param.mini
SCRIPT
)
message("Created targets: ${par_target}")
add_custom_target(test_param
COMMAND ctest --output-on-failure --tests-regex ^.+test-parameterization_.+$
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment