-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
72 lines (62 loc) · 1.97 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
SHELL = /bin/bash
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
### By default we test all quickstarters located in ods-quickstarters
QS := ods-quickstarters/...
### By default we do not parallelize tests
PARALLEL := 1
## Full test of existing ODS core installation. Caution: Creates UNITT project and ODSVERIFY project.
test: smoketest verify test-create-projects
.PHONY: test
## Verify existing ODS core installation.
verify: prep-tools
@(echo "Verifying ODS installation")
@(./verify.sh)
.PHONY: verify
## Test crucial functionality of existing ODS installation (project/component provision). Caution: Creates ODSVERIFY project.
smoketest: prep-tools
@(echo "Smoke testing ODS installation")
# Customisable by prov-app-config.txt in smoketest directory.
@(./smoke-test.sh)
.PHONY: smoketest
## Test project creation. Caution: Creates UNITT project.
test-create-projects:
@(echo "Run project creation tests")
@(./create-projects-test.sh)
.PHONY: test-create-projects
## Run quickstarter tests within existing ODS installation. Depends on UNITT project.
test-quickstarter:
@(./quickstarter-test.sh $(QS) $(PARALLEL))
.PHONY: test-quickstarter
## Install tools required for tests.
prep-tools:
which go-junit-report || go get github.com/jstemmer/go-junit-report
.PHONY: prep-tools
## Lint
lint:
echo "Checking code ..."
golangci-lint --version
golangci-lint run --go=1.18
.PHONY: lint
### HELP
### Based on https://gist.github.com/prwhite/8168133#gistcomment-2278355.
help:
@echo ''
@echo 'Usage:'
@echo ' make <target>'
@echo ''
@echo 'Targets:'
@awk '/^[a-zA-Z\-\_0-9]+:|^# .*/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")-1); \
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
printf " %-35s %s\n", helpCommand, helpMessage; \
} else { \
printf "\n"; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
.PHONY: help