Skip to content
Snippets Groups Projects
Commit d5dd7209 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[dune] fix ./bin/test help on variables

parent 589747be
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
# # # #
########################################################################## ##########################################################################
THIS_SCRIPT="$0"
CONFIG="<all>" CONFIG="<all>"
VERBOSE= VERBOSE=
UPDATE= UPDATE=
...@@ -34,9 +35,9 @@ FRAMAC_WP_CACHE_GIT=git@git.frama-c.com:frama-c/wp-cache.git ...@@ -34,9 +35,9 @@ FRAMAC_WP_CACHE_GIT=git@git.frama-c.com:frama-c/wp-cache.git
# --- Help Message # --- Help Message
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
THIS_SCRIPT="$0"
function Usage function Usage
{ {
SetEnv
echo "USAGE" echo "USAGE"
echo "" echo ""
echo "${THIS_SCRIPT} [OPTIONS|TESTS]..." echo "${THIS_SCRIPT} [OPTIONS|TESTS]..."
...@@ -65,13 +66,13 @@ function Usage ...@@ -65,13 +66,13 @@ function Usage
echo "" echo ""
echo "VARIABLES" echo "VARIABLES"
echo "" echo ""
echo " FRAMAC_WP_CACHEDIR=$FRAMAC_WP_CACHEDIR" echo " FRAMAC_WP_CACHE ($FRAMAC_WP_CACHE)"
echo " Git URL: $FRAMAC_WP_CACHE_GIT"
echo " Please, always push updates to #master branch"
echo ""
echo " FRAMAC_WP_CACHE=$FRAMAC_WP_CACHE"
echo " Management mode of wp-cache" echo " Management mode of wp-cache"
echo "" echo ""
echo " FRAMAC_WP_CACHEDIR ($FRAMAC_WP_CACHEDIR)"
echo " Use $FRAMAC_WP_CACHE_GIT"
echo " Please, always push to master branch"
echo ""
} }
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
...@@ -117,20 +118,6 @@ function Cmd ...@@ -117,20 +118,6 @@ function Cmd
# --- WP Cache Environment # --- WP Cache Environment
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
function CloneCache
{
if [ ! -d "$FRAMAC_WP_CACHEDIR" ]; then
Head "Cloning WP cache..."
Cmd git clone $FRAMAC_WP_CACHE_GIT $FRAMAC_WP_CACHEDIR
fi
}
function PullCache
{
Head "Pull WP cache..."
Run git -C $FRAMAC_WP_CACHEDIR pull --rebase
}
function SetEnv function SetEnv
{ {
if [ "$FRAMAC_WP_CACHE" = "" ] if [ "$FRAMAC_WP_CACHE" = "" ]
...@@ -144,8 +131,20 @@ function SetEnv ...@@ -144,8 +131,20 @@ function SetEnv
FRAMAC_WP_CACHEDIR=./.wp-cache FRAMAC_WP_CACHEDIR=./.wp-cache
Echo "Set FRAMAC_WP_CACHEDIR=$FRAMAC_WP_CACHEDIR" Echo "Set FRAMAC_WP_CACHEDIR=$FRAMAC_WP_CACHEDIR"
fi fi
}
CloneCache function CloneCache
{
if [ ! -d "$FRAMAC_WP_CACHEDIR" ]; then
Head "Cloning WP cache..."
Cmd git clone $FRAMAC_WP_CACHE_GIT $FRAMAC_WP_CACHEDIR
fi
}
function PullCache
{
Head "Pull WP cache..."
Run git -C $FRAMAC_WP_CACHEDIR pull --rebase
} }
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
...@@ -154,6 +153,7 @@ function SetEnv ...@@ -154,6 +153,7 @@ function SetEnv
function TestDir function TestDir
{ {
CloneCache
case "$CONFIG" in case "$CONFIG" in
"<all>") "<all>")
ALIAS=$1/ptests ALIAS=$1/ptests
...@@ -175,6 +175,7 @@ function TestDir ...@@ -175,6 +175,7 @@ function TestDir
function TestFile function TestFile
{ {
CloneCache
DIR=$(dirname $1) DIR=$(dirname $1)
FILE=$(basename $1) FILE=$(basename $1)
[ "$CONFIG" != "<all>" ] || \ [ "$CONFIG" != "<all>" ] || \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment