diff --git a/test/decoupled/1p/CMakeLists.txt b/test/decoupled/1p/CMakeLists.txt
index 17afef62e6120eeaf2b675dfd5d271e54dfae23a..c0e5302a498120db36ddcd4d85a7268f25a94fe5 100644
--- a/test/decoupled/1p/CMakeLists.txt
+++ b/test/decoupled/1p/CMakeLists.txt
@@ -18,6 +18,8 @@ add_test(test_diffusion
   3)
 
 add_executable("test_diffusion3d" EXCLUDE_FROM_ALL test_diffusion3d.cc)
+add_dune_alugrid_flags(test_diffusion3d)
+add_dune_ug_flags(test_diffusion3d)
 add_test(test_diffusion3d
   ${CMAKE_SOURCE_DIR}/bin/runTest.sh
   ${CMAKE_SOURCE_DIR}/bin/fuzzycomparevtu.py
diff --git a/test/decoupled/1p/test_diffusion3d.cc b/test/decoupled/1p/test_diffusion3d.cc
index 6642f34e0dfc26ccc25520c3479d39e87b6ab193..3998baba546098257fde2a69a8bd006a9cbfa6ec 100644
--- a/test/decoupled/1p/test_diffusion3d.cc
+++ b/test/decoupled/1p/test_diffusion3d.cc
@@ -25,7 +25,8 @@
  */
 #include "config.h"
 #include <iostream>
-#include <boost/format.hpp>
+
+#if HAVE_ALUGRID | HAVE_UGGRID
 
 #include <dune/common/exceptions.hh>
 #include <dune/common/version.hh>
@@ -230,3 +231,13 @@ int main(int argc, char** argv)
 
     return 3;
 }
+#else
+
+#warning You need to have ALUGrid or UG installed to run this test
+
+int main()
+{
+    std::cerr << "You need to have ALUGrid or UG installed to run this test\n";
+    return 77;
+}
+#endif // HAVE_ALUGRID | HAVE_UGGRID
diff --git a/test/decoupled/1p/test_diffusionproblem3d.hh b/test/decoupled/1p/test_diffusionproblem3d.hh
index 72216ad0873cabeaab3b0488ee6adb76999423c8..caf4507a32fcc49644d719c87a262f026acb754f 100644
--- a/test/decoupled/1p/test_diffusionproblem3d.hh
+++ b/test/decoupled/1p/test_diffusionproblem3d.hh
@@ -22,11 +22,10 @@
 #ifndef DUMUX_TEST_DIFFUSION_3D_PROBLEM_HH
 #define DUMUX_TEST_DIFFUSION_3D_PROBLEM_HH
 
-#if HAVE_ALUGRID
-#include <dune/grid/alugrid/3d/alugrid.hh>
-#endif
-#include <dune/grid/yaspgrid.hh>
+#if HAVE_ALUGRID | HAVE_UGGRID
 
+#include <dune/grid/alugrid/3d/alugrid.hh>
+#include <dune/grid/uggrid.hh>
 #include <dumux/material/components/unit.hh>
 
 #include <dumux/decoupled/2p/diffusion/fv/fvpressureproperties2p.hh>
@@ -54,14 +53,11 @@ namespace Properties
 NEW_TYPE_TAG(DiffusionTestProblem, INHERITS_FROM(DecoupledTwoP, TestDiffusionSpatialParams3d));
 
 // Set the grid type
-SET_PROP(DiffusionTestProblem, Grid)
-{
 #if HAVE_ALUGRID
-    typedef Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming> type;
+SET_TYPE_PROP(DiffusionTestProblem, Grid, Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming>);
 #else
-    typedef Dune::YaspGrid<3> type;
+SET_TYPE_PROP(DiffusionTestProblem, Grid, Dune::UGGrid<3>);
 #endif
-};
 
 SET_TYPE_PROP(DiffusionTestProblem, Problem, Dumux::TestDiffusion3DProblem<TypeTag>);
 
@@ -276,4 +272,6 @@ private:
 };
 } //end namespace
 
+#endif // HAVE_ALUGRID | HAVE_UGGRID
+
 #endif
diff --git a/test/decoupled/2p/test_3d2p.cc b/test/decoupled/2p/test_3d2p.cc
index e5a3f0c83aa597f56e03815e056cee4cdb99121b..50c7e415a5011630dc950f8de678b5838c2adc75 100644
--- a/test/decoupled/2p/test_3d2p.cc
+++ b/test/decoupled/2p/test_3d2p.cc
@@ -171,6 +171,8 @@ int main(int argc, char** argv)
         std::cout<<"Default to finite volume MPFA l-method model\n";
         return startReturn;
     }
+
+    return 0;
 }
 
 #else
diff --git a/test/decoupled/2p/test_3d2pproblem.hh b/test/decoupled/2p/test_3d2pproblem.hh
index d7eae7d71681608054ef5026c71f1b4fb597b700..a21c17f1418b1e6ed497f40e37e6c6cedb841ec8 100644
--- a/test/decoupled/2p/test_3d2pproblem.hh
+++ b/test/decoupled/2p/test_3d2pproblem.hh
@@ -65,7 +65,8 @@ NEW_TYPE_TAG(ThreeDTwoPTestProblem, INHERITS_FROM(Test3d2pSpatialParams));
 // Set the grid type
 SET_PROP(ThreeDTwoPTestProblem, Grid)
 {
-    typedef Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming> type;
+    typedef Dune::UGGrid<3> type;
+//     typedef Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming> type;
 };
 
 // Set the problem property