[#229] Add ngfuzz installation to makefile
Some checks failed
/ DCO (pull_request) Successful in 30s
/ Vulncheck (pull_request) Failing after 49s
/ Builds (pull_request) Successful in 1m35s
/ OCI image (pull_request) Successful in 2m31s
/ Lint (pull_request) Successful in 2m37s
/ Tests (pull_request) Successful in 2m15s
/ Integration tests (pull_request) Successful in 6m43s
Some checks failed
/ DCO (pull_request) Successful in 30s
/ Vulncheck (pull_request) Failing after 49s
/ Builds (pull_request) Successful in 1m35s
/ OCI image (pull_request) Successful in 2m31s
/ Lint (pull_request) Successful in 2m37s
/ Tests (pull_request) Successful in 2m15s
/ Integration tests (pull_request) Successful in 6m43s
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
parent
273459e090
commit
0eb21dbfc2
1 changed files with 15 additions and 11 deletions
26
Makefile
26
Makefile
|
@ -30,9 +30,9 @@ PKG_VERSION ?= $(shell echo $(VERSION) | sed "s/^v//" | \
|
|||
sed "s/-/~/")-${OS_RELEASE}
|
||||
.PHONY: debpackage debclean
|
||||
|
||||
FUZZ_NGFUZZ_DIR ?= ""
|
||||
FUZZING_DIR = $(shell pwd)/tests/fuzzing/files
|
||||
NGFUZZ_REPO = https://gitflic.ru/project/yadro/ngfuzz.git
|
||||
FUZZ_TIMEOUT ?= 30
|
||||
FUZZ_FUNCTIONS ?= "all"
|
||||
FUZZ_AUX ?= ""
|
||||
|
||||
# Make all binaries
|
||||
|
@ -99,18 +99,22 @@ check-ngfuzz:
|
|||
exit 1; \
|
||||
fi
|
||||
|
||||
.PHONY: install-fuzzing-deps
|
||||
install-fuzzing-deps: check-clang check-ngfuzz
|
||||
.PHONY: install-ngfuzz
|
||||
install-ngfuzz:
|
||||
ifeq (,$(wildcard $(FUZZING_DIR)/ngfuzz))
|
||||
@rm -rf $(FUZZING_DIR)/ngfuzz
|
||||
@git clone $(NGFUZZ_REPO) $(FUZZING_DIR)/ngfuzz
|
||||
@cd $(FUZZING_DIR)/ngfuzz && make
|
||||
endif
|
||||
|
||||
.PHONY: fuzz
|
||||
fuzz: install-fuzzing-deps
|
||||
fuzz: check-clang install-ngfuzz
|
||||
@START_PATH=$$(pwd); \
|
||||
ROOT_PATH=$$(realpath --relative-to=$(FUZZ_NGFUZZ_DIR) $$START_PATH) ; \
|
||||
cd $(FUZZ_NGFUZZ_DIR) && \
|
||||
./ngfuzz -clean && \
|
||||
./ngfuzz -fuzz $(FUZZ_FUNCTIONS) -rootdir $$ROOT_PATH -timeout $(FUZZ_TIMEOUT) $(FUZZ_AUX) && \
|
||||
./ngfuzz -report
|
||||
|
||||
ROOT_PATH=$$(realpath --relative-to=$(FUZZING_DIR)/ngfuzz $$START_PATH) ; \
|
||||
cd $(FUZZING_DIR)/ngfuzz && \
|
||||
./bin/ngfuzz clean && \
|
||||
./bin/ngfuzz fuzz --rootdir $$ROOT_PATH --timeout $(FUZZ_TIMEOUT) $(FUZZ_AUX) && \
|
||||
./bin/ngfuzz coverage --rootdir $$ROOT_PATH
|
||||
|
||||
# Reformat code
|
||||
fmt:
|
||||
|
|
Loading…
Add table
Reference in a new issue