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

Merge branch 'feature/makefile-testing' into 'master'

Feature/makefile testing

See merge request frama-c/frama-c!3861
parents 0908aaca cd49fc09
No related branches found
No related tags found
No related merge requests found
......@@ -153,6 +153,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
......
......@@ -38,6 +38,14 @@ 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)
else
FRAMAC_WP_CACHEDIR?=
endif
############
# Default values necessary for make -f <this-makefile>
......@@ -55,9 +63,6 @@ endif
##########################################################################
# Defines the related dune targets
PTEST_ALIASES=$(addsuffix /ptests,$(addprefix @,$(PTEST_DIRS)))
.PHONY: tests.info
tests.info:
echo "FRAMAC_WTESTS='$(FRAMAC_WTESTS)'"
......@@ -180,9 +185,10 @@ endif
.PHONY: tests
tests:: run-tests
echo "Number of *.{err,res}.log files:"
find $(addprefix _build/default/,$(PTEST_DIRS)) -name \*.err.log -or -name \*.res.log \
| $(GREP) -c "^"
@echo "Number of *.{err,res}.log files:"
@find $(addprefix _build/default/,$(PTEST_DIRS)) \
-name \*.err.log -or -name \*.res.log \
| wc -l
ifneq ($(PTEST_USE_WP_CACHE),no)
ifeq ($(FRAMAC_WP_CACHEDIR),)
......@@ -200,9 +206,10 @@ endif # PTEST_USE_WP_CACHE
.PHONY: count-tests
count-tests:
echo "Number of *.{err,res}.log files:"
find $(addprefix _build/default/,$(PTEST_DIRS)) -name \*.res.log -or -name \*.err.log \
| $(GREP) -c "^"
@echo "Number of *.{err,res}.log files:"
@find $(addprefix _build/default/,$(PTEST_DIRS)) \
-name \*.res.log -or -name \*.err.log \
| wc -l
###############################################################################
# Local Variables:
......
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