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 @@
# #
##########################################################################
THIS_SCRIPT="$0"
CONFIG="<all>"
VERBOSE=
UPDATE=
......@@ -34,9 +35,9 @@ FRAMAC_WP_CACHE_GIT=git@git.frama-c.com:frama-c/wp-cache.git
# --- Help Message
# --------------------------------------------------------------------------
THIS_SCRIPT="$0"
function Usage
{
SetEnv
echo "USAGE"
echo ""
echo "${THIS_SCRIPT} [OPTIONS|TESTS]..."
......@@ -65,13 +66,13 @@ function Usage
echo ""
echo "VARIABLES"
echo ""
echo " FRAMAC_WP_CACHEDIR=$FRAMAC_WP_CACHEDIR"
echo " Git URL: $FRAMAC_WP_CACHE_GIT"
echo " Please, always push updates to #master branch"
echo ""
echo " FRAMAC_WP_CACHE=$FRAMAC_WP_CACHE"
echo " FRAMAC_WP_CACHE ($FRAMAC_WP_CACHE)"
echo " Management mode of wp-cache"
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
# --- 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
{
if [ "$FRAMAC_WP_CACHE" = "" ]
......@@ -144,8 +131,20 @@ function SetEnv
FRAMAC_WP_CACHEDIR=./.wp-cache
Echo "Set FRAMAC_WP_CACHEDIR=$FRAMAC_WP_CACHEDIR"
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
function TestDir
{
CloneCache
case "$CONFIG" in
"<all>")
ALIAS=$1/ptests
......@@ -175,6 +175,7 @@ function TestDir
function TestFile
{
CloneCache
DIR=$(dirname $1)
FILE=$(basename $1)
[ "$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