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
a7833281
Commit
a7833281
authored
3 years ago
by
Patrick Baudin
Browse files
Options
Downloads
Patches
Plain Diff
[ptests] allows %{bin:tool} in plugin tests
parent
a4165c4d
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
+5
-2
5 additions, 2 deletions
ptests/ptests.ml
with
5 additions
and
2 deletions
ptests/ptests.ml
+
5
−
2
View file @
a7833281
...
@@ -592,6 +592,8 @@ module SubDir: sig
...
@@ -592,6 +592,8 @@ module SubDir: sig
val
make_oracle_file
:
t
->
string
->
string
val
make_oracle_file
:
t
->
string
->
string
val
make_result_file
:
t
->
string
->
string
val
make_result_file
:
t
->
string
->
string
val
make_file
:
t
->
string
->
string
val
make_file
:
t
->
string
->
string
val
result_dirname
:
string
end
=
struct
end
=
struct
type
t
=
string
type
t
=
string
...
@@ -1360,6 +1362,7 @@ end = struct
...
@@ -1360,6 +1362,7 @@ end = struct
let
expand_macros
=
let
expand_macros
=
let
dune_cmd_features
=
Str
.
regexp
"%{[a-z][a-z-]*:
\\
([^}]*
\\
)}"
in
let
dune_cmd_features
=
Str
.
regexp
"%{[a-z][a-z-]*:
\\
([^}]*
\\
)}"
in
let
dune_bin_features
=
Str
.
regexp
"%{bin:
\\
([^}]*
\\
)}"
in
let
dune_bin_features
=
Str
.
regexp
"%{bin:
\\
([^}]*
\\
)}"
in
let
dune_bin_subst
=
(
Filename
.
dirname
!
toplevel_path
)
^
"/
\\
1"
in
fun
~
defaults
cmd
->
fun
~
defaults
cmd
->
let
ptest_config
=
let
ptest_config
=
if
!
special_config
=
""
then
""
else
"_"
^
!
special_config
if
!
special_config
=
""
then
""
else
"_"
^
!
special_config
...
@@ -1378,7 +1381,7 @@ end = struct
...
@@ -1378,7 +1381,7 @@ end = struct
[
"PTEST_CONFIG"
,
ptest_config
;
[
"PTEST_CONFIG"
,
ptest_config
;
"PTEST_DIR"
,
SubDir
.
get
cmd
.
directory
;
"PTEST_DIR"
,
SubDir
.
get
cmd
.
directory
;
"PTEST_RESULT"
,
"PTEST_RESULT"
,
SubDir
.
get
cmd
.
directory
^
"/"
^
redefine_name
"result"
;
SubDir
.
get
cmd
.
directory
^
"/"
^
SubDir
.
result_dirname
;
"PTEST_FILE"
,
ptest_file
;
"PTEST_FILE"
,
ptest_file
;
"PTEST_NAME"
,
ptest_name
;
"PTEST_NAME"
,
ptest_name
;
"PTEST_NUMBER"
,
string_of_int
cmd
.
n
;
"PTEST_NUMBER"
,
string_of_int
cmd
.
n
;
...
@@ -1413,7 +1416,7 @@ end = struct
...
@@ -1413,7 +1416,7 @@ end = struct
else
toplevel
else
toplevel
in
in
let
toplevel
=
(* removes dune feature such as %{deps:...} *)
let
toplevel
=
(* removes dune feature such as %{deps:...} *)
let
x
=
str_global_replace
dune_bin_features
"./bin/
\\
1"
toplevel
in
let
x
=
str_global_replace
dune_bin_features
dune_bin_subst
toplevel
in
str_global_replace
dune_cmd_features
"
\\
1"
x
str_global_replace
dune_cmd_features
"
\\
1"
x
in
in
{
cmd
with
{
cmd
with
...
...
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