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
e6d3110b
Commit
e6d3110b
authored
9 years ago
by
Kostyantyn Vorobyov
Browse files
Options
Downloads
Patches
Plain Diff
- Added debug option to the testrun.sh
- Fixed inconsistency in the documentation of testrun.sh
parent
4d03bff9
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
+19
-6
19 additions, 6 deletions
src/plugins/e-acsl/scripts/testrun.sh
with
19 additions
and
6 deletions
src/plugins/e-acsl/scripts/testrun.sh
+
19
−
6
View file @
e6d3110b
...
@@ -29,7 +29,8 @@
...
@@ -29,7 +29,8 @@
# 3. Compare outputs of the above
# 3. Compare outputs of the above
# Arguments:
# Arguments:
# $1 - base name of the source file to use (e.g., addrOf)
# $1 - base name of the source file to use excluding an
# extension (e.g., addrOf)
# $2 - base name of the test suite directory the test file is located in.
# $2 - base name of the test suite directory the test file is located in.
# (for instance e-acsl-runtime). Provided that ROOT is the directory
# (for instance e-acsl-runtime). Provided that ROOT is the directory
# holding the E-ACSL repository there should be either:
# holding the E-ACSL repository there should be either:
...
@@ -37,10 +38,14 @@
...
@@ -37,10 +38,14 @@
# $ROOT/test/e-acsl-runtime/addrOf.c
# $ROOT/test/e-acsl-runtime/addrOf.c
# $3 - if specified this script re-runs test sequence generating using
# $3 - if specified this script re-runs test sequence generating using
# -e-acsl-gmp-only option
# -e-acsl-gmp-only option
# $4 - debug flag
PREFIX
=
"
$1
"
# Prefix (test suite) directory, e.g., bts, e-acsl-runtime
set
-e
TEST
=
"
$2
"
# Based name of the test file with extension stripped
TEST
=
"
$1
"
# Based name of the test file with extension stripped
PREFIX
=
"
$2
"
# Prefix (test suite) directory, e.g., bts, e-acsl-runtime
GMP
=
"
$3
"
# Whether to use a subsequent run with -e-acsl-gmp-only
GMP
=
"
$3
"
# Whether to use a subsequent run with -e-acsl-gmp-only
DEBUG
=
"
$4
"
# Debug flag
ROOTDIR
=
"
`
readlink
-f
$(
dirname
$0
)
/../
`
"
# Root directory of the repository
ROOTDIR
=
"
`
readlink
-f
$(
dirname
$0
)
/../
`
"
# Root directory of the repository
TESTDIR
=
"
$ROOTDIR
/tests/
$PREFIX
"
TESTDIR
=
"
$ROOTDIR
/tests/
$PREFIX
"
...
@@ -52,9 +57,6 @@ LOG="$RESDIR/$TEST.testrun" # Base name for log files
...
@@ -52,9 +57,6 @@ LOG="$RESDIR/$TEST.testrun" # Base name for log files
OUT
=
"
$RESDIR
/gen_
$TEST
"
# Base name for output
OUT
=
"
$RESDIR
/gen_
$TEST
"
# Base name for output
RUNS
=
1
RUNS
=
1
# Remove all old logs and executables before running new tests
rm
-f
$LOG
.
*
$OUT
.
*
# Error reporting
# Error reporting
error
()
{
error
()
{
echo
"Error:
$1
"
1>&2
echo
"Error:
$1
"
1>&2
...
@@ -62,6 +64,16 @@ error() {
...
@@ -62,6 +64,16 @@ error() {
exit
1
exit
1
}
}
# Clean up log/output files unless the DEBUG flag is set
clean
()
{
if
[
-z
"
$DEBUG
"
]
;
then
rm
-f
$LOG
.
*
$OUT
.
*
fi
}
# Do clean up on exit
trap
"clean"
EXIT HUP INT QUIT TERM
# Instrument the given test using e-acsl-gcc.sh and compare outputs of the
# Instrument the given test using e-acsl-gcc.sh and compare outputs of the
# executables generated from instrumented and non-instrumented sources
# executables generated from instrumented and non-instrumented sources
run_test
()
{
run_test
()
{
...
@@ -95,3 +107,4 @@ run_test
...
@@ -95,3 +107,4 @@ run_test
if
test
-n
"
$GMP
"
;
then
if
test
-n
"
$GMP
"
;
then
run_test
"--gmp"
run_test
"--gmp"
fi
fi
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