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
da535f7a
Commit
da535f7a
authored
4 years ago
by
François Bobot
Browse files
Options
Downloads
Patches
Plain Diff
[ptests] first try at enabled_if in alias
parent
ab4a6113
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
+10
-4
10 additions, 4 deletions
ptests/ptests.ml
with
10 additions
and
4 deletions
ptests/ptests.ml
+
10
−
4
View file @
da535f7a
...
@@ -1038,6 +1038,7 @@ module Fmt = struct
...
@@ -1038,6 +1038,7 @@ module Fmt = struct
let
plugin_as_package
fmt
s
=
Format
.
fprintf
fmt
"frama-c-%s"
s
let
plugin_as_package
fmt
s
=
Format
.
fprintf
fmt
"frama-c-%s"
s
let
quote
pr
fmt
s
=
Format
.
fprintf
fmt
"%S"
(
Format
.
asprintf
"%a"
pr
s
)
let
quote
pr
fmt
s
=
Format
.
fprintf
fmt
"%S"
(
Format
.
asprintf
"%a"
pr
s
)
let
list
pr
fmt
l
=
List
.
iter
(
fun
s
->
Format
.
fprintf
fmt
" %a"
pr
s
)
l
let
list
pr
fmt
l
=
List
.
iter
(
fun
s
->
Format
.
fprintf
fmt
" %a"
pr
s
)
l
let
var_libavailable
pr
fmt
s
=
Format
.
fprintf
fmt
"%%{lib-available:%a}"
pr
s
end
end
let
command_string
~
result_fmt
~
oracle_fmt
command
=
let
command_string
~
result_fmt
~
oracle_fmt
command
=
...
@@ -1114,7 +1115,7 @@ let command_string ~result_fmt ~oracle_fmt command =
...
@@ -1114,7 +1115,7 @@ let command_string ~result_fmt ~oracle_fmt command =
(targets %S %S %a)
\n
\
(targets %S %S %a)
\n
\
(deps %a %S (package frama-c)%a (universe))
\n
\
(deps %a %S (package frama-c)%a (universe))
\n
\
(action (with-stderr-to %S (with-stdout-to %S (with-accepted-exit-codes (or 0 1) (system %S)))))
\n
\
(action (with-stderr-to %S (with-stdout-to %S (with-accepted-exit-codes (or 0 1) (system %S)))))
\n
\
)
\n
"
)
@.
"
errlog
errlog
res
res
print_list
command
.
log_files
print_list
command
.
log_files
...
@@ -1123,7 +1124,8 @@ let command_string ~result_fmt ~oracle_fmt command =
...
@@ -1123,7 +1124,8 @@ let command_string ~result_fmt ~oracle_fmt command =
Fmt
.(
list
(
package_as_deps
(
quote
plugin_as_package
)))
command
.
plugins
Fmt
.(
list
(
package_as_deps
(
quote
plugin_as_package
)))
command
.
plugins
errlog
errlog
res
res
command_string
;
command_string
;
Format
.
fprintf
result_fmt
Format
.
fprintf
result_fmt
"(rule
\n
\
"(rule
\n
\
(alias %S)
\n
\
(alias %S)
\n
\
...
@@ -1158,8 +1160,12 @@ let command_string ~result_fmt ~oracle_fmt command =
...
@@ -1158,8 +1160,12 @@ let command_string ~result_fmt ~oracle_fmt command =
(
Filename
.
concat
".."
(
oracle_prefix
^
".err.oracle"
))
(
Filename
.
concat
".."
(
oracle_prefix
^
".err.oracle"
))
(
log_prefix
^
".err.log"
);
(
log_prefix
^
".err.log"
);
Format
.
fprintf
result_fmt
Format
.
fprintf
result_fmt
"(alias (deps (alias %S)) (name ptests))
\n
"
"(alias (deps (alias %S)) (name ptests)\
(
"diff-"
^
log_prefix
);
; (enabled_if (and true %a))
)@."
(
"diff-"
^
log_prefix
)
Fmt
.(
list
(
var_libavailable
plugin_as_package
))
command
.
plugins
;
Format
.
fprintf
oracle_fmt
Format
.
fprintf
oracle_fmt
"(rule (target %S) (mode fallback) (action (write-file %S
\"\"
)))
\n
"
"(rule (target %S) (mode fallback) (action (write-file %S
\"\"
)))
\n
"
(
Filename
.
basename
(
oracle_prefix
^
".err.oracle"
))
(
Filename
.
basename
(
oracle_prefix
^
".err.oracle"
))
...
...
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