diff --git a/test/decoupled/2p/test_impesadaptiveproblem.hh b/test/decoupled/2p/test_impesadaptiveproblem.hh
index 8806f9f9c5ff9c80027e020529a0dcbad2247083..3c4d3b5e1dd2721931d35e1918240fd9bf8a0ba9 100644
--- a/test/decoupled/2p/test_impesadaptiveproblem.hh
+++ b/test/decoupled/2p/test_impesadaptiveproblem.hh
@@ -29,6 +29,8 @@
 #ifndef DUMUX_TEST_IMPES_ADAPTIVE_PROBLEM_HH
 #define DUMUX_TEST_IMPES_ADAPTIVE_PROBLEM_HH
 
+#if HAVE_ALUGRID
+
 #include <dune/grid/alugrid/2d/alugrid.hh>
 #include <dumux/common/cubegridcreator.hh>
 
@@ -276,3 +278,5 @@ private:
 } //end namespace
 
 #endif
+
+#endif
diff --git a/test/decoupled/2p/test_mpfa2pproblem.hh b/test/decoupled/2p/test_mpfa2pproblem.hh
index 59e0211012c1bf1c7b1e85a2373c3f385c2fec4d..9e9c77c98cdb2868be6c2277a5e78848559064b2 100644
--- a/test/decoupled/2p/test_mpfa2pproblem.hh
+++ b/test/decoupled/2p/test_mpfa2pproblem.hh
@@ -27,6 +27,8 @@
 #ifndef DUMUX_TEST_MPFA2P_PROBLEM_HH
 #define DUMUX_TEST_MPFA2P_PROBLEM_HH
 
+#if HAVE_ALUGRID
+
 #include <dune/grid/alugrid/2d/alugrid.hh>
 
 #include <dumux/common/cubegridcreator.hh>
@@ -387,4 +389,6 @@ static constexpr Scalar eps_ = 1e-6;
 };
 } //end namespace
 
+#endif 
+
 #endif