X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=test%2Fcommon%2Ftestsuite_common.sh;h=57285103b95b35aa4a96291a8d683f88f86eea0b;hb=HEAD;hp=2c5e6c3fc15c2d79cc3fdff5c2d62596df1393c8;hpb=acdd3f361ff7af58b0276789cc5148180a06e552;p=nonrtric.git diff --git a/test/common/testsuite_common.sh b/test/common/testsuite_common.sh index 2c5e6c3f..57285103 100644 --- a/test/common/testsuite_common.sh +++ b/test/common/testsuite_common.sh @@ -1,7 +1,7 @@ #!/bin/bash # ============LICENSE_START=============================================== -# Copyright (C) 2020 Nordix Foundation. All rights reserved. +# Copyright (C) 2023 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. @@ -29,13 +29,8 @@ if [ $# -gt 0 ]; 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 ]" + echo "Expected arg: local|remote|remote-remove" exit 1 fi @@ -99,8 +94,8 @@ suite_complete() { 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[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 @@ -113,7 +108,13 @@ suite_complete() { echo "FAIL test cases" cat .tmp_tcsuite_fail echo "" + if [ $TCSUITE_FAIL_CTR -ne 0 ]; then + echo "################################### Test suite completed with Tests FAIL ##############################" + echo "#################################################################################################" + else + echo "################################### Test suite completed ##############################" + echo "#################################################################################################" + fi - echo "################################### Test suite completed ##############################" - echo "#################################################################################################" + exit $TCSUITE_FAIL_CTR } \ No newline at end of file