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
a3d921f0
Commit
a3d921f0
authored
4 years ago
by
Patrick Baudin
Browse files
Options
Downloads
Patches
Plain Diff
[ptests] its own makefile
parent
a158167d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ptests/Makefile
+62
-12
62 additions, 12 deletions
ptests/Makefile
with
62 additions
and
12 deletions
ptests/Makefile
+
62
−
12
View file @
a3d921f0
all
:
run-tests
##########################################################################
# #
# This file is part of Frama-C. #
# #
# Copyright (C) 2007-2020 #
# CEA (Commissariat à l'énergie atomique et aux énergies #
# alternatives) #
# #
# you can redistribute it and/or modify it under the terms of the GNU #
# Lesser General Public License as published by the Free Software #
# Foundation, version 2.1. #
# #
# It is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Lesser General Public License for more details. #
# #
# See the GNU Lesser General Public License version 2.1 #
# for more details (enclosed in the file licenses/LGPLv2.1). #
# #
##########################################################################
ptests.exe
:
purge-tests ptests.ml
.PHONY
:
all
all
:
ptests.exe
.PHONY
:
ptests.exe
ptests.exe
:
dune build
--root
.
ptests.exe
dune build
--root
.
ptests.exe
.PHONY
:
clean
clean
:
purge-tests
clean
:
purge-tests
dune clean
--root
.
dune clean
--root
.
.PHONY
:
run-tests clean-tests purge-tests tests
##########################################################################
TEST_DIRS
=
nothing cmd
#######
ENV_DIR
=
../_build/default/ptests/tests
# removes also eventual broken dune files
# removes also eventual broken dune files
.PHONY
:
purge-tests
purge-tests
:
purge-tests
:
@
echo
"Purge tests"
find tests
-name
dune |
grep
-e
"oracle.*/
\|
result.*/"
| xargs
--no-run-if-empty
rm
find tests
-name
dune |
grep
-e
"oracle.*/
\|
result.*/"
| xargs
--no-run-if-empty
rm
.PHONY
:
clean-tests
clean-tests
:
purge-tests
clean-tests
:
purge-tests
rm
-rf
_build/default/ptests/tests
@
echo
"Clean tests"
rm
-rf
$(
ENV_DIR
)
.PHONY
:
%.dune-file
%.dune-file
:
purge-tests
@
echo
"Dune files for
$(
basename
$@
)
"
dune
exec
--root
.
./ptests.exe ./tests/
$(
basename
$@
)
/tests
find ./tests/
$(
basename
$@
)
/tests
-name
dune
-print
.PHONY
:
dune-files
dune-files
:
$(addsuffix .dune-file
,
$(TEST_DIRS))
TESTS
=
nothing cmd
# note: tests requires the package frama-c (even if frama-c is not used there)
# opts
.PHONY
:
tests
tests
:
dune-files
@
echo
"Run Tests..."
dune build
$(
addprefix @tests/,
$(
addsuffix /tests/ptests,
$(
TEST_DIRS
)))
run-tests
:
purge-tests
.PHONY
:
tests
for
dir
in
$(
TESTS
)
;
do
\
force-tests
:
dune-files clean-tests
dune
exec
--root
.
./ptests.exe ./tests/
$$
dir
/tests
;
\
@
echo
"Run Tests..."
done
dune build
$(
addprefix @tests/,
$(
addsuffix /tests/ptests,
$(
TEST_DIRS
)))
dune build
$(
addprefix @tests/,
$(
addsuffix /tests/ptests,
$(
TESTS
)))
@
echo
"Nb .Log files:"
find
$(
ENV_DIR
)
-name
\*
.log
-print
|
wc
-l
@
echo
"Nb .err files:"
find
$(
ENV_DIR
)
-name
\*
.err
-print
|
wc
-l
tests
:
run-tests
##########################################################################
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