forked from phR0ze/n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (40 loc) · 1.18 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
NAME := n
default: ${NAME}
${NAME}:
@echo "Building..."
@echo "------------------------------------------------------------------------"
go build -o bin/${NAME} .
mech:
go build -o bin/mech pkg/net/mech/test/mech.go
test: ${NAME}
@echo -e "\nRunning all go tests:"
@echo -e "------------------------------------------------------------------------"
go test .
go test -gcflags=-l ./pkg/arch/tar
go test -gcflags=-l ./pkg/arch/zip
go test ./pkg/buf/runes
go test ./pkg/enc/bin
go test ./pkg/enc/json
go test ./pkg/enc/unit
go test ./pkg/enc/yaml
go test ./pkg/errs
go test ./pkg/futil
go test ./pkg/net
go test ./pkg/opt
go test ./pkg/structs
go test -gcflags=-l ./pkg/sys
go test ./pkg/term
go test ./pkg/term/color
go test -gcflags=-l ./pkg/time
go test ./pkg/tmpl
cover: ${NAME}
@echo -e "\nRunning go coverage tests:"
@echo -e "------------------------------------------------------------------------"
go test -gcflags=-l -coverprofile=coverage.out ./pkg/${pkg}
go tool cover -html=coverage.out
bench:
@echo -e "\nRunning all go benchmarks:"
@echo -e "------------------------------------------------------------------------"
go test -bench=.
clean:
rm -f ./bin/${NAME}