Skip to content

Commit

Permalink
add scorecard test/suite selection (cryostatio#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwangggg authored Feb 28, 2024
1 parent 6b2e997 commit 2af4362
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ else
KUSTOMIZE_DIR ?= config/default
endif

# Specify which scorecard tests/suites to run
ifneq ($(SCORECARD_TEST_SELECTION),)
SCORECARD_TEST_SELECTOR := --selector='test in ($(SCORECARD_TEST_SELECTION))'
endif
ifneq ($(SCORECARD_TEST_SUITE),)
SCORECARD_TEST_SELECTOR := --selector=suite=$(SCORECARD_TEST_SUITE)
endif

##@ General

.PHONY: all
Expand All @@ -159,9 +167,9 @@ endif
test-scorecard: check_cert_manager kustomize operator-sdk ## Run scorecard tests.
ifneq ($(SKIP_TESTS), true)
$(call scorecard-setup)
$(call scorecard-cleanup); \
trap cleanup EXIT; \
$(OPERATOR_SDK) scorecard -n $(SCORECARD_NAMESPACE) -s cryostat-scorecard -w 20m $(BUNDLE_IMG) --pod-security=restricted
$(call scorecard-cleanup) ; \
trap cleanup EXIT ; \
$(OPERATOR_SDK) scorecard -n $(SCORECARD_NAMESPACE) -s cryostat-scorecard -w 20m $(BUNDLE_IMG) --pod-security=restricted $(SCORECARD_TEST_SELECTOR)
endif

.PHONY: clean-scorecard
Expand Down

0 comments on commit 2af4362

Please sign in to comment.