-
Notifications
You must be signed in to change notification settings - Fork 200
/
Makefile
40 lines (29 loc) · 852 Bytes
/
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
TEST?=$$(go list ./...)
GOFMT_FILES?=$$(find . -name '*.go')
PKG_NAME=postgresql
default: build
build: fmtcheck
go install
test: fmtcheck
go test $(TEST) || exit 1
echo $(TEST) | \
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
testacc_setup: fmtcheck
@sh -c "'$(CURDIR)/tests/testacc_setup.sh'"
testacc_cleanup: fmtcheck
@sh -c "'$(CURDIR)/tests/testacc_cleanup.sh'"
testacc: fmtcheck
@sh -c "'$(CURDIR)/tests/testacc_full.sh'"
vet:
@echo "go vet ."
@go vet $$(go list ./...) ; if [ $$? -eq 1 ]; then \
echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for review."; \
exit 1; \
fi
fmt:
gofmt -w $(GOFMT_FILES)
fmtcheck:
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
.PHONY: build test testacc vet fmt fmtcheck