-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix fuzz testing - closes #288 - add fuzz testing to CI Signed-off-by: Marko Baricevic <[email protected]> * test ci * fix yml * remove fuzzing from ci * add workflows
- Loading branch information
1 parent
01b51bd
commit dcefe5e
Showing
4 changed files
with
66 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
### | ||
# Find OS and Go environment | ||
# GO contains the Go binary | ||
# FS contains the OS file separator | ||
### | ||
ifeq ($(OS),Windows_NT) | ||
GO := $(shell where go.exe 2> NUL) | ||
FS := "\\" | ||
else | ||
GO := $(shell command -v go 2> /dev/null) | ||
FS := "/" | ||
endif | ||
|
||
ifeq ($(GO),) | ||
$(error could not find go. Is it in PATH? $(GO)) | ||
endif | ||
|
||
all: tools | ||
|
||
tools: go-fuzz go-fuzz-build | ||
|
||
TOOLS_DESTDIR ?= $(GOPATH)/bin | ||
|
||
GOFUZZ = $(TOOLS_DESTDIR)/go-fuzz | ||
GOFUZZ_BUILD = $(TOOLS_DESTDIR)/go-fuzz-build | ||
|
||
# Install the runsim binary with a temporary workaround of entering an outside | ||
# directory as the "go get" command ignores the -mod option and will polute the | ||
# go.{mod, sum} files. | ||
# | ||
# ref: https://github.com/golang/go/issues/30515 | ||
go-fuzz: $(GOFUZZ) | ||
$(GOFUZZ): | ||
@echo "Installing go-fuzz..." | ||
@(cd /tmp && go get -u github.com/dvyukov/go-fuzz/go-fuzz) | ||
|
||
go-fuzz-build: $(GOFUZZ_BUILD) | ||
$(GOFUZZ_BUILD): | ||
@echo "Installing go-fuzz-build..." | ||
@(cd /tmp && go get -u github.com/dvyukov/go-fuzz/go-fuzz-build) | ||
|
||
tools-clean: | ||
rm -f $(GOFUZZ_BUILD) $(GOFUZZ) | ||
rm -f tools-stamp | ||
|
||
.PHONY: all tools tools-clean |