forked from quickfixgo/quickfix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (52 loc) · 2.18 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
all: vet test
clean:
rm -rf gen
generate: clean
mkdir -p gen; cd gen; go run ../cmd/generate-fix/generate-fix.go -pkg-root=github.com/quickfixgo/quickfix/gen ../spec/*.xml
fmt:
gofmt -l -w -s $(shell find . -type f -name '*.go')
vet:
go vet `go list ./... | grep -v quickfix/gen`
test:
MONGODB_TEST_CXN=mongodb://db:27017 go test -v -cover `go list ./... | grep -v quickfix/gen`
linters-install:
@golangci-lint --version >/dev/null 2>&1 || { \
echo "installing linting tools..."; \
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.50.1; \
}
lint: linters-install
golangci-lint run
# ---------------------------------------------------------------
# Targets related to running acceptance tests -
build-test-srv:
cd _test; go build -o echo_server ./test-server/
fix40:
cd _test; ./runat.sh [email protected] 5001 $(STORE_TYPE) "definitions/server/$@/*.def"
fix41:
cd _test; ./runat.sh [email protected] 5002 $(STORE_TYPE) "definitions/server/$@/*.def"
fix42:
cd _test; ./runat.sh [email protected] 5003 $(STORE_TYPE) "definitions/server/$@/*.def"
fix43:
cd _test; ./runat.sh [email protected] 5004 $(STORE_TYPE) "definitions/server/$@/*.def"
fix44:
cd _test; ./runat.sh [email protected] 5005 $(STORE_TYPE) "definitions/server/$@/*.def"
fix50:
cd _test; ./runat.sh [email protected] 5006 $(STORE_TYPE) "definitions/server/$@/*.def"
fix50sp1:
cd _test; ./runat.sh [email protected] 5007 $(STORE_TYPE) "definitions/server/$@/*.def"
fix50sp2:
cd _test; ./runat.sh [email protected] 5008 $(STORE_TYPE) "definitions/server/$@/*.def"
ACCEPT_SUITE=fix40 fix41 fix42 fix43 fix44 fix50 fix50sp1 fix50sp2
accept: $(ACCEPT_SUITE)
.PHONY: test $(ACCEPT_SUITE)
# ---------------------------------------------------------------
# ---------------------------------------------------------------
# These targets are specific to the Github CI Runner -
build-src:
go build -v `go list ./...`
build: build-src build-test-srv
test-ci:
go test -v -cover `go list ./... | grep -v quickfix/gen`
generate-ci: clean
mkdir -p gen; cd gen; go run ../cmd/generate-fix/generate-fix.go -pkg-root=github.com/quickfixgo/quickfix/gen ../spec/$(shell echo $(FIX_TEST) | tr '[:lower:]' '[:upper:]').xml;
# ---------------------------------------------------------------