From 262022ded728bcaeb2042bf47e28a3007c661138 Mon Sep 17 00:00:00 2001 From: Jose Luis Ojosnegros Date: Mon, 12 Jun 2023 08:45:04 +0200 Subject: [PATCH] OCPBUGS-14756: [test] [e2e] Check ci lanes are executing the right test suites (#679) * test: e2e-gcp-pao: Run just the right suites * format changes * test: e2e-gcp-pao-updating-profile Update suites * layout changes --- hack/run-functests.sh | 18 +++++++++--------- hack/run-update-testing.sh | 11 +++++------ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/hack/run-functests.sh b/hack/run-functests.sh index 17d895de3..82b794acf 100755 --- a/hack/run-functests.sh +++ b/hack/run-functests.sh @@ -1,18 +1,18 @@ #!/bin/bash -GINKGO_SUITS=${GINKGO_SUITS:-"test/e2e/performanceprofile/functests"} +GINKGO_SUITS=${GINKGO_SUITS:-"test/e2e/performanceprofile/functests/0_config test/e2e/performanceprofile/functests/1_performance test/e2e/performanceprofile/functests/6_mustgather_testing"} LATENCY_TEST_RUN=${LATENCY_TEST_RUN:-"false"} OC_TOOL="${OC_TOOL:-oc}" which ginkgo if [ $? -ne 0 ]; then - echo "Downloading ginkgo tool" - go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@v2.6.1 - ginkgo version + echo "Downloading ginkgo tool" + go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@v2.6.1 + ginkgo version fi NO_COLOR="" -if ! which tput &> /dev/null 2>&1 || [[ $(tput -T$TERM colors) -lt 8 ]]; then +if ! which tput &>/dev/null 2>&1 || [[ $(tput -T$TERM colors) -lt 8 ]]; then echo "Terminal does not seem to support colored output, disabling it" NO_COLOR="-noColor" fi @@ -24,9 +24,9 @@ fi if [[ -z "${CNF_TESTS_IMAGE}" ]]; then - echo "autodetected cluster version: ${ocp_version}" - ocp_version=$(${OC_TOOL} get clusterversion -o jsonpath='{.items[].status.desired.version}{"\n"}' | awk -F "." '{print $1"."$2}') - export CNF_TESTS_IMAGE=cnf-tests:${ocp_version} + echo "autodetected cluster version: ${ocp_version}" + ocp_version=$(${OC_TOOL} get clusterversion -o jsonpath='{.items[].status.desired.version}{"\n"}' | awk -F "." '{print $1"."$2}') + export CNF_TESTS_IMAGE=cnf-tests:${ocp_version} fi echo "Running Functional Tests: ${GINKGO_SUITS}" @@ -35,4 +35,4 @@ echo "Running Functional Tests: ${GINKGO_SUITS}" # --fail-fast: ginkgo will stop the suite right after the first spec failure # --flake-attempts: rerun the test if it fails # --require-suite: fail if tests are not executed because of missing suite -GOFLAGS=-mod=vendor ginkgo $NO_COLOR --v -r --fail-fast --skip-package="5_latency_testing,2_performance_update" --flake-attempts=2 --require-suite ${GINKGO_SUITS} --junit-report=report.xml +GOFLAGS=-mod=vendor ginkgo $NO_COLOR --v -r --fail-fast --flake-attempts=2 --require-suite ${GINKGO_SUITS} --junit-report=report.xml diff --git a/hack/run-update-testing.sh b/hack/run-update-testing.sh index d367fd5e7..a5b958728 100755 --- a/hack/run-update-testing.sh +++ b/hack/run-update-testing.sh @@ -1,17 +1,17 @@ #!/bin/bash -GINKGO_SUITS=${GINKGO_SUITS:-"test/e2e/performanceprofile/functests/0_config test/e2e/performanceprofile/functests/2_performance_update"} +GINKGO_SUITS=${GINKGO_SUITS:-"test/e2e/performanceprofile/functests/0_config test/e2e/performanceprofile/functests/2_performance_update test/e2e/performanceprofile/functests/3_performance_status test/e2e/performanceprofile/functests/7_performance_kubelet_node test/e2e/performanceprofile/functests/8_reboot"} LATENCY_TEST_RUN=${LATENCY_TEST_RUN:-"false"} which ginkgo if [ $? -ne 0 ]; then - echo "Downloading ginkgo tool" - go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@v2.6.1 - ginkgo version + echo "Downloading ginkgo tool" + go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@v2.6.1 + ginkgo version fi NO_COLOR="" -if ! which tput &> /dev/null 2>&1 || [[ $(tput -T$TERM colors) -lt 8 ]]; then +if ! which tput &>/dev/null 2>&1 || [[ $(tput -T$TERM colors) -lt 8 ]]; then echo "Terminal does not seem to support colored output, disabling it" NO_COLOR="-noColor" fi @@ -21,7 +21,6 @@ if [ -n "${IMAGE_FORMAT}" ]; then LATENCY_TEST_RUN="true" fi - echo "Running Functional Tests: ${GINKGO_SUITS}" # -v: print out the text and location for each spec before running it and flush output to stdout in realtime # -r: run suites recursively