Commit 7a0e3220 authored by Lukas Riedel's avatar Lukas Riedel

Merge branch '105-allow-mini-files-in-unit-tests' into 'master'

Resolve "Allow mini files in unit tests"

Closes #105

See merge request !101
parents a8a3dce4 b5736128
......@@ -168,7 +168,6 @@ test:st:mass_conserve:
- $DUNECONTROL --only=dorie make test_mass_conservation
test:unit-tests:
<<: *test
dependencies:
- build:unit-tests
script:
......@@ -179,15 +178,20 @@ test:unit-tests:
- $DUNECONTROL --only=dorie make unit_tests
# report coverage
- cd $CI_PROJECT_DIR/build-cmake
- mkdir -p test/coverage
- mkdir -p dune/dorie/test/coverage
- ./run-in-dune-env gcovr
--root ../
--html --html-details
-o test/coverage/coverage.html
-o dune/dorie/test/coverage/coverage.html
# run again for coverage report in GitLab
- ./run-in-dune-env gcovr
--root ../
coverage: '/^TOTAL.*\s+(\d+\%)$/'
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/dune/dorie/test
expire_in: 1 day
# --- Deploy jobs ---
deploy:dockerhub-devel: &deploy
......
......@@ -59,6 +59,8 @@
job `build:main` has been removed. The `build:debug` jobs now build the
unit test targets.
* Merge Python packages into single new package `dorie`.
* Executables and files of unit-tests and system-tests are now located in
[`dune/dorie/test/`](dune/dorie/test/) and [`test/`](test/) respectively.
### Deprecated
* The configuration file key `[parameters.interpolation]` is deprecated due to
......
......@@ -44,10 +44,10 @@ dune_require_cxx_standard(MODULE "dorie" VERSION 14)
add_subdirectory("bin")
add_subdirectory("m4")
add_subdirectory("cmake/modules")
add_subdirectory("dune")
add_subdirectory("lib")
add_subdirectory("python")
add_subdirectory("doc")
add_subdirectory("dune")
add_subdirectory("lib")
if(dune-testtools_FOUND)
add_subdirectory("test")
endif()
......
add_subdirectory(interface)
add_subdirectory(solver)
add_subdirectory(impl)
add_subdirectory(test)
if(dune-testtools_FOUND)
add_subdirectory("test")
endif()
add_executable("dorie" dorie.cc)
dune_target_link_libraries(dorie dorie-impl ${DUNE_LIBS})
......
dorie_add_unit_test(SOURCES test-simulation-base.cc NAME test-simulation-base)
\ No newline at end of file
dorie_add_unit_test(SOURCES test-simulation-base.cc NAME test-simulation-base)
# dorie parameterization test
dorie_add_metaini_test(UNIT_TEST
SOURCE test-parameterization.cc
BASENAME test-parameterization
CREATED_TARGETS test-parameterization
METAINI test-parameterization.mini.in
SCRIPT
)
add_custom_target(test-parameterization
COMMAND ctest --output-on-failure --tests-regex ^.+test-parameterization_.+$
)
\ No newline at end of file
......@@ -2,7 +2,7 @@ include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
__name = param
_test_command = run
_asset_path = "${CMAKE_CURRENT_LIST_DIR}"
_asset_path = "${PROJECT_SOURCE_DIR}/test/"
output.fileName = param | unique name
output.outputPath = param | unique name
......
......@@ -67,18 +67,6 @@ add_custom_target(test_mass_conservation
COMMAND ctest --output-on-failure --tests-regex ^.+mass-conservation.+$
)
# dorie parameterization test
dorie_add_metaini_test(UNIT_TEST
SOURCE test-parameterization.cc
BASENAME test-parameterization
CREATED_TARGETS par_target
METAINI param.mini.in
SCRIPT
)
add_custom_target(test_param
COMMAND ctest --output-on-failure --tests-regex ^.+test-parameterization_.+$
)
# dune excludes test targets from 'make all'; undo that here where applicable
set_property(TARGET dorie PROPERTY EXCLUDE_FROM_ALL 0)
set_property(TARGET dorie-rfg PROPERTY EXCLUDE_FROM_ALL 0)
\ No newline at end of file
......@@ -6,6 +6,8 @@
#include <string>
#include <iostream>
#include "test-mass-conservation.hh"
#include <dune/common/exceptions.hh>
#include <dune/common/parametertree.hh>
#include <dune/common/parametertreeparser.hh>
......@@ -14,7 +16,6 @@
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/uggrid.hh>
#include <dune/dorie/test/test-mass-conservation.hh>
#include <dune/dorie/solver/util_grid_creator.hh>
template<int dim, int order>
......
......@@ -24,11 +24,11 @@
#include <dune/pdelab/localoperator/defaultimp.hh>
#include <dune/pdelab/finiteelement/localbasiscache.hh>
#include "../interface/richards_simulation.cc"
#include "../solver/util_typedefs.hh"
#include "../solver/util_grid_creator.hh"
#include "../solver/richards_boundary.hh"
#include "../interface/util.hh"
#include <dune/dorie/interface/richards_simulation.cc>
#include <dune/dorie/solver/util_typedefs.hh>
#include <dune/dorie/solver/util_grid_creator.hh>
#include <dune/dorie/solver/richards_boundary.hh>
#include <dune/dorie/interface/util.hh>
namespace Dune {
namespace Dorie {
......
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