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
3c0d5d35
Commit
3c0d5d35
authored
3 years ago
by
Patrick Baudin
Browse files
Options
Downloads
Patches
Plain Diff
[Ptests] adds warning about deprecated features
parent
276ce836
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/ptests.ml
+30
-17
30 additions, 17 deletions
ptests/ptests.ml
with
30 additions
and
17 deletions
ptests/ptests.ml
+
30
−
17
View file @
3c0d5d35
...
@@ -819,7 +819,10 @@ end = struct
...
@@ -819,7 +819,10 @@ end = struct
dc_timeout
=
""
;
dc_timeout
=
""
;
}
}
let
scan_execnow
~
once
dir
ex_macros
ex_timeout
(
s
:
string
)
=
let
scan_execnow
~
warn
~
once
~
file
dir
ex_macros
ex_timeout
(
s
:
string
)
=
if
once
=
false
then
lock_eprintf
"%s: using EXEC directive (DEPRECATED): %s@."
file
s
;
let
rec
aux
(
s
:
execnow
)
=
let
rec
aux
(
s
:
execnow
)
=
try
try
Scanf
.
sscanf
s
.
ex_cmd
"%_[ ]LOG%_[ ]%[-A-Za-z0-9_',+=:.
\\
@@]%_[ ]%s@
\n
"
Scanf
.
sscanf
s
.
ex_cmd
"%_[ ]LOG%_[ ]%[-A-Za-z0-9_',+=:.
\\
@@]%_[ ]%s@
\n
"
...
@@ -834,21 +837,31 @@ end = struct
...
@@ -834,21 +837,31 @@ end = struct
try
try
Scanf
.
sscanf
s
.
ex_cmd
"%_[ ]make%_[ ]%s@
\n
"
Scanf
.
sscanf
s
.
ex_cmd
"%_[ ]make%_[ ]%s@
\n
"
(
fun
cmd
->
(
fun
cmd
->
(* It should be better to use a specific macro into the command (such as @MAKE@) for that. *)
let
s
=
aux
({
s
with
ex_cmd
=
cmd
;
})
in
let
s
=
aux
({
s
with
ex_cmd
=
cmd
;
})
in
{
s
with
ex_cmd
=
!
do_make
^
" "
^
cmd
;
}
)
let
r
=
{
s
with
ex_cmd
=
!
do_make
^
" "
^
cmd
;
}
in
if
warn
then
Format
.
eprintf
"%s: EXEC%s directive with a make command (DEPRECATED): %s@."
file
(
if
once
then
"NOW"
else
""
)
r
.
ex_cmd
;
r
)
with
Scanf
.
Scan_failure
_
->
with
Scanf
.
Scan_failure
_
->
s
s
in
in
aux
let
execnow
=
aux
{
ex_cmd
=
s
;
{
ex_cmd
=
s
;
ex_macros
;
ex_macros
;
ex_log
=
[]
;
ex_log
=
[]
;
ex_bin
=
[]
;
ex_bin
=
[]
;
ex_dir
=
dir
;
ex_dir
=
dir
;
ex_once
=
once
;
ex_once
=
once
;
ex_done
=
ref
false
;
ex_done
=
ref
false
;
ex_timeout
;
ex_timeout
;
}
}
in
if
warn
&&
execnow
.
ex_log
=
[]
&&
execnow
.
ex_bin
=
[]
then
Format
.
eprintf
"%s: EXEC%s without LOG nor BIN target (DEPRECATED): %s@."
file
(
if
once
then
"NOW"
else
""
)
s
;
execnow
type
parsing_env
=
{
type
parsing_env
=
{
current_default_toplevel
:
string
;
current_default_toplevel
:
string
;
...
@@ -899,10 +912,10 @@ end = struct
...
@@ -899,10 +912,10 @@ end = struct
List
.
fold_right
(
fun
x
s
->
s
^
" "
^
x
)
opts
""
List
.
fold_right
(
fun
x
s
->
s
^
" "
^
x
)
opts
""
(* how to process options *)
(* how to process options *)
let
config_exec
~
once
~
file
:_
dir
s
current
=
let
config_exec
~
warn
~
once
~
file
dir
s
current
=
{
current
with
{
current
with
dc_execnow
=
dc_execnow
=
scan_execnow
~
onc
e
dir
current
.
dc_macros
current
.
dc_timeout
s
::
current
.
dc_execnow
}
scan_execnow
~
warn
~
once
~
fil
e
dir
current
.
dc_macros
current
.
dc_timeout
s
::
current
.
dc_execnow
}
let
config_macro
~
file
_dir
s
current
=
let
config_macro
~
file
_dir
s
current
=
let
regex
=
Str
.
regexp
"[
\t
]*
\\
([^
\t
@]+
\\
)
\\
([
\t
]+
\\
(.*
\\
)
\\
|$
\\
)"
in
let
regex
=
Str
.
regexp
"[
\t
]*
\\
([^
\t
@]+
\\
)
\\
([
\t
]+
\\
(.*
\\
)
\\
|$
\\
)"
in
...
@@ -937,7 +950,7 @@ end = struct
...
@@ -937,7 +950,7 @@ end = struct
if
String
.(
deps
=
""
)
then
current
if
String
.(
deps
=
""
)
then
current
else
begin
else
begin
let
make_cmd
=
Macros
.
expand
current
.
dc_macros
"@PTEST_MAKE_MODULE@"
in
let
make_cmd
=
Macros
.
expand
current
.
dc_macros
"@PTEST_MAKE_MODULE@"
in
config_exec
~
once
:
true
~
file
dir
(
make_cmd
^
deps
)
current
config_exec
~
warn
:
false
~
once
:
true
~
file
dir
(
make_cmd
^
deps
)
current
end
end
let
update_module_macros
modules
macros
=
let
update_module_macros
modules
macros
=
...
@@ -1036,8 +1049,8 @@ end = struct
...
@@ -1036,8 +1049,8 @@ end = struct
"DONTRUN"
,
"DONTRUN"
,
(
fun
~
file
:_
_
s
current
->
{
current
with
dc_dont_run
=
true
});
(
fun
~
file
:_
_
s
current
->
{
current
with
dc_dont_run
=
true
});
"EXECNOW"
,
config_exec
~
once
:
true
;
"EXECNOW"
,
config_exec
~
warn
:
true
~
once
:
true
;
"EXEC"
,
config_exec
~
once
:
false
;
"EXEC"
,
config_exec
~
warn
:
true
~
once
:
false
;
"MACRO"
,
config_macro
;
"MACRO"
,
config_macro
;
...
...
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