From b685df03750be0ee1b9c55632dceedb7dbf4961a Mon Sep 17 00:00:00 2001 From: "halil.cakal" Date: Wed, 6 Nov 2024 15:05:22 +0000 Subject: Add new k6 test profile for running edurance tests - assign a profile name to the existing k6 tests (kpi) - add control which profile is run using k6 config file - both test profiles can run in parallel Issue-ID: CPS-2464 Change-Id: I9fea13f12e2da46bd55b4315c68209843c1abe06 Signed-off-by: halil.cakal --- k6-tests/run-k6-tests.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'k6-tests/run-k6-tests.sh') diff --git a/k6-tests/run-k6-tests.sh b/k6-tests/run-k6-tests.sh index b1ad38911a..8c4048ba8c 100755 --- a/k6-tests/run-k6-tests.sh +++ b/k6-tests/run-k6-tests.sh @@ -20,9 +20,12 @@ set -o nounset # Disallow expansion of unset variables set -o pipefail # Use last non-zero exit code in a pipeline #set -o xtrace # Uncomment for debugging +# default is empty string, which means performance tests +testProfile=${1:-kpi} + on_exit() { rc=$? - ./teardown.sh + ./teardown.sh "$testProfile" popd echo "TEST FAILURES: $rc" exit $rc @@ -34,10 +37,12 @@ pushd "$(dirname "$0")" || exit 1 # Install needed dependencies. source install-deps.sh +echo "Test profile provided: $testProfile" + # Run k6 test suite. -./setup.sh -./ncmp/run-all-tests.sh +./setup.sh "$testProfile" +./ncmp/run-all-tests.sh "$testProfile" NCMP_RESULT=$? # Note that the final steps are done in on_exit function after this exit! -exit $NCMP_RESULT +exit $NCMP_RESULT \ No newline at end of file -- cgit 1.2.3-korg