diff options
author | halil.cakal <halil.cakal@est.tech> | 2024-11-06 15:05:22 +0000 |
---|---|---|
committer | halil.cakal <halil.cakal@est.tech> | 2024-11-18 12:24:04 +0000 |
commit | b685df03750be0ee1b9c55632dceedb7dbf4961a (patch) | |
tree | 1e2daa9df4c0ea4503e1b29230d4a960144b58e4 /k6-tests/run-k6-tests.sh | |
parent | 37962e3faca4f2306546c4f70d480b0c323d2c68 (diff) |
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 <halil.cakal@est.tech>
Diffstat (limited to 'k6-tests/run-k6-tests.sh')
-rwxr-xr-x | k6-tests/run-k6-tests.sh | 13 |
1 files changed, 9 insertions, 4 deletions
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 |