From a59b9877f44cd0f876d7441547e99fb87be437e5 Mon Sep 17 00:00:00 2001 From: Anand Kumar Singh Date: Mon, 24 Jan 2022 14:18:19 +0530 Subject: [PATCH] split unit test into unit test and validate test (#5355) * split unit test into unit test and validate test Signed-off-by: anandrkskd * add comments and remove goget-tools from unit test Signed-off-by: anandrkskd --- .ibm/pipelines/unit-tests.sh | 5 +++-- .ibm/pipelines/validate.sh | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .ibm/pipelines/validate.sh diff --git a/.ibm/pipelines/unit-tests.sh b/.ibm/pipelines/unit-tests.sh index 2129af014..7742c9034 100644 --- a/.ibm/pipelines/unit-tests.sh +++ b/.ibm/pipelines/unit-tests.sh @@ -1,13 +1,14 @@ #!/bin/bash +# Script to run unit test on IBM Cloud +# This script needs update if there is any change in the unit test make target command + LOGFILE="pr-${GIT_PR_NUMBER}-unit-tests-${BUILD_NUMBER}" source .ibm/pipelines/functions.sh ( set -e - make goget-tools - make validate make test ) |& tee "/tmp/$LOGFILE" RESULT=${PIPESTATUS[0]} diff --git a/.ibm/pipelines/validate.sh b/.ibm/pipelines/validate.sh new file mode 100644 index 000000000..5fbe3de9e --- /dev/null +++ b/.ibm/pipelines/validate.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Script to run validate test on IBM Cloud +# This script needs update if there is any change in steps of executing validate test + +LOGFILE="pr-${GIT_PR_NUMBER}-Validate-tests-${BUILD_NUMBER}" + +source .ibm/pipelines/functions.sh + +( + set -e + make goget-tools + make validate +) |& tee "/tmp/$LOGFILE" +RESULT=${PIPESTATUS[0]} + +ibmcloud login --apikey "${API_KEY}" -r "${IBM_REGION}" +save_logs "${LOGFILE}" "Validate Tests" ${RESULT} + +exit ${RESULT}