-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
39 lines (28 loc) · 1.02 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
all: test
export MYSQLX_TEST_DATASOURCE ?= mysqlx://my_user:[email protected]:33060/?_auth-method=PLAIN&_dial-timeout=1s&time_zone=UTC
install:
go install -v ./...
go test -v -i ./...
test: install
go test -v -tags gofuzz
test-race:
go install -v -race ./...
go test -v -race -i ./...
go test -v -race -tags gofuzz
test-cover: install
go test -v -coverprofile=coverage.txt -covermode=atomic
cover: test-cover
go tool cover -html=coverage.txt
bench: test
go test -run=NONE -bench=. -benchtime=3s -count=5 -benchmem | tee bench.txt
check: install
golangci-lint run
proto:
go install -v ./vendor/github.com/gogo/protobuf/protoc-gen-gofast
cd internal/proto && go run compile.go
fuzz: test
env GO111MODULE=off go-fuzz-build -func=FuzzUnmarshalDecimal github.com/AlekSi/mysqlx
env GO111MODULE=off go-fuzz -bin=mysqlx-fuzz.zip -workdir=go-fuzz/unmarshalDecimal
seed:
docker exec -ti mysqlx sh -c 'mysql < /test_db/mysql/world_x/world_x.sql'
docker exec -ti mysqlx mysql -e "GRANT ALL ON world_x.* TO 'my_user'@'%';"