From 62c1ed61f84ec3a023db4ba7c8d7792fe14b47ed Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Mon, 17 Apr 2023 14:25:00 +0200 Subject: [PATCH] [tests] adds option -n <alias-name> to bin/test.sh --- bin/test.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/test.sh b/bin/test.sh index 2e9558da394..bcb1f160b9f 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -32,6 +32,7 @@ SAVE= DUNE_ALIAS= DUNE_OPT= DUNE_LOG=./.test-errors.log +ALIAS_NAME=ptests CACHEDIR=$(pwd -P)/.wp-cache FRAMAC_WP_CACHE_GIT=git@git.frama-c.com:frama-c/wp-cache.git @@ -61,6 +62,7 @@ function Usage echo "" echo "OPTIONS" echo "" + echo " -n|--name <alias> set dune alias name (default to ptests)" echo " -r|--clean clean (remove all) test results (includes -p)" echo " -p|--ptests prepare (all) dune files" echo " -w|--wp-cache prepare (pull) WP-cache" @@ -206,15 +208,15 @@ function TestDir CloneCache case "$CONFIG" in "<all>") - ALIAS=$1/ptests + ALIAS=$1/${ALIAS_NAME} CFG="(all configs)" ;; "<default>") - ALIAS=$1/ptests_config + ALIAS=$1/${ALIAS_NAME}_config CFG="(default config)" ;; *) - ALIAS=$1/ptests_config_$CONFIG + ALIAS=$1/${ALIAS_NAME}_config_$CONFIG CFG="(config $CONFIG)" ;; esac @@ -355,6 +357,10 @@ do CONFIG=$2 shift ;; + "-n"|"--name") + ALIAS_NAME=$2 + shift + ;; "-a"|"--all") TESTS="" for dir in $TEST_DIRS ; do -- GitLab