-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
33 lines (24 loc) · 880 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
.PHONY: help test bench clean
VARS = vars.mk
$(shell ./make_config.sh ${VARS})
include ${VARS}
help:
@echo "Usage: use \`make test\` to run example"
@echo "Usage: use \`make bench\` to run example and benchmark"
# use `make cov` to generate `coverage.txt` for auto check coverage supported by codecov
cov:
echo "" > coverage.txt
go test -bench="." -cpu=${NCPU} -v -coverprofile=profile.out -covermode=atomic
cat profile.out >> coverage.txt
rm profile.out
go test github.com/brg-liuwei/godnf/set -bench="." -cpu=${NCPU} -v -coverprofile=profile.out -covermode=atomic
cat profile.out >> coverage.txt
rm profile.out
test:
go test -race github.com/brg-liuwei/godnf
go test -race github.com/brg-liuwei/godnf/set
bench:
go test -bench="." -cpu=${NCPU}
go test github.com/brg-liuwei/godnf/set -bench="." -cpu=${NCPU}
clean:
rm -rf ${VARS} coverage.txt profile.out