Return-Path: From: Wang Mingyu Date: Thu, 25 Apr 2019 08:49:27 -0700 Message-ID: <1556207367-3630-1-git-send-email-wangmy@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Fuego] [PATCH] functions: Support for test sets with a horizontal line in the name. List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fuego@lists.linuxfoundation.org Signed-off-by: Wang Mingyu --- scripts/functions.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index 5251dd9..56e39cc 100755 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -147,10 +147,11 @@ function untar { # spec gitrepo > spec tarball > fuego_test gitrepo > fuego_test tarball function unpack { # prepare variables - upName=`echo "${TESTDIR^^}"| tr '.' '_'` - spec_gitrepo="${upName}_GITREPO" - spec_gitref="${upName}_GITREF" - spec_tarball="${upName}_TARBALL" + upName="${TESTDIR^^}" + specName="${upName//[-,.]/_}" + spec_gitrepo="${specName}_GITREPO" + spec_gitref="${specName}_GITREF" + spec_tarball="${specName}_TARBALL" # 1) spec gitrepo if [ ! -z "${!spec_gitrepo}" ]; then gitrepo=${!spec_gitrepo} @@ -394,7 +395,8 @@ function pre_build { # If the spec requests it, create a job-specifc # build directory. # e.g. "PER_JOB_BUILD": "true" in spec file - pjName=`echo "${TESTDIR^^}_PER_JOB_BUILD"| tr '.' '_'` + upName="${TESTDIR^^}" + pjName="${upName//[-,.]/_}_PER_JOB_BUILD" if [ "${!pjName}" == "true" ] ; then mkdir -p $JOB_BUILD_DIR else @@ -696,8 +698,8 @@ function fail_check_cases () { testlog="${LOGDIR}/testlog.txt" slog_prefix="${LOGDIR}/syslog" - upName=`echo "${TESTDIR^^}"| tr '.' '_'` - fcname="${upName}"_FAIL_CASE_COUNT + upName="${TESTDIR^^}" + fcname="${upName//[-,.]/_}_FAIL_CASE_COUNT" fcc="${!fcname}" -- 1.8.3.1