Commit daecb108 authored by Timo Koch's avatar Timo Koch
Browse files

[cmake] Use labels to mark unit tests

parent beac2a04
# build the tests for the bounding box tree
dune_add_test(NAME test_bboxtree_dim1
SOURCES test_bboxtree.cc
COMPILE_DEFINITIONS WORLD_DIMENSION=1)
COMPILE_DEFINITIONS WORLD_DIMENSION=1
LABELS unit)
dune_add_test(NAME test_bboxtree_dim2
SOURCES test_bboxtree.cc
COMPILE_DEFINITIONS WORLD_DIMENSION=2)
COMPILE_DEFINITIONS WORLD_DIMENSION=2
LABELS unit)
dune_add_test(NAME test_bboxtree_dim3
SOURCES test_bboxtree.cc
COMPILE_DEFINITIONS WORLD_DIMENSION=3)
COMPILE_DEFINITIONS WORLD_DIMENSION=3
LABELS unit)
dune_add_test(NAME test_geometry_fracture
SOURCES test_geometry_fracture.cc
CMAKE_GUARD dune-foamgrid_FOUND)
CMAKE_GUARD dune-foamgrid_FOUND
LABELS unit)
# symlink the input file in the build directory
dune_symlink_to_source_files(FILES "network1d.msh" "network2d.msh" "fracture.msh")
......
dune_add_test(SOURCES test_1d3d_intersection.cc)
dune_add_test(SOURCES test_2d3d_intersection.cc)
dune_add_test(SOURCES test_graham_convex_hull.cc)
dune_add_test(SOURCES test_makegeometry.cc)
dune_add_test(SOURCES test_1d3d_intersection.cc LABELS unit)
dune_add_test(SOURCES test_2d3d_intersection.cc LABELS unit)
dune_add_test(SOURCES test_graham_convex_hull.cc LABELS unit)
dune_add_test(SOURCES test_makegeometry.cc LABELS unit)
#install sources
install(FILES
......
# build the test for the property system
dune_add_test(SOURCES test_math.cc)
dune_add_test(SOURCES test_math.cc
LABELS unit)
#install sources
install(FILES
......
dune_add_test(SOURCES test_loggingparametertree.cc)
dune_add_test(SOURCES test_loggingparametertree.cc
LABELS unit)
dune_symlink_to_source_files(FILES "params.input")
#install sources
......
# build the test for the property system
dune_add_test(SOURCES test_propertysystem.cc)
dune_add_test(SOURCES test_propertysystem.cc
LABELS unit)
# build the test for the property system using the old macros (deprecated)
dune_add_test(SOURCES test_propertysystem_macros.cc)
dune_add_test(SOURCES test_propertysystem_macros.cc
LABELS unit)
#install sources
install(FILES
......
dune_add_test(SOURCES test_spline.cc)
dune_add_test(SOURCES test_spline.cc
LABELS unit)
#install sources
install(FILES
......
dune_add_test(SOURCES test_timeloop.cc)
dune_add_test(SOURCES test_timeloop.cc
LABELS unit)
dune_add_test(SOURCES test_isvalid.cc)
dune_add_test(SOURCES test_isvalid.cc
LABELS unit)
dune_add_test(NAME test_boxfvgeometry
SOURCES test_boxfvgeometry.cc
COMPILE_DEFINITIONS ENABLE_CACHING=false)
COMPILE_DEFINITIONS ENABLE_CACHING=false
LABELS unit)
dune_add_test(NAME test_boxfvgeometry_caching
SOURCES test_boxfvgeometry.cc
COMPILE_DEFINITIONS ENABLE_CACHING=true)
COMPILE_DEFINITIONS ENABLE_CACHING=true
LABELS unit)
#install sources
install(FILES
......
dune_add_test(NAME test_tpfafvgeometry
SOURCES test_tpfafvgeometry.cc
COMPILE_DEFINITIONS ENABLE_CACHING=false)
COMPILE_DEFINITIONS ENABLE_CACHING=false
LABELS unit)
dune_add_test(NAME test_tpfafvgeometry_caching
SOURCES test_tpfafvgeometry.cc
COMPILE_DEFINITIONS ENABLE_CACHING=true)
COMPILE_DEFINITIONS ENABLE_CACHING=true
LABELS unit)
dune_add_test(NAME test_tpfafvgeometry_nonconforming
SOURCES test_tpfafvgeometry_nonconforming.cc
COMPILE_DEFINITIONS ENABLE_CACHING=false
CMAKE_GUARD dune-alugrid_FOUND)
CMAKE_GUARD dune-alugrid_FOUND
LABELS unit)
dune_add_test(NAME test_cachedtpfafvgeometry_nonconforming
SOURCES test_tpfafvgeometry_nonconforming.cc
COMPILE_DEFINITIONS ENABLE_CACHING=true
CMAKE_GUARD dune-alugrid_FOUND)
CMAKE_GUARD dune-alugrid_FOUND
LABELS unit)
dune_add_test(NAME test_staggeredfvgeometry
SOURCES test_staggeredfvgeometry.cc)
SOURCES test_staggeredfvgeometry.cc
LABELS unit)
dune_add_test(NAME test_staggered_free_flow_geometry
SOURCES test_staggered_free_flow_geometry.cc)
SOURCES test_staggered_free_flow_geometry.cc
LABELS unit)
#install sources
install(FILES
......
dune_add_test(SOURCES test_container_io.cc)
dune_add_test(SOURCES test_container_io.cc
LABELS unit)
#install sources
install(FILES
......
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/output")
dune_add_test(SOURCES test_gnuplotinterface.cc)
dune_add_test(SOURCES test_gnuplotinterface.cc
LABELS unit)
#install sources
install(FILES
......
......@@ -3,6 +3,7 @@ dune_symlink_to_source_files(FILES grids)
dune_add_test(NAME test_gridmanager_cake
SOURCES test_gridmanager_cake.cc
LABELS unit
CMAKE_GUARD "( dune-uggrid_FOUND OR dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
......@@ -12,6 +13,7 @@ dune_add_test(NAME test_gridmanager_cake
dune_add_test(NAME test_gridmanager_subgrid
SOURCES test_gridmanager_subgrid.cc
LABELS unit
CMAKE_GUARD dune-subgrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
......@@ -28,6 +30,7 @@ target_compile_definitions(test_gridmanager_gmsh_3d_alu PUBLIC GRIDTYPE=Dune::AL
dune_add_test(NAME test_gridmanager_gmsh_3d_alu_sequential
TARGET test_gridmanager_gmsh_3d_alu
LABELS unit
CMAKE_GUARD dune-alugrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
......@@ -37,6 +40,7 @@ dune_add_test(NAME test_gridmanager_gmsh_3d_alu_sequential
dune_add_test(NAME test_gridmanager_gmsh_3d_alu_parallel
TARGET test_gridmanager_gmsh_3d_alu
LABELS unit
CMAKE_GUARD dune-alugrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy --zeroThreshold {"rank":100}
......@@ -49,6 +53,7 @@ target_compile_definitions(test_gridmanager_gmsh_3d_ug PUBLIC GRIDTYPE=Dune::UGG
dune_add_test(NAME test_gridmanager_gmsh_3d_ug_sequential
TARGET test_gridmanager_gmsh_3d_ug
LABELS unit
CMAKE_GUARD dune-uggrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
......@@ -60,6 +65,7 @@ dune_add_test(NAME test_gridmanager_gmsh_3d_ug_sequential
dune_add_test(NAME test_gridmanager_gmsh_3d_ug_parallel
TARGET test_gridmanager_gmsh_3d_ug
LABELS unit
CMAKE_GUARD dune-uggrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy --zeroThreshold {"rank":100}
......@@ -74,6 +80,7 @@ target_compile_definitions(test_gridmanager_gmsh_e_markers_alu PUBLIC GRIDTYPE=D
dune_add_test(NAME test_gridmanager_gmsh_e_markers_alu_sequential
TARGET test_gridmanager_gmsh_e_markers_alu
LABELS unit
CMAKE_GUARD dune-alugrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
......@@ -85,6 +92,7 @@ dune_add_test(NAME test_gridmanager_gmsh_e_markers_alu_sequential
dune_add_test(NAME test_gridmanager_gmsh_e_markers_alu_parallel
TARGET test_gridmanager_gmsh_e_markers_alu
LABELS unit
CMAKE_GUARD "( dune-alugrid_FOUND AND MPI_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy --zeroThreshold {"rank":100}
......@@ -99,6 +107,7 @@ target_compile_definitions(test_gridmanager_gmsh_e_markers_ug PUBLIC GRIDTYPE=Du
dune_add_test(NAME test_gridmanager_gmsh_e_markers_ug_sequential
TARGET test_gridmanager_gmsh_e_markers_ug
LABELS unit
CMAKE_GUARD dune-uggrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
......@@ -110,6 +119,7 @@ dune_add_test(NAME test_gridmanager_gmsh_e_markers_ug_sequential
dune_add_test(NAME test_gridmanager_gmsh_e_markers_ug_parallel
TARGET test_gridmanager_gmsh_e_markers_ug
LABELS unit
CMAKE_GUARD "( dune-uggrid_FOUND AND MPI_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy --zeroThreshold {"rank":100}
......@@ -124,6 +134,7 @@ target_compile_definitions(test_gridmanager_dgf_alu PUBLIC GRIDTYPE=Dune::ALUGri
dune_add_test(NAME test_gridmanager_dgf_alu_sequential
TARGET test_gridmanager_dgf_alu
LABELS unit
CMAKE_GUARD dune-alugrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
......@@ -137,6 +148,7 @@ dune_add_test(NAME test_gridmanager_dgf_alu_sequential
dune_add_test(NAME test_gridmanager_dgf_alu_parallel
TARGET test_gridmanager_dgf_alu
LABELS unit
CMAKE_GUARD "( dune-alugrid_FOUND AND MPI_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy --zeroThreshold {"rank":100}
......@@ -153,6 +165,7 @@ target_compile_definitions(test_gridmanager_dgf_ug PUBLIC GRIDTYPE=Dune::UGGrid<
dune_add_test(NAME test_gridmanager_dgf_ug_sequential
TARGET test_gridmanager_dgf_ug
LABELS unit
CMAKE_GUARD dune-uggrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
......@@ -166,6 +179,7 @@ dune_add_test(NAME test_gridmanager_dgf_ug_sequential
dune_add_test(NAME test_gridmanager_dgf_ug_parallel
TARGET test_gridmanager_dgf_ug
LABELS unit
CMAKE_GUARD "( dune-uggrid_FOUND AND MPI_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy --zeroThreshold {"rank":100}
......
......@@ -2,6 +2,7 @@ add_input_file_links()
dune_add_test(NAME test_vtkreader_3d
SOURCES test_vtkreader.cc
LABELS unit
CMAKE_GUARD dune-alugrid_FOUND
COMPILE_DEFINITIONS GRIDTYPE=Dune::ALUGrid<3,3,Dune::cube,Dune::nonconforming>
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
......@@ -18,6 +19,7 @@ dune_add_test(NAME test_vtkreader_3d
dune_add_test(NAME test_vtkreader_2d
SOURCES test_vtkreader.cc
LABELS unit
CMAKE_GUARD dune-alugrid_FOUND
COMPILE_DEFINITIONS GRIDTYPE=Dune::ALUGrid<2,2,Dune::cube,Dune::nonconforming>
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
......@@ -29,6 +31,7 @@ dune_add_test(NAME test_vtkreader_2d
dune_add_test(NAME test_vtkreader_2d3d
SOURCES test_vtkreader.cc
LABELS unit
CMAKE_GUARD dune-foamgrid_FOUND
COMPILE_DEFINITIONS GRIDTYPE=Dune::FoamGrid<2,3>
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
......@@ -40,6 +43,7 @@ dune_add_test(NAME test_vtkreader_2d3d
dune_add_test(NAME test_vtkreader_1d
SOURCES test_vtkreader.cc
LABELS unit
CMAKE_GUARD dune-foamgrid_FOUND
COMPILE_DEFINITIONS GRIDTYPE=Dune::FoamGrid<1,3>
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
......@@ -50,4 +54,5 @@ dune_add_test(NAME test_vtkreader_1d
${CMAKE_CURRENT_BINARY_DIR}/test-1d.vtp)
dune_add_test(NAME test_vtk_staggeredfreeflowpvnames
SOURCES test_vtk_staggeredfreeflowpvnames.cc)
SOURCES test_vtk_staggeredfreeflowpvnames.cc
LABELS unit)
dune_add_test(SOURCES test_componenttraits.cc
COMPILE_ONLY)
COMPILE_ONLY
LABELS unit)
add_executable(plot_component plotproperties.cc)
dune_add_test(NAME plot_air
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "Air")
CMD_ARGS "Air"
LABELS unit)
dune_add_test(NAME plot_benzene
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "Benzene")
CMD_ARGS "Benzene"
LABELS unit)
dune_add_test(NAME plot_brine
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "Brine")
CMD_ARGS "Brine"
LABELS unit)
dune_add_test(NAME plot_calcite
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "Calcite")
CMD_ARGS "Calcite"
LABELS unit)
dune_add_test(NAME plot_calciumion
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "CalciumIon")
CMD_ARGS "CalciumIon"
LABELS unit)
dune_add_test(NAME plot_cao
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "CaO")
CMD_ARGS "CaO"
LABELS unit)
dune_add_test(NAME plot_cao2h2
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "CaO2H2")
CMD_ARGS "CaO2H2"
LABELS unit)
dune_add_test(NAME plot_carbonateion
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "CarbonateIon")
CMD_ARGS "CarbonateIon"
LABELS unit)
dune_add_test(NAME plot_ch4
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "CH4")
CMD_ARGS "CH4"
LABELS unit)
dune_add_test(NAME plot_granite
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "Granite")
CMD_ARGS "Granite"
LABELS unit)
dune_add_test(NAME plot_h2
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "H2")
CMD_ARGS "H2"
LABELS unit)
dune_add_test(NAME plot_h2o
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "H2O")
CMD_ARGS "H2O"
LABELS unit)
dune_add_test(NAME plot_heavyoil
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "HeavyOil")
CMD_ARGS "HeavyOil"
LABELS unit)
dune_add_test(NAME plot_mesitylene
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "Mesitylene")
CMD_ARGS "Mesitylene"
LABELS unit)
dune_add_test(NAME plot_n2
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "N2")
CMD_ARGS "N2"
LABELS unit)
dune_add_test(NAME plot_nacl
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "NaCl")
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "NaCl"
LABELS unit)
dune_add_test(NAME plot_o2
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "O2")
CMD_ARGS "O2"
LABELS unit)
dune_add_test(NAME plot_simpleh2o
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "SimpleH2O")
CMD_ARGS "SimpleH2O"
LABELS unit)
dune_add_test(NAME plot_trichloroethene
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "Trichloroethene")
CMD_ARGS "Trichloroethene"
LABELS unit)
dune_add_test(NAME plot_xylene
TARGET plot_component
COMMAND ./plot_component
CMD_ARGS "Xylene")
CMD_ARGS "Xylene"
LABELS unit)
dune_add_test(SOURCES test_thermalconductivityjohansen.cc
LABELS unit
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzyData --delimiter " "
--files ${CMAKE_SOURCE_DIR}/test/references/thermalconductivityjohansen-reference.dat
......@@ -6,6 +7,7 @@ dune_add_test(SOURCES test_thermalconductivityjohansen.cc
--command "${CMAKE_CURRENT_BINARY_DIR}/test_thermalconductivityjohansen")
dune_add_test(SOURCES test_thermalconductivitysomerton.cc
LABELS unit
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzyData --delimiter " "
--files ${CMAKE_SOURCE_DIR}/test/references/thermalconductivitysomerton-reference.dat
......
add_subdirectory("2p")
dune_add_test(SOURCES test_effectivediffusivitymillingtonquirk.cc
LABELS unit
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzyData --delimiter " "
--files ${CMAKE_SOURCE_DIR}/test/references/effectivediffusivitymillingtonquirk-reference.dat
......@@ -8,6 +9,7 @@ dune_add_test(SOURCES test_effectivediffusivitymillingtonquirk.cc
--command "${CMAKE_CURRENT_BINARY_DIR}/test_effectivediffusivitymillingtonquirk")
dune_add_test(SOURCES test_effectivediffusivityconstanttortuosity.cc
LABELS unit
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzyData --delimiter " "
--files ${CMAKE_SOURCE_DIR}/test/references/effectivediffusivityconstanttau-reference.dat
......
dune_add_test(SOURCES test_fluidsystems.cc)
dune_add_test(SOURCES test_fluidsystems.cc
LABELS unit)
#install sources
install(FILES
......
dune_add_test(SOURCES test_immiscibleflash.cc)
dune_add_test(SOURCES test_immiscibleflash.cc
LABELS unit)
#install sources
install(FILES
......
Supports Markdown
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