-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathMakefile
50 lines (39 loc) · 1.19 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
# Run me to verify that all tests pass and all binaries are buildable before pushing!
# If you do not, then Travis will be sad.
BUILD_TYPE?=build
# Everything; this is the default behavior
all-the-things: tests shield plugins
# Running Tests
tests: test
test:
ginkgo *
go vet ./...
# Running Tests for race conditions
race:
ginkgo -race *
# Building Shield
shield:
go $(BUILD_TYPE) ./cmd/shieldd
go $(BUILD_TYPE) ./cmd/shield-agent
go $(BUILD_TYPE) ./cmd/shield-schema
# Building Plugins
plugin: plugins
plugins:
go $(BUILD_TYPE) ./plugin/dummy
go $(BUILD_TYPE) ./plugin/elasticsearch
go $(BUILD_TYPE) ./plugin/postgres
go $(BUILD_TYPE) ./plugin/redis
go $(BUILD_TYPE) ./plugin/s3
# Run tests with coverage tracking, writing output to coverage/
coverage: agent.cov db.cov plugin.cov supervisor.cov timespec.cov
%.cov:
@mkdir -p coverage
@go test -coverprofile coverage/$@ ./$*
report:
go tool cover -html=coverage/$(FOR).cov
fixmes: fixme
fixme:
@grep -rn FIXME * | grep -v Godeps/ | grep -v README.md | grep --color FIXME || echo "No FIXMES! YAY!"
# Deferred: Naming plugins individually, e.g. make plugin dummy
# Deferred: Looping through plugins instead of listing them
.PHONY: shield