From e24c456889fe66ada032f059119e729f9abcda3f Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Thu, 30 Sep 2021 11:43:22 +0200 Subject: [PATCH] jenkins/kola/packet.sh: fix check for skipping machine type tests The cl.basic and cl.internet tests are different tests which wasn't clear before. Also, the grep process returns an exit code of 1 if it didn't find a match, causing the job to cancel. The list of tests is space separated and should not be quoted but on the other hand, we do have to handle a literal *. Look for the right test and handle the grep exit code, and disable globs for the subshell for preserving a literal *. --- jenkins/kola/packet.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jenkins/kola/packet.sh b/jenkins/kola/packet.sh index a5fd163640..962e352378 100755 --- a/jenkins/kola/packet.sh +++ b/jenkins/kola/packet.sh @@ -31,9 +31,9 @@ if [[ "${KOLA_TESTS}" == "" ]]; then KOLA_TESTS="*" fi -# cl.basic includes cl.internet which is run on multiple instance types -cl_basic_included="$(bin/kola list --platform=packet --filter "${KOLA_TESTS}" | grep cl.basic)" -if [[ "${BOARD}" == "amd64-usr" ]] && [[ "${cl_basic_included}" != "" ]]; then +# Run the cl.internet test on multiple machine types only if it should run in general +cl_internet_included="$(set -o noglob; bin/kola list --platform=packet --filter ${KOLA_TESTS} | { grep cl.internet || true ; } )" +if [[ "${BOARD}" == "amd64-usr" ]] && [[ "${cl_internet_included}" != "" ]]; then for INSTANCE in c3.small.x86 c3.medium.x86 m3.large.x86 s3.xlarge.x86 n2.xlarge.x86; do ( OUTPUT=$(timeout --signal=SIGQUIT "${timeout}" bin/kola run \