Skip to content
Snippets Groups Projects
Commit 99b08b62 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Add application folder and allow non-test system tests

parent e7ddaedf
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ add_subdirectory(python)
add_subdirectory(test)
add_subdirectory(bin)
add_subdirectory(applications)
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
add_subdirectory(poisson_dg)
dune_add_formcompiler_system_test(UFLFILE poisson_dg.ufl
BASENAME app_poisson_dg
INIFILE poisson_dg.mini
NO_TESTS
)
__name = app_poisson_dg
lowerleft = 0.0 0.0
upperright = 1.0 1.0
elements = 32 32
elementType = simplical
[wrapper.vtkcompare]
name = {__name}
extension = vtu
cell = hexahedron
x = SpatialCoordinate(cell)
f = -6.
g = x[0]*x[0] + x[1]*x[1] + x[2]*x[2]
V = FiniteElement("DG", cell, 1)
u = TrialFunction(V)
v = TestFunction(V)
n = FacetNormal(cell)('+')
gamma = 1.0
theta = 1.0
r = inner(grad(u), grad(v))*dx \
+ inner(n, avg(grad(u)))*jump(v)*dS \
+ gamma*jump(u)*jump(v)*dS \
+ theta*jump(u)*inner(avg(grad(v)), n)*dS \
- inner(n, grad(u))*v*ds \
+ gamma*u*v*ds \
- theta*u*inner(grad(v), n)*ds \
- f*v*dx \
+ theta*g*inner(grad(v), n)*ds \
- gamma*g*v*ds
forms = [r]
# System testing for generated executables. All ideas taken from dune-testtools.
# System testing for generated executables. All ideas taken from dune-testtools.
#
function(dune_add_formcompiler_system_test)
# parse arguments
set(OPTION DEBUG)
set(OPTION DEBUG NO_TESTS)
set(SINGLE INIFILE BASENAME SCRIPT UFLFILE)
set(MULTI CREATED_TARGETS)
cmake_parse_arguments(SYSTEMTEST "${OPTION}" "${SINGLE}" "${MULTI}" ${ARGN})
......@@ -60,17 +60,19 @@ function(dune_add_formcompiler_system_test)
add_dependencies(${SYSTEMTEST_BASENAME} ${tname})
endif()
# and have it depend on the metatarget build_tests
add_dependencies(build_tests ${tname})
if(NOT ${SYSTEMTEST_NO_TESTS})
# and have it depend on the metatarget build_tests
add_dependencies(build_tests ${tname})
_add_test(NAME ${tname}
COMMAND ${CMAKE_BINARY_DIR}/dune-env ${SYSTEMTEST_SCRIPT}
--exec ${tname}
--ini "${CMAKE_CURRENT_BINARY_DIR}/${inifile}"
--source ${CMAKE_CURRENT_SOURCE_DIR}
)
_add_test(NAME ${tname}
COMMAND ${CMAKE_BINARY_DIR}/dune-env ${SYSTEMTEST_SCRIPT}
--exec ${tname}
--ini "${CMAKE_CURRENT_BINARY_DIR}/${inifile}"
--source ${CMAKE_CURRENT_SOURCE_DIR}
)
set_tests_properties(${tname} PROPERTIES SKIP_RETURN_CODE 77)
set_tests_properties(${tname} PROPERTIES TIMEOUT 20)
set_tests_properties(${tname} PROPERTIES SKIP_RETURN_CODE 77)
set_tests_properties(${tname} PROPERTIES TIMEOUT 20)
endif()
endforeach()
endfunction()
\ No newline at end of file
endfunction()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment