forked from xelabs/benchyou
-
Notifications
You must be signed in to change notification settings - Fork 3
/
makefile
47 lines (40 loc) · 868 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
40
41
42
43
44
45
46
47
export GOPATH := $(shell pwd)
export PATH := $(GOPATH)/bin:$(PATH)
build:
@echo "--> go get..."
go get github.com/xelabs/go-mysqlstack/driver
@echo "--> Building..."
@mkdir -p bin/
go build -v -o bin/benchyou src/bench/benchyou.go
@chmod 755 bin/*
clean:
@echo "--> Cleaning..."
@go clean
@rm -f bin/*
fmt:
go fmt ./...
test:
@echo "--> Testing..."
@$(MAKE) testxcmd
@$(MAKE) testxworker
@$(MAKE) testxcommon
@$(MAKE) testsysbench
testxcmd:
go test -v xcmd
testxworker:
go test -v xworker
testxcommon:
go test -v xworker
testsysbench:
go test -v sysbench
# code coverage
COVPKGS = sysbench\
xcmd\
xworker\
xcommon
coverage:
go build -v -o bin/gotestcover \
src/vendor/github.com/pierrre/gotestcover/*.go;
gotestcover -coverprofile=coverage.out -v $(COVPKGS)
go tool cover -html=coverage.out
.PHONY: build clean fmt test coverage