From 74db7b5934b1e4231ac2e07e9ae207b05592e4a7 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Tue, 14 Jul 2020 13:43:49 +0200 Subject: [PATCH] TT#81700 get_results.sh: fix error on tap summary scenarios that are PRO only should not be in the SCEN list. Introduced at 25f2e51c05df1b8a7402172d34698de8e4afc448 Change-Id: I0aa13dada4b8ddc73f799a1132a6c515a715aee1 --- get_results.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/get_results.sh b/get_results.sh index 185035c5..2ad1f1d8 100755 --- a/get_results.sh +++ b/get_results.sh @@ -23,6 +23,16 @@ usage() { echo "BIN_DIR:${BIN_DIR}" } +filter_scenario() { + # filter out PRO only scenarios on CE + local scen=$1 + + if [ "${PROFILE}" == CE ] ; then + [ -f "${BASE_DIR}/${GROUP}/${scen}/pro.yml" ] && return 1 + fi + return 0 +} + get_scenarios() { local t local flag @@ -34,13 +44,14 @@ get_scenarios() { echo "$(date) - scenario: ${t}/scenario.yml at ${GROUP} not found" flag=true else - SCEN+=( "${t}" ) + filter_scenario "${t}" && SCEN+=( "${t}" ) fi done ${flag} && exit 1 else while read -r t; do - SCEN+=( "$(basename "${t}")" ) + t=$(basename "${t}") + filter_scenario "${t}" && SCEN+=( "${t}" ) done < <(find "${BASE_DIR}/${GROUP}/" -name scenario.yml \ -type f -exec dirname {} \; | sort) fi