diff --git a/Makefile b/Makefile
index 4a4fc309266844930c6a0a0bcd9e612af975fe7d..08ab6ff820872df87ee8649a0d4ba0beb269ff4d 100644
--- a/Makefile
+++ b/Makefile
@@ -152,6 +152,9 @@ FRAMAC_WTESTS:=$(FRAMAC_PTESTS_SRC)/wtests.exe
 # Frama-C also have ptest directories in plugins, so we do not use default
 PTEST_ALL_DIRS:=tests $(wildcard src/plugins/*/tests)
 
+# Test aliasing definition allowing ./configure --disable-<plugin> 
+PTEST_ALIASES:=@tests/ptests @src/plugins/ptests
+
 # Ptests needs config.sed so that dune can build Frama-C (if it is not built)
 PTEST_DEPS:=config.sed
 
diff --git a/share/Makefile.testing b/share/Makefile.testing
index 8b7973e24925b36902b789ff2eab440b6e0615cd..d2556d3b9286db350d3cb83b54110c4a69bdc75c 100644
--- a/share/Makefile.testing
+++ b/share/Makefile.testing
@@ -38,6 +38,8 @@ PTEST_DIRS?=$(PTEST_ALL_DIRS)
 PTEST_DEPS?=
 # Indicate whether we use global WP cache
 PTEST_USE_WP_CACHE?=no
+# Defines the related dune targets
+PTEST_ALIASES?=$(addsuffix /ptests,$(addprefix @,$(PTEST_DIRS)))
 
 ifneq ($(FRAMAC_WP_QUALIF),)
 FRAMAC_WP_CACHEDIR=$(FRAMAC_WP_QUALIF)
@@ -59,9 +61,6 @@ endif
 
 ##########################################################################
 
-# Defines the related dune targets
-PTEST_ALIASES=$(addsuffix /ptests,$(addprefix @,$(PTEST_DIRS)))
-
 .PHONY: tests.info
 tests.info:
 	echo "FRAMAC_WTESTS='$(FRAMAC_WTESTS)'"