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
26ee822c
Commit
26ee822c
authored
4 years ago
by
Patrick Baudin
Committed by
Virgile Prevosto
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Ptests] removes empty .res.oracle files as it is for .err.oracle
parent
ccb63204
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ptests/ptests.ml
+11
-13
11 additions, 13 deletions
ptests/ptests.ml
with
11 additions
and
13 deletions
ptests/ptests.ml
+
11
−
13
View file @
26ee822c
...
...
@@ -1277,25 +1277,23 @@ end = struct
let
update_toplevel_command
command
=
let
log_prefix
=
log_prefix
command
in
let
oracle_prefix
=
oracle_prefix
command
in
(* Update oracle *)
mv
(
log_prefix
^
".res.log"
)
(
oracle_prefix
^
".res.oracle"
);
(* Is there an error log ? *)
begin
try
let
log
=
log_prefix
^
".err.log"
and
oracle
=
oracle_prefix
^
".err.oracle"
in
let
update_oracle
log
oracle
=
try
if
is_file_empty_or_nonexisting
log
then
(* No, remove the
error
oracle *)
(* No, remove the oracle *)
unlink
~
silent
:
false
oracle
else
(* Yes, update the
error
oracle*)
(* Yes, update the oracle*)
mv
log
oracle
with
(* Possible error in [is_file_empty] *)
Unix
.
Unix_error
_
->
()
end
;
let
macros
=
get_macros
command
in
let
log_files
=
List
.
map
(
Macros
.
expand
macros
)
command
.
log_files
in
(* Update res.oracle and err.oracle *)
update_oracle
(
log_prefix
^
".res.log"
)
(
oracle_prefix
^
".res.oracle"
);
update_oracle
(
log_prefix
^
".err.log"
)
(
oracle_prefix
^
".err.oracle"
);
(* Update files related to LOG directives *)
let
macros
=
get_macros
command
in
let
log_files
=
List
.
map
(
Macros
.
expand
macros
)
command
.
log_files
in
List
.
iter
(
update_log_files
command
.
directory
)
log_files
end
...
...
@@ -1643,7 +1641,7 @@ let compare_one_file cmp log_prefix oracle_prefix log_kind =
let
log_file
=
Filename
.
sanitize
(
log_prefix
^
ext
^
".log"
)
in
let
oracle_file
=
Filename
.
sanitize
(
oracle_prefix
^
ext
^
".oracle"
)
in
do_filter
cmp
log_kind
;
if
log_kind
=
Err
&&
not
(
Sys
.
file_exists
oracle_file
)
then
if
not
(
Sys
.
file_exists
oracle_file
)
then
check_file_is_empty_or_nonexisting
(
Command_error
(
cmp
,
log_kind
))
~
log_file
else
begin
let
cmp_string
=
...
...
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