-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
58 lines (44 loc) · 1.59 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
BASE_IMG ?= eco-gotests
BASE_TAG ?= latest
# Export GO111MODULE=on to enable project to be built from within GOPATH/src
export GO111MODULE=on
GO_PACKAGES=$(shell go list ./... | grep -v vendor)
.PHONY: lint \
deps-update \
vet
vet:
go vet ${GO_PACKAGES}
lint:
@echo "Running go lint"
scripts/golangci-lint.sh
deps-update:
go mod tidy && \
go mod vendor
sync-eco-goinfra:
go get github.com/openshift-kni/eco-goinfra
go mod tidy
go mod vendor
install-ginkgo:
scripts/install-ginkgo.sh
build-docker-image:
@echo "Building docker image"
podman build -t "${BASE_IMG}:${BASE_TAG}" -f Dockerfile
build-docker-image-ran-du: build-docker-image
@echo "Building docker image for RAN DU tests"
podman build --build-arg=BASE_IMG="${BASE_IMG}" --build-arg=BASE_TAG="${BASE_TAG}" -t eco-gotests-ran-du:latest -f images/system-tests/ran-du/Dockerfile
install: deps-update install-ginkgo
@echo "Installing needed dependencies"
run-tests:
@echo "Executing eco-gotests test-runner script"
scripts/test-runner.sh
run-internal-pkg-unit-tests:
@echo "Executing eco-gotests internal package unit tests"
UNIT_TEST=true go test -v ./tests/internal/...
run-system-tests-pkg-unit-tests:
@echo "Executing eco-gotests internal package unit tests"
UNIT_TEST=true go test -v ./tests/system-tests/diskencryption/internal/helper
UNIT_TEST=true go test -v ./tests/system-tests/diskencryption/internal/stdin-matcher
# Note: To add more unit tests for more packages, add corresponding targets here
test: run-internal-pkg-unit-tests run-system-tests-pkg-unit-tests
coverage-html: test
go tool cover -html cover.out