Skip to content
Snippets Groups Projects
Commit cf644b57 authored by Allan Blanchard's avatar Allan Blanchard
Browse files

[ptests] changes Makefile.testing variables

- more intuitive name for tests directories
- single way to build PTEST_ALIASES
parent 00452ff7
No related branches found
No related tags found
No related merge requests found
...@@ -209,6 +209,9 @@ FRAMAC_PTESTS:=ptests/ptests.exe ...@@ -209,6 +209,9 @@ FRAMAC_PTESTS:=ptests/ptests.exe
# WTESTS is internal # WTESTS is internal
FRAMAC_WTESTS:=ptests/wtests.exe FRAMAC_WTESTS:=ptests/wtests.exe
# Frama-C also have ptest directories in plugins, so we do not use default
PTEST_ALL_DIRS:=tests $(wildcard src/plugins/*/tests)
# Part that can be shared for external plugins # Part that can be shared for external plugins
include share/Makefile.testing include share/Makefile.testing
......
...@@ -28,9 +28,10 @@ ...@@ -28,9 +28,10 @@
## Default variables ## Default variables
# Defines where to find the ptest_config files # Defines where to find the ptest_config files
PURGED_PTEST_DIRS?=tests $(wildcard src/plugins/*/tests) # Default: only consider tests directory, it can be customized via the variable
PTEST_ALL_DIRS?=tests
PTEST_OPTS?= PTEST_OPTS?=
PTEST_DIRS?=$(PURGED_PTEST_DIRS) PTEST_DIRS?=$(PTEST_ALL_DIRS)
############ ############
# Default values necessary for make -f <this-makefile> # Default values necessary for make -f <this-makefile>
...@@ -49,9 +50,7 @@ endif ...@@ -49,9 +50,7 @@ endif
########################################################################## ##########################################################################
# Defines the related dune targets # Defines the related dune targets
PTEST_ALIASES=$(addsuffix /ptests,$(addprefix @, tests src/plugins)) PTEST_ALIASES=$(addsuffix /ptests,$(addprefix @,$(PTEST_DIRS)))
# TODO: uncomments when a dune file is at least generated for all PTEST_DIRS
#PTEST_ALIASES=$(addsuffix /ptests,$(addprefix @,$(PTEST_DIRS)))
.PHONY: tests.info .PHONY: tests.info
tests.info: tests.info:
...@@ -59,7 +58,7 @@ tests.info: ...@@ -59,7 +58,7 @@ tests.info:
echo "WTESTS='$(WTESTS)'" echo "WTESTS='$(WTESTS)'"
echo "FRAMAC_PTESTS='$(FRAMAC_PTESTS)'" echo "FRAMAC_PTESTS='$(FRAMAC_PTESTS)'"
echo "PTESTS='$(PTESTS)'" echo "PTESTS='$(PTESTS)'"
echo "PURGED_PTEST_DIRS='$(PURGED_PTEST_DIRS)'" echo "PTEST_ALL_DIRS='$(PTEST_ALL_DIRS)'"
echo "PTEST_DIRS='$(PTEST_DIRS)'" echo "PTEST_DIRS='$(PTEST_DIRS)'"
echo "PTEST_OPTS='$(PTEST_OPTS)'" echo "PTEST_OPTS='$(PTEST_OPTS)'"
echo "PTEST_ALIASES='$(PTEST_ALIASES)'" echo "PTEST_ALIASES='$(PTEST_ALIASES)'"
...@@ -119,14 +118,14 @@ wtests-help: ...@@ -119,14 +118,14 @@ wtests-help:
.PHONY: purge-tests .PHONY: purge-tests
purge-tests: purge-tests:
find $(PURGED_PTEST_DIRS) -name dune \ find $(PTEST_ALL_DIRS) -name dune \
| $(GREP) -e "/oracle.*/dune\|/result.*/dune" \ | $(GREP) -e "/oracle.*/dune\|/result.*/dune" \
| $(XARGS) -n 10 $(RM) | $(XARGS) -n 10 $(RM)
# Force the full cleaning of the testing environment # Force the full cleaning of the testing environment
.PHONY: clean-tests .PHONY: clean-tests
clean-tests: purge-tests clean-tests: purge-tests
$(RMDIR) $(addprefix _build/default/,$(PURGED_PTEST_DIRS)) $(RMDIR) $(addprefix _build/default/,$(PTEST_ALL_DIRS))
########################################################################## ##########################################################################
## Generates all dune files used for testing ## Generates all dune files used for testing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment