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
fc92a43f
Commit
fc92a43f
authored
2 years ago
by
Patrick Baudin
Browse files
Options
Downloads
Patches
Plain Diff
[tests] minor changes into bin/test.sh
parent
be3c4d88
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
bin/test.sh
+20
-3
20 additions, 3 deletions
bin/test.sh
with
20 additions
and
3 deletions
bin/test.sh
+
20
−
3
View file @
fc92a43f
...
@@ -35,6 +35,8 @@ DUNE_LOG=./.test-errors.log
...
@@ -35,6 +35,8 @@ DUNE_LOG=./.test-errors.log
CACHEDIR
=
$(
pwd
-P
)
/.wp-cache
CACHEDIR
=
$(
pwd
-P
)
/.wp-cache
FRAMAC_WP_CACHE_GIT
=
git@git.frama-c.com:frama-c/wp-cache.git
FRAMAC_WP_CACHE_GIT
=
git@git.frama-c.com:frama-c/wp-cache.git
TEST_DIRS
=
"tests/* src/plugins/*/tests/*"
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
# --- Help Message
# --- Help Message
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
...
@@ -121,6 +123,13 @@ function Cmd
...
@@ -121,6 +123,13 @@ function Cmd
[
"
$?
"
=
"0"
]
||
Error
"(command exits
$?
):
$@
"
[
"
$?
"
=
"0"
]
||
Error
"(command exits
$?
):
$@
"
}
}
function
RequiredTools
{
for
tool
in
$@
;
do
Where
=
$(
which
$tool
)
||
Error
"Executable not found:
$tool
"
done
}
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
# --- WP Cache Environment
# --- WP Cache Environment
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
...
@@ -154,6 +163,7 @@ function CloneCache
...
@@ -154,6 +163,7 @@ function CloneCache
{
{
if
[
!
-d
"
$FRAMAC_WP_CACHEDIR
"
]
;
then
if
[
!
-d
"
$FRAMAC_WP_CACHEDIR
"
]
;
then
Head
"Cloning WP cache (from
$FRAMAC_WP_CACHE_GIT
to
$FRAMAC_WP_CACHEDIR
)..."
Head
"Cloning WP cache (from
$FRAMAC_WP_CACHE_GIT
to
$FRAMAC_WP_CACHEDIR
)..."
RequiredTools git
Cmd git clone
$FRAMAC_WP_CACHE_GIT
$FRAMAC_WP_CACHEDIR
Cmd git clone
$FRAMAC_WP_CACHE_GIT
$FRAMAC_WP_CACHEDIR
fi
fi
}
}
...
@@ -162,6 +172,7 @@ function PullCache
...
@@ -162,6 +172,7 @@ function PullCache
{
{
CloneCache
CloneCache
Head
"Pull WP cache (to
$FRAMAC_WP_CACHEDIR
)..."
Head
"Pull WP cache (to
$FRAMAC_WP_CACHEDIR
)..."
RequiredTools git
Run git
-C
$FRAMAC_WP_CACHEDIR
pull
--rebase
Run git
-C
$FRAMAC_WP_CACHEDIR
pull
--rebase
}
}
...
@@ -277,7 +288,7 @@ function Status
...
@@ -277,7 +288,7 @@ function Status
#-- Details
#-- Details
Head
"Details by directory:"
Head
"Details by directory:"
if
[
"
$NB
"
!=
"0"
]
;
then
if
[
"
$NB
"
!=
"0"
]
;
then
for
dir
in
tests/
*
src/plugins/
*
/tests/
*
;
do
for
dir
in
$TEST_DIRS
;
do
if
[
-d
"
$dir
"
]
;
then
if
[
-d
"
$dir
"
]
;
then
NB
=
$(
grep
-c
"^frama-c-wtests
$dir
"
"
$1
"
)
NB
=
$(
grep
-c
"^frama-c-wtests
$dir
"
"
$1
"
)
[
"
$NB
"
=
"0"
]
||
echo
"-
$dir
=
$NB
"
[
"
$NB
"
=
"0"
]
||
echo
"-
$dir
=
$NB
"
...
@@ -293,7 +304,8 @@ function Status
...
@@ -293,7 +304,8 @@ function Status
#-- Check wp-cache status
#-- Check wp-cache status
if
[
"
$UPDATE
"
=
"yes"
]
;
then
if
[
"
$UPDATE
"
=
"yes"
]
;
then
Head
"Check
$FRAMAC_WP_CACHEDIR
status"
Head
"Check
$FRAMAC_WP_CACHEDIR
status"
git
-C
$FRAMAC_WP_CACHEDIR
status
-s
RequiredTools git
Run git
-C
$FRAMAC_WP_CACHEDIR
status
-s
fi
fi
}
}
...
@@ -343,7 +355,12 @@ do
...
@@ -343,7 +355,12 @@ do
shift
shift
;;
;;
"-a"
|
"--all"
)
"-a"
|
"--all"
)
TESTS
=
"tests src/plugins/*/tests"
TESTS
=
""
for
dir
in
$TEST_DIRS
;
do
if
[
-d
"
$dir
"
]
;
then
TESTS
=
"
$TESTS
$dir
"
fi
done
;;
;;
*
)
*
)
TESTS+
=
"
$1
"
TESTS+
=
"
$1
"
...
...
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