diff --git a/.gitignore b/.gitignore
index c29fa3e3a48e9846b5c7c422b746589cb740802d..e1a612eb299472b2e2e851c6a0a6fab543992f9e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -162,6 +162,7 @@ tests/testOutputList
 tests/testCbrt
 tests/testFormat.sh
 tests/testCooling
+tests/testComovingCooling
 tests/testHashmap
 tests/*.png
 tests/*.txt
diff --git a/tests/testComovingCooling.c b/tests/testComovingCooling.c
index b2c7de115acfb712f655eac54c1bf912bee442be..ba8de08384ccb7984a55705e4cc6934c518b7b6a 100644
--- a/tests/testComovingCooling.c
+++ b/tests/testComovingCooling.c
@@ -21,7 +21,7 @@
 /* Local headers. */
 #include "swift.h"
 
-#if defined(CHEMISTRY_EAGLE) && defined(COOLING_EAGLE)
+#if defined(CHEMISTRY_EAGLE) && defined(COOLING_EAGLE) && defined(GADGET2_SPH)
 
 /*
  * @brief Assign particle density and entropy corresponding to the
diff --git a/tests/testCooling.c b/tests/testCooling.c
index 9cf38fc23f74139a0f44dc61ccae6b7c22c77130..227d12d02cab6fa1eb3fe2be7557036f823e4ea7 100644
--- a/tests/testCooling.c
+++ b/tests/testCooling.c
@@ -21,7 +21,7 @@
 /* Local headers. */
 #include "swift.h"
 
-#if defined(CHEMISTRY_EAGLE) && defined(COOLING_EAGLE)
+#if defined(CHEMISTRY_EAGLE) && defined(COOLING_EAGLE) && defined(GADGET2_SPH)
 
 /*
  * @brief Assign particle density and entropy corresponding to the