From 409b7f3fc297a840e336463e71bfdcfada086f09 Mon Sep 17 00:00:00 2001
From: Patrick Baudin <patrick.baudin@cea.fr>
Date: Tue, 19 Jul 2022 09:44:44 +0200
Subject: [PATCH] [makefile] fixes testing aliases when plugins are disable

---
 Makefile               | 3 +++
 share/Makefile.testing | 5 ++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 4a4fc309266..08ab6ff8208 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 8b7973e2492..d2556d3b928 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)'"
-- 
GitLab