ci: add a test run for Iovec based on PtrGuard

Signed-off-by: Sven Anderson <sven@redhat.com>
This commit is contained in:
Sven Anderson 2021-01-18 23:29:06 +01:00 committed by John Mulligan
parent b8a803ccbb
commit 5768911be7
3 changed files with 20 additions and 4 deletions

View File

@ -37,6 +37,8 @@ jobs:
- uses: actions/checkout@v2
- name: Run test container
run: make test-container "CEPH_VERSION=${{ matrix.ceph_version }}" "RESULTS_DIR=$PWD/_results"
- name: Run ptrguard test container
run: make test-container "USE_PTRGUARD=true" "CEPH_VERSION=${{ matrix.ceph_version }}" "RESULTS_DIR=$PWD/_results"
- name: Archive coverage results
uses: actions/upload-artifact@v2
with:

View File

@ -7,6 +7,7 @@ CEPH_VERSION := nautilus
RESULTS_DIR :=
CHECK_GOFMT_FLAGS := -e -s -l
IMPLEMENTS_OPTS :=
BUILD_TAGS := $(CEPH_VERSION)
ifeq ($(CONTAINER_CMD),)
CONTAINER_CMD:=$(shell docker version >/dev/null 2>&1 && echo docker)
@ -21,6 +22,11 @@ BUILDFILE=.build.$(CEPH_VERSION)
# the name of the image plus ceph version as tag
CI_IMAGE_TAG=$(CI_IMAGE_NAME):$(CEPH_VERSION)
ifneq ($(USE_PTRGUARD),)
CONTAINER_OPTS += -e USE_PTRGUARD=true
BUILD_TAGS := $(BUILD_TAGS),ptrguard
endif
SELINUX := $(shell getenforce 2>/dev/null)
ifeq ($(SELINUX),Enforcing)
VOLUME_FLAGS = :z
@ -31,11 +37,11 @@ ifdef RESULTS_DIR
endif
build:
go build -v -tags $(CEPH_VERSION) $(shell go list ./... | grep -v /contrib)
go build -v -tags $(BUILD_TAGS) $(shell go list ./... | grep -v /contrib)
fmt:
go fmt ./...
test:
go test -v -tags $(CEPH_VERSION) ./...
go test -v -tags $(BUILD_TAGS) ./...
.PHONY: test-docker test-container
test-docker: test-container
@ -78,7 +84,7 @@ test-binaries: \
test-bins: test-binaries
%.test: % force_go_build
go test -c -tags $(CEPH_VERSION) ./$<
go test -c -tags $(BUILD_TAGS) ./$<
implements:
go build -o implements ./contrib/implements

View File

@ -94,7 +94,15 @@ while true ; do
done
if [ -n "${CEPH_VERSION}" ]; then
BUILD_TAGS="-tags ${CEPH_VERSION}"
BUILD_TAGS="${CEPH_VERSION}"
fi
if [ -n "${USE_PTRGUARD}" ]; then
BUILD_TAGS+=",ptrguard"
fi
if [ -n "${BUILD_TAGS}" ]; then
BUILD_TAGS="-tags ${BUILD_TAGS}"
fi
show() {