diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index e79e1757292f11756fd534eb74de93ced5999315..ff5dead3f17e34f58094cd63a7df268af8623d1e 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -14,8 +14,11 @@ SUBDIRS += \
     qtcprocess \
     utils \
     utils_stringutils \
-    filesearch \
-    valgrind
+    filesearch
+
+!win32 {
+    SUBDIRS += valgrind
+}
 
 #contains (QT_CONFIG, declarative) {
 #SUBDIRS += qml
diff --git a/tests/tests.pro b/tests/tests.pro
index 782ca4eaf4f812eb947c1d2202afe97488e6de1e..78b78c84526b8965615c0bff7a75dde353b3ea57 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -1,5 +1,2 @@
 TEMPLATE=subdirs
 SUBDIRS += auto manual tools
-!win32 {
-    SUBDIRS += valgrind
-}