-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (25 loc) · 1.16 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
all: test
PROCS = 2
help: ## Display this help message.
@echo "Please use \`make <target>\` where <target> is one of:"
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | \
awk -F ':.*?## ' 'NF==2 {printf " %-20s%s\n", $$1, $$2}'
docker:
docker run -it -v $(PWD):/workshop -w /workshop ghcr.io/aleksi/golang-tip:dev.fuzz /bin/bash
init: ## Install tools.
go generate -x -tags=tools ./tools
make build
build: ## Build with race detector.
go install -v -race ./...
test: build ## Test with race detector.
go test -v -race ./...
fuzz-reverse: ## Fuzz reverse function using dev.fuzz.
go test -v -race -fuzz=FuzzReverse -fuzztime=50000x -parallel=$(PROCS)
gofuzz-reverse: ## Fuzz reverse function using dvyukov/go-fuzz.
./bin/go-fuzz-build -race
./bin/go-fuzz -procs=$(PROCS)
fuzz-protocol: ## Fuzz protocol using dev.fuzz.
cd protocol && go test -v -race -fuzz=FuzzHandler -parallel=$(PROCS)
gofuzz-protocol: ## Fuzz protocol using dvyukov/go-fuzz.
cd protocol && ../bin/go-fuzz-build -race
cd protocol && ../bin/go-fuzz -procs=$(PROCS)