Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
b65bf2e2
Commit
b65bf2e2
authored
2 years ago
by
Patrick Baudin
Browse files
Options
Downloads
Patches
Plain Diff
[Makefile] updates about testing
parent
ec719103
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+10
-2
10 additions, 2 deletions
Makefile
share/Makefile.testing
+51
-16
51 additions, 16 deletions
share/Makefile.testing
with
61 additions
and
18 deletions
Makefile
+
10
−
2
View file @
b65bf2e2
...
...
@@ -193,16 +193,24 @@ endif
# HEADER MANAGEMENT
################################
# HDRCK is internal
FRAMAC_HDRCK
:=
headers/hdrck.exe
# Part that can be shared for external plugins
include
share/Makefile.headers
###############################################################################
# Testing
################################
# PTESTS is internal
FRAMAC_PTESTS
:=
ptests/ptests.exe
include
Makefile.testing
# WTESTS is internal
FRAMAC_WTESTS
:=
ptests/wtests.exe
# Part that can be shared for external plugins
include
share/Makefile.testing
###############################################################################
...
...
This diff is collapsed.
Click to expand it.
Makefile.testing
→
share/
Makefile.testing
+
51
−
16
View file @
b65bf2e2
...
...
@@ -36,35 +36,68 @@ PTEST_ALIASES=$(addsuffix /ptests,$(addprefix @, tests src/plugins))
.PHONY
:
tests.info
tests.info
:
echo
"PURGED_PTEST_DIRS=
$(
PURGED_PTEST_DIRS
)
"
echo
"PTEST_DIRS=
$(
PTEST_DIRS
)
"
echo
"PTEST_OPTS=
$(
PTEST_OPTS
)
"
echo
"PTEST_ALIASES=
$(
PTEST_ALIASES
)
"
echo
"FRAMAC_WTESTS='
$(
FRAMAC_WTESTS
)
'"
echo
"WTESTS='
$(
WTESTS
)
'"
echo
"FRAMAC_PTESTS='
$(
FRAMAC_PTESTS
)
'"
echo
"PTESTS='
$(
PTESTS
)
'"
echo
"PURGED_PTEST_DIRS='
$(
PURGED_PTEST_DIRS
)
'"
echo
"PTEST_DIRS='
$(
PTEST_DIRS
)
'"
echo
"PTEST_OPTS='
$(
PTEST_OPTS
)
'"
echo
"PTEST_ALIASES='
$(
PTEST_ALIASES
)
'"
# Note: the public name of ptest.exe is frama-c-ptests
ptests/ptests.exe
:
ptests/ptests.ml
dune build
--root
ptests ptests.exe
##########################################################################
## Command used to execute ptests (in order to generate dune test files)
# Note: the public name of wtest.exe is frama-c-wtests
ptests/wtests.exe
:
ptests/wtests.ml
dune build
--root
ptests wtests.exe
# Note: the public name of ptests.exe is frama-c-ptests
ifeq
($(FRAMAC_PTESTS),"")
# PTESTS is external
PTESTS
=
frama-c-ptests
else
#
Command for executing ptest (in order to generate dune test files)
#
PTESTS is internal
PTESTS
=
dune
exec
--root
ptests
--
frama-c-ptests
#PTESTS=dune exec --root ptests -- frama-c-ptests -v
# Note: the public name of ptest.exe is frama-c-ptests
$(FRAMAC_PTESTS)
:
ptests/ptests.ml
dune build
--root
ptests ptests.exe
endif
.PHONY
:
ptests-help
ptests-help
:
$(
PTESTS
)
--help
# Note: wrapper that can be used during dune testing (c.f. frama-c-ptests)
##########################################################################
## Command used to execute wtests, the wrapper that can be used during
## dune testing (c.f. frama-c-ptests)
# Note: the public name of wtests.exe is frama-c-wtests
ifeq
($(FRAMAC_WTESTS),"")
# WTESTS is external to Frama-C
WTESTS
=
frama-c-wtests
else
# WTESTS is internal to Frama-C
WTESTS
=
dune
exec
--root
ptests
--
frama-c-wtests
# Note: the public name of wtest.exe is frama-c-wtests
$(FRAMAC_WTESTS)
:
ptests/wtests.ml
dune build
--root
ptests wtests.exe
endif
.PHONY
:
wtests-help
wtests-help
:
$(
WTESTS
)
--help
# Removes all dune files generated for testing: xargs -n 10 avoids a too long line
##########################################################################
## Removes all dune files generated for testing: xargs -n 10 avoids a too long line
.PHONY
:
purge-tests
purge-tests
:
find
$(
PURGED_PTEST_DIRS
)
-name
dune
-print0
\
...
...
@@ -76,13 +109,15 @@ purge-tests:
clean-tests
:
purge-tests
rm
-rf
$(
addprefix _build/default/,
$(
PURGED_PTEST_DIRS
))
# Generates all dune files used for testing
##########################################################################
## Generates all dune files used for testing
.PHONY
:
run-ptests
run-ptests
:
config.sed purge-tests
ptests/ptests.exe ptests/wtests.exe
run-ptests
:
config.sed purge-tests
$(FRAMAC_PTEST) $(FRAMAC_WTEST)
$(
PTESTS
)
$(
PTEST_OPTS
)
$(
PTEST_DIRS
)
.PHONY
:
run-ptests.replay
run-ptests.replay
:
config.sed
ptests/ptests.exe
run-ptests.replay
:
config.sed
$(FRAMAC_PTEST)
$(
PTESTS
)
$(
PTEST_OPTS
)
$(
PTEST_DIRS
)
# Run tests of for all configurations (and build all dune files)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment