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
Package Registry
Container Registry
Model registry
Operate
Terraform modules
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
Vincent Laviron
frama-c
Commits
46014f17
Commit
46014f17
authored
4 years ago
by
Andre Maroneze
Committed by
Andre Maroneze
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Analysis-scripts] update summary.py and display-targets to new architecture
parent
98a8ea69
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
share/analysis-scripts/epilogue.mk
+3
-0
3 additions, 0 deletions
share/analysis-scripts/epilogue.mk
share/analysis-scripts/summary.py
+15
-5
15 additions, 5 deletions
share/analysis-scripts/summary.py
with
18 additions
and
5 deletions
share/analysis-scripts/epilogue.mk
+
3
−
0
View file @
46014f17
...
...
@@ -35,3 +35,6 @@ all: eva
ifeq
($(TARGETS),)
@
echo
"error: TARGETS is empty"
endif
display-targets
:
@
echo
"
$(
addprefix .frama-c/,
$(
TARGETS
))
"
This diff is collapsed.
Click to expand it.
share/analysis-scripts/summary.py
+
15
−
5
View file @
46014f17
...
...
@@ -45,14 +45,22 @@ def build_env(framac):
bindir
=
framac
+
'
/build/bin
'
return
{
**
os
.
environ
,
'
PATH
'
:
bindir
+
'
:
'
+
os
.
environ
[
'
PATH
'
]
}
def
list_targets
():
def
list_targets
(
dir
):
env
=
build_env
(
framac
)
res
=
subprocess
.
run
(
[
"
make
"
,
"
--quiet
"
,
"
display-targets
"
],
[
"
make
"
,
"
--directory
"
,
dir
,
"
--quiet
"
,
"
display-targets
"
],
env
=
env
,
stdout
=
subprocess
.
PIPE
,
encoding
=
'
ascii
'
)
return
res
.
stdout
.
split
()
targets
=
res
.
stdout
.
split
()
res
=
[]
for
target
in
targets
:
if
target
.
endswith
(
"
.eva
"
)
or
target
.
endswith
(
"
.parse
"
):
res
.
append
(
dir
+
"
/
"
+
target
)
else
:
res
+=
[
dir
+
"
/
"
+
t
for
t
in
list_targets
(
target
)]
print
(
f
"
list_targets returning:
{
res
}
"
)
return
res
def
clone_frama_c
(
clonedir
,
hash
):
print
(
"
Cloning Frama-C
"
,
hash
,
"
...
"
)
...
...
@@ -74,7 +82,7 @@ def run_make(framac, benchmark_tag=None):
'
FRAMAC_DIR=
'
+
bindir
,
'
FRAMAC=
'
+
bindir
+
'
/frama-c
'
]
if
benchmark_tag
is
None
:
args
+=
[
'
-j
'
,
'
8
'
]
args
+=
[
'
-j
'
,
str
(
os
.
cpu_count
())
]
else
:
args
+=
[
'
BENCHMARK=
'
+
benchmark_tag
]
return
subprocess
.
Popen
(
args
,
env
=
env
,
...
...
@@ -95,8 +103,10 @@ def terminate_process(process):
return
errors
def
smart_rename
(
target
):
target
=
re
.
sub
(
'
^\./
'
,
''
,
target
)
target
=
re
.
sub
(
'
main\.eva$
'
,
''
,
target
)
target
=
re
.
sub
(
'
\.eva$
'
,
''
,
target
)
target
=
re
.
sub
(
'
\.frama-c/
'
,
''
,
target
)
target
=
re
.
sub
(
'
qds/frama-c
'
,
'
qds
'
,
target
)
return
target
...
...
@@ -118,7 +128,7 @@ def poll_results(targets, benchmark_tag):
def
run_analyses
(
display
,
database
,
framac
,
benchmark_tag
):
results
=
[]
targets
=
list_targets
()
targets
=
list_targets
(
"
.
"
)
process
=
run_make
(
framac
,
benchmark_tag
)
errors
=
b
""
next_poll
=
time
.
time
()
...
...
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