Skip to content
Snippets Groups Projects
Commit 4a5370dd authored by Julien Signoles's avatar Julien Signoles
Browse files

Merge branch 'feature/basile/test-config-in-makefile' into 'master'

[eacsl:tests] Allow the use of `PTESTS_OPTS` to change the test configuration

See merge request frama-c/frama-c!2758
parents 7beacaf3 93dbc482
No related branches found
No related tags found
No related merge requests found
...@@ -167,20 +167,27 @@ PLUGIN_TESTS_DIRS := \ ...@@ -167,20 +167,27 @@ PLUGIN_TESTS_DIRS := \
PLUGIN_TESTS_LIB := $(EACSL_PLUGIN_DIR)/tests/print.ml PLUGIN_TESTS_LIB := $(EACSL_PLUGIN_DIR)/tests/print.ml
DEV= DEV?=
ifeq ("$(DEV)","yes") ifeq ("$(DEV)","yes")
EACSL_TEST_CONFIG=dev EACSL_TEST_CONFIG:=dev
else else
EACSL_TEST_CONFIG:=ci EACSL_TEST_CONFIG:=ci
endif endif
PLUGIN_PTESTS_OPTS:=-config $(EACSL_TEST_CONFIG) # Prepend PTESTS_OPTS with the test config to use. If the user-provided
# PTESTS_OPTS variable contains another -config instruction, then it will be
# prioritized over the one selected by the Makefile.
E_ACSL_TESTS E_ACSL_DEFAULT_TESTS: override PTESTS_OPTS:=-config $(EACSL_TEST_CONFIG) $(PTESTS_OPTS)
TEST_DEPENDENCIES:= \ TEST_DEPENDENCIES:= \
$(EACSL_PLUGIN_DIR)/tests/ptests_config \ $(EACSL_PLUGIN_DIR)/tests/ptests_config \
$(EACSL_PLUGIN_DIR)/tests/test_config_$(EACSL_TEST_CONFIG) \ $(EACSL_PLUGIN_DIR)/tests/test_config_ci \
$(EACSL_PLUGIN_DIR)/tests/test_config_dev \
$(EACSL_PLUGIN_DIR)/tests/print.cmxs \ $(EACSL_PLUGIN_DIR)/tests/print.cmxs \
$(EACSL_PLUGIN_DIR)/tests/print.cmo $(EACSL_PLUGIN_DIR)/tests/print.cmo
# Add the test dependencies to the test targets, but also to
# `plugins_ptests_config` so that they are built along with the main target.
plugins_ptests_config: $(TEST_DEPENDENCIES)
E_ACSL_TESTS E_ACSL_DEFAULT_TESTS: $(TEST_DEPENDENCIES) E_ACSL_TESTS E_ACSL_DEFAULT_TESTS: $(TEST_DEPENDENCIES)
tests:: $(TEST_DEPENDENCIES) tests:: $(TEST_DEPENDENCIES)
......
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