diff --git a/Makefile b/Makefile
index 7c5b6b4d7308d1a4379af5037223d779a6428333..850ada2bc6ce9d74fba77973735bf178161c82c0 100644
--- a/Makefile
+++ b/Makefile
@@ -141,7 +141,7 @@ FRAMAC_PTESTS:=$(FRAMAC_PTESTS_SRC)/ptests.exe
 FRAMAC_WTESTS:=$(FRAMAC_PTESTS_SRC)/wtests.exe
 
 # Frama-C also has ptest directories in plugins, so we do not use default
-PTEST_ALL_DIRS:=tests $(wildcard src/plugins/*/tests) \
+PTEST_ALL_DIRS:=tests $(shell find src/plugins -type d -name tests) \
   src/kernel_internals/parsing/tests
 
 # Test aliasing definition allowing ./configure --disable-<plugin>