File: Makefile.fuzz

package info (click to toggle)
golang-github-miekg-dns 1.0.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, experimental
  • size: 900 kB
  • sloc: makefile: 4
file content (33 lines) | stat: -rw-r--r-- 671 bytes parent folder | download | duplicates (8)
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
# Makefile for fuzzing
#
# Use go-fuzz and needs the tools installed.
# See https://blog.cloudflare.com/dns-parser-meet-go-fuzzer/
#
# Installing go-fuzz:
# $ make -f Makefile.fuzz get
# Installs:
# * github.com/dvyukov/go-fuzz/go-fuzz
# * get github.com/dvyukov/go-fuzz/go-fuzz-build

all: build

.PHONY: build
build:
	go-fuzz-build -tags fuzz github.com/miekg/dns

.PHONY: build-newrr
build-newrr:
	go-fuzz-build -func FuzzNewRR -tags fuzz github.com/miekg/dns

.PHONY: fuzz
fuzz:
	go-fuzz -bin=dns-fuzz.zip -workdir=fuzz

.PHONY: get
get:
	go get github.com/dvyukov/go-fuzz/go-fuzz
	go get github.com/dvyukov/go-fuzz/go-fuzz-build

.PHONY: clean
clean:
	rm *-fuzz.zip