#!/bin/bash

#  ============LICENSE_START===============================================
#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
#  ========================================================================
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#  ============LICENSE_END=================================================

# Script containing all functions needed for auto testing of test suites

echo "Test suite started as: ${BASH_SOURCE[$i+1]} "$1 $2


IMAGE_TAG=""

paramError=1
if [ $# -gt 0 ]; then
	if [ $1 == "local" ] || [ $1 == "remote" ] || [ $1 == "remote-remove" ] ; then
		paramError=0
	fi
fi
if [ $# -eq 2 ]; then
    if [ $2 == "auto-clean" ]; then
		paramError=0
    fi
fi
if [ $paramError -ne 0 ]; then
	echo "Expected arg: local|remote|remote-remove [ auto-clean ]"
	exit 1
fi

# Set a description string for the test suite
if [ -z "$TS_ONELINE_DESCR" ]; then
	TS_ONELINE_DESCR="<no-description>"
	echo "No test suite description found, TC_ONELINE_DESCR should be set on in the test script , using "$TS_ONELINE_DESCR
fi

TSTEST_START=$SECONDS

suite_setup() {
    ATS=$(basename "${BASH_SOURCE[$i+1]}" .sh)

    echo "#################################################################################################"
    echo "###################################      Test suite: "$ATS
    echo "###################################      Started:    "$(date)
    echo "#################################################################################################"
    echo "## Description: " $TS_ONELINE_DESCR
    echo "#################################################################################################"
    echo ""
    echo 0 > .tmp_tcsuite_ctr
    echo 0 > .tmp_tcsuite_pass_ctr
    echo 0 > .tmp_tcsuite_fail_ctr
    rm .tmp_tcsuite_pass &> /dev/null
    touch .tmp_tcsuite_pass
    rm .tmp_tcsuite_fail &> /dev/null
    touch .tmp_tcsuite_fail
}

__print_err() {
    echo ${FUNCNAME[1]} " "$1" " ${BASH_SOURCE[$i+2]} " line" ${BASH_LINENO[$i+1]}
}

run_tc() {
	if [ $# -eq 2 ]; then
		./$1 $2 $IMAGE_TAG
	elif [ $# -eq 3 ]; then
		./$1 $2 $3
	else
		echo -e "Test case \033[31m\033[1m./"$1 $2 $3 "could not be executed.\033[0m"
	fi
}

suite_complete() {
    TSTEST_END=$SECONDS
    echo ""
    echo "#################################################################################################"
    echo "###################################      Test suite: "$ATS
    echo "###################################      Ended:      "$(date)
    echo "#################################################################################################"
    echo "## Description: " $TS_ONELINE_DESCR
    echo "## Execution time: " $((TSTEST_END-TSTEST_START)) " seconds"
    echo "#################################################################################################"
    echo "###################################      RESULTS"
    echo ""

    TCSUITE_CTR=$(< .tmp_tcsuite_ctr)
    TCSUITE_PASS_CTR=$(< .tmp_tcsuite_pass_ctr)
    TCSUITE_FAIL_CTR=$(< .tmp_tcsuite_fail_ctr)

    total=$((TCSUITE_PASS_CTR+TCSUITE_FAIL_CTR))
    if [ $TCSUITE_CTR -eq 0 ]; then
		echo -e "\033[1mNo test cases seem to have executed. Check the script....\033[0m"
	elif [ $total != $TCSUITE_CTR ]; then
        echo -e "\033[1mTotal number of test cases does not match the sum of passed and failed test cases. Check the script....\033[0m"
    fi
    echo "Number of test cases : " $TCSUITE_CTR
    echo -e "Number of \033[31m\033[1mFAIL\033[0m:        " $TCSUITE_FAIL_CTR
    echo -e "Number of \033[32m\033[1mPASS\033[0m:        " $TCSUITE_PASS_CTR
    echo ""
    echo "PASS test cases"
    cat .tmp_tcsuite_pass
    echo ""
    echo "FAIL test cases"
    cat .tmp_tcsuite_fail
    echo ""

    echo "###################################      Test suite completed      ##############################"
    echo "#################################################################################################"
}