From e97a4d88479b3cb105bfd28b20ecfaae093b006d Mon Sep 17 00:00:00 2001 From: Arjun Singh Date: Mon, 17 Jul 2023 17:07:12 +0530 Subject: [PATCH] chore: update Makefile to add fuzz Signed-off-by: Arjun Singh --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index c4156f84..5f43fe5a 100644 --- a/Makefile +++ b/Makefile @@ -258,6 +258,13 @@ test-integration-debug: gofiles test-integration-race: gofiles go test -v -timeout=60m -p=1 -count=1 -race -failfast github.com/ProtonMail/proton-bridge/v3/tests +fuzz: gofiles + go test -fuzz=FuzzUnmarshal -parallel=4 -fuzztime=60s $(PWD)/internal/legacy/credentials + go test -fuzz=FuzzNewParser -parallel=4 -fuzztime=60s $(PWD)/pkg/message/parser + go test -fuzz=FuzzReadHeaderBody -parallel=4 -fuzztime=60s $(PWD)/pkg/message + go test -fuzz=FuzzDecodeHeader -parallel=4 -fuzztime=60s $(PWD)/pkg/mime + go test -fuzz=FuzzDecodeCharset -parallel=4 -fuzztime=60s $(PWD)/pkg/mime + bench: go test -run '^$$' -bench=. -memprofile bench_mem.pprof -cpuprofile bench_cpu.pprof ./internal/store go tool pprof -png -output bench_mem.png bench_mem.pprof