Test env improvements 47/11047/1
authorBjornMagnussonXA <bjorn.magnusson@est.tech>
Mon, 8 May 2023 12:44:06 +0000 (14:44 +0200)
committerBjornMagnussonXA <bjorn.magnusson@est.tech>
Mon, 8 May 2023 12:44:18 +0000 (14:44 +0200)
Issue-ID: NONRTRIC-871
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: I9f4b221d026962fa66f2e5f1636a6d9e63095817

test/common/testcase_common.sh

index 83889f1..5eb6ab8 100755 (executable)
@@ -1175,6 +1175,16 @@ if [ $? -ne 0 ] || [ -z "$tmp" ]; then
 fi
 echo " python3 is installed and using version: $(python3 --version)"
 
+tmp=$(type jq)
+if [ $? -ne 0 ]; then
+       echo -e $RED"command utility jq (cmd-line json processor) is not installed"$ERED
+       exit 1
+fi
+tmp=$(type envsubst)
+if [ $? -ne 0 ]; then
+       echo -e $RED"command utility envsubst (env var substitution in files) is not installed"$ERED
+       exit 1
+fi
 tmp=$(which docker)
 if [ $? -ne 0 ] || [ -z "$tmp" ]; then
        echo -e $RED"docker is required to run the test environment, pls install"$ERED
@@ -1261,7 +1271,6 @@ echo -e "Application\tApp short name\tImage\ttag\ttag-switch" > $image_list_file
 # Check if image env var is set and if so export the env var with image to use (used by docker compose files)
 # arg: <app-short-name> <target-variable-name> <image-variable-name> <image-tag-variable-name> <tag-suffix> <image name> <target-platform>
 __check_and_create_image_var() {
-       echo $@
        if [ $# -ne 7 ]; then
                echo "Expected arg: <app-short-name> <target-variable-name> <image-variable-name> <image-tag-variable-name> <tag-suffix> <image name> <target-platform>"
                ((IMAGE_ERR++))