mirror of
https://github.com/SCST-project/scst.git
synced 2026-10-22 06:02:33 +00:00
Run Ginkgo on the target and drive a separate Open-iSCSI initiator over SSH. Keep host locks, bounded command logs and failure latches on both sides. Load checkout modules, own the foreground target daemon, and remove sessions and node records before tearing down target resources. Add discovery, login/logout, repeated login, portal filtering and CHAP scenarios. Offer each CHAP algorithm separately and verify recovery after an authentication rejection. Use dummy LUNs and per-run initiator IQNs without changing the initiator's global configuration. Register the iSCSI group with the shared runner and validate every selected host before starting the first suite. Finish local teardown before starting iSCSI tests and stop after any suite failure. Extend the configuration examples and guide with initiator setup and cleanup limits.
37 lines
1.4 KiB
Makefile
37 lines
1.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
GO ?= go
|
|
GINKGO_LABEL ?= local && basic
|
|
GINKGO_FOCUS ?=
|
|
|
|
# Export values instead of interpolating them into shell source. In particular,
|
|
# label expressions and focus regexps can contain shell metacharacters.
|
|
export GO GINKGO_LABEL GINKGO_FOCUS GINKGO_CONFIG
|
|
export SCST_TEST_SOURCE_DIR := $(abspath ../..)
|
|
|
|
help:
|
|
@echo "check : unit tests, vet and component-suite compilation; no SCST access"
|
|
@echo "list : Ginkgo dry run; no SCST access"
|
|
@echo "config : validate and print GINKGO_CONFIG; no SCST access"
|
|
@echo "test : load built SCST modules from this checkout, then run tests (root)"
|
|
@echo "test-build: build and load SCST from this checkout, then run tests (root)"
|
|
@echo "GINKGO_LABEL selects groups, e.g. local, iscsi, or basic"
|
|
|
|
check:
|
|
$(GO) test -count=1 ./internal/... ./cmd/...
|
|
$(GO) vet ./...
|
|
$(GO) test -run='^$$' ./suite ./iscsi
|
|
|
|
list:
|
|
$(GO) run ./cmd/run -list
|
|
|
|
config:
|
|
@test -n "$$GINKGO_CONFIG" || { echo "Set GINKGO_CONFIG to a JSON file" >&2; exit 2; }
|
|
$(GO) run ./cmd/config-check "$$GINKGO_CONFIG"
|
|
|
|
test test-build:
|
|
@test -n "$$GINKGO_CONFIG" || { echo "Set GINKGO_CONFIG to a disposable-host JSON file" >&2; exit 2; }
|
|
SCST_TEST_BUILD=$(if $(filter test-build,$@),1,0) SCST_TEST_CONFIG="$$GINKGO_CONFIG" \
|
|
SCST_TEST_KDIR="$${SCST_TEST_KDIR:-$${KDIR:-}}" $(GO) run ./cmd/run
|
|
|
|
.PHONY: help check list config test test-build
|