From 8922cae7cc0de7ece320f02a3b43710cd805b920 Mon Sep 17 00:00:00 2001 From: Colin Hutchinson Date: Wed, 9 Nov 2022 16:22:40 +0000 Subject: [PATCH] chore(ci): make the tests skippable --- Makefile | 2 ++ test/run_tests.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 3687aa49..c0812401 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ TEST_PROXY_PROTOCOL?=http:// TEST_PROXY_PORT?=8000 TEST_PROXY_URI?=$(TEST_PROXY_PROTOCOL)$(TEST_HOST):$(TEST_PROXY_PORT) TEST_COMPOSE_PATH="$(PWD)/test/kong-tests-compose.yaml" +SKIP_TESTS?=false KONG_SOURCE_LOCATION?="$$PWD/../kong/" EDITION?=`grep EDITION $(KONG_SOURCE_LOCATION)/.requirements | awk -F"=" '{print $$2}'` @@ -443,6 +444,7 @@ ifneq ($(RESTY_IMAGE_BASE),src) TEST_SHA=$(TEST_SHA) \ UPDATE_CACHE_COMMAND="$(UPDATE_CACHE_COMMAND)" \ VERBOSE=$(VERBOSE) \ + SKIP_TESTS=$(SKIP_TESTS) \ ./test/run_tests.sh && make update-cache-images endif diff --git a/test/run_tests.sh b/test/run_tests.sh index 2f480cb4..9e732c7a 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -10,6 +10,10 @@ if [[ "$RESTY_IMAGE_BASE" == "src" ]]; then exit 0 fi +if [[ "$SKIP_TEST" == "true" ]]; then + exit 0 +fi + # used to skip systemd-based tests that require a /sys/fs/cgroup mount in # 01-package/run.sh which doesn't exists on Mac OS if uname -a | grep -qs -i darwin; then