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
7282d755
Commit
7282d755
authored
8 years ago
by
Kostyantyn Vorobyov
Browse files
Options
Downloads
Patches
Plain Diff
[tests] Performace updates in testrun.sh
parent
8a1c962a
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
src/plugins/e-acsl/scripts/testrun.sh
+23
-15
23 additions, 15 deletions
src/plugins/e-acsl/scripts/testrun.sh
with
23 additions
and
15 deletions
src/plugins/e-acsl/scripts/testrun.sh
+
23
−
15
View file @
7282d755
...
@@ -103,7 +103,9 @@ run_executable() {
...
@@ -103,7 +103,9 @@ run_executable() {
local
log
=
"
$2
"
local
log
=
"
$2
"
local
model
=
"
$3
"
local
model
=
"
$3
"
debug
"Run and log
$executable
"
debug
"Run:
$executable
"
debug
"Log:
$log
"
if
!
`
$executable
>
$log
2>&1
`
;
then
if
!
`
$executable
>
$log
2>&1
`
;
then
error
"[
$3
model] Runtime failure in test case '
$TEST
'"
$log
error
"[
$3
model] Runtime failure in test case '
$TEST
'"
$log
fi
fi
...
@@ -119,27 +121,33 @@ run_test() {
...
@@ -119,27 +121,33 @@ run_test() {
local
model
=
"
$1
"
# Memory model to link against
local
model
=
"
$1
"
# Memory model to link against
local
extra
=
"
$2
"
# Additional arguments to e-acsl-gcc.sh
local
extra
=
"
$2
"
# Additional arguments to e-acsl-gcc.sh
# Command for instrumenting the source file and compiling the original
# e-acsl-gcc.sh reports models as space-separated string. Make a
# and the instrumented code
# comma-separated one otherwise the following does not work
COMMAND
=
"
$EACSLGCC
\
MODELSTR
=
"
$(
echo
$MODELS
|
tr
' '
','
)
"
--compile
$TESTFILE
--ocode=
$ocode
--logfile=
$logfile
\
--instrumented-only --memory-model=
$model
--oexec=
$oexec
$extra
"
# Command for instrumenting the source file
COMMAND
=
"
$EACSLGCC
$TESTFILE
--ocode=
$ocode
--logfile=
$logfile
$extra
"
debug
"Run
$COMMAND
"
debug
"Run
$COMMAND
"
$COMMAND
||
error
"Command
$COMMAND
failed"
"
$logfile
"
$COMMAND
||
error
"Command
$COMMAND
failed"
"
$logfile
"
# Log outputs of the generated executables
# Compile instrumented source and run executable
run_executable
"
$oexec
.e-acsl"
"
$oexeclog
.e-acsl"
"
$model
"
for
model
in
$MODELS
;
do
# Command for compiling the instrumented file with a given memory model
COMMAND
=
"
$EACSLGCC
--compile-only --memory-model=
$model
--logfile=
$logfile
\
--oexec-e-acsl=
$oexec
-
$model
$ocode
"
debug
"Run
$COMMAND
"
$COMMAND
||
error
"Command
$COMMAND
failed"
"
$logfile
"
run_executable
$oexec
-
$model
$oexeclog
-
$model
$model
done
RUNS
=
$((
RUNS+1
))
RUNS
=
$((
RUNS+1
))
}
}
for
model
in
$MODELS
;
do
run_test
$model
"
$EXTRA
"
run_test
$model
"
$EXTRA
"
# Run GMP tests if specified
# Run GMP tests if specified
if
[
-n
"
$GMP
"
]
;
then
if
[
-n
"
$GMP
"
]
;
then
run_test
$model
"--gmp
$EXTRA
"
run_test
$model
"--gmp
$EXTRA
"
fi
fi
done
exit
0
exit
0
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