Skip to content
Snippets Groups Projects
Commit 62c1ed61 authored by Patrick Baudin's avatar Patrick Baudin
Browse files

[tests] adds option -n <alias-name> to bin/test.sh

parent 2c6c42fe
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,7 @@ SAVE= ...@@ -32,6 +32,7 @@ SAVE=
DUNE_ALIAS= DUNE_ALIAS=
DUNE_OPT= DUNE_OPT=
DUNE_LOG=./.test-errors.log DUNE_LOG=./.test-errors.log
ALIAS_NAME=ptests
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
...@@ -61,6 +62,7 @@ function Usage ...@@ -61,6 +62,7 @@ function Usage
echo "" echo ""
echo "OPTIONS" echo "OPTIONS"
echo "" echo ""
echo " -n|--name <alias> set dune alias name (default to ptests)"
echo " -r|--clean clean (remove all) test results (includes -p)" echo " -r|--clean clean (remove all) test results (includes -p)"
echo " -p|--ptests prepare (all) dune files" echo " -p|--ptests prepare (all) dune files"
echo " -w|--wp-cache prepare (pull) WP-cache" echo " -w|--wp-cache prepare (pull) WP-cache"
...@@ -206,15 +208,15 @@ function TestDir ...@@ -206,15 +208,15 @@ function TestDir
CloneCache CloneCache
case "$CONFIG" in case "$CONFIG" in
"<all>") "<all>")
ALIAS=$1/ptests ALIAS=$1/${ALIAS_NAME}
CFG="(all configs)" CFG="(all configs)"
;; ;;
"<default>") "<default>")
ALIAS=$1/ptests_config ALIAS=$1/${ALIAS_NAME}_config
CFG="(default config)" CFG="(default config)"
;; ;;
*) *)
ALIAS=$1/ptests_config_$CONFIG ALIAS=$1/${ALIAS_NAME}_config_$CONFIG
CFG="(config $CONFIG)" CFG="(config $CONFIG)"
;; ;;
esac esac
...@@ -355,6 +357,10 @@ do ...@@ -355,6 +357,10 @@ do
CONFIG=$2 CONFIG=$2
shift shift
;; ;;
"-n"|"--name")
ALIAS_NAME=$2
shift
;;
"-a"|"--all") "-a"|"--all")
TESTS="" TESTS=""
for dir in $TEST_DIRS ; do for dir in $TEST_DIRS ; do
......
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