forked from xiaonanln/goworld
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (35 loc) · 1.03 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
.PHONY: dispatcher test_game test_client gate chatroom_demo unity_demo
.PHONY: runtestserver killtestserver test covertest install-deps
all: install dispatcher test_game test_client gate chatroom_demo unity_demo
install:
go install ./cmd/...
dispatcher:
cd components/dispatcher && go build
gate:
cd components/gate && go build
test_game:
cd examples/test_game && go build
test_client:
cd examples/test_client && go build
chatroom_demo:
cd examples/chatroom_demo && go build
unity_demo:
cd examples/unity_demo && go build
runtestserver: dispatcher gate test_game
components/dispatcher/dispatcher &
examples/test_game/test_game -gid=1 -log info &
examples/test_game/test_game -gid=2 -log info &
components/gate/gate -gid 1 -log debug &
components/gate/gate -gid 2 -log debug &
killtestserver:
- killall gate
- sleep 3
- killall test_game
- sleep 5
- killall dispatcher
test:
go test -v `go list ./... | grep -v "/vendor/"`
covertest:
go test -v -covermode=count `go list ./... | grep -v "/vendor/"`
install-deps:
dep ensure