[#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}
|
sed "s/-/~/")-${OS_RELEASE}
|
||||||
.PHONY: debpackage debclean
|
.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_TIMEOUT ?= 30
|
||||||
FUZZ_FUNCTIONS ?= "all"
|
|
||||||
FUZZ_AUX ?= ""
|
FUZZ_AUX ?= ""
|
||||||
|
|
||||||
# Make all binaries
|
# Make all binaries
|
||||||
|
@ -99,18 +99,22 @@ check-ngfuzz:
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.PHONY: install-fuzzing-deps
|
.PHONY: install-ngfuzz
|
||||||
install-fuzzing-deps: check-clang check-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
|
.PHONY: fuzz
|
||||||
fuzz: install-fuzzing-deps
|
fuzz: check-clang install-ngfuzz
|
||||||
@START_PATH=$$(pwd); \
|
@START_PATH=$$(pwd); \
|
||||||
ROOT_PATH=$$(realpath --relative-to=$(FUZZ_NGFUZZ_DIR) $$START_PATH) ; \
|
ROOT_PATH=$$(realpath --relative-to=$(FUZZING_DIR)/ngfuzz $$START_PATH) ; \
|
||||||
cd $(FUZZ_NGFUZZ_DIR) && \
|
cd $(FUZZING_DIR)/ngfuzz && \
|
||||||
./ngfuzz -clean && \
|
./bin/ngfuzz clean && \
|
||||||
./ngfuzz -fuzz $(FUZZ_FUNCTIONS) -rootdir $$ROOT_PATH -timeout $(FUZZ_TIMEOUT) $(FUZZ_AUX) && \
|
./bin/ngfuzz fuzz --rootdir $$ROOT_PATH --timeout $(FUZZ_TIMEOUT) $(FUZZ_AUX) && \
|
||||||
./ngfuzz -report
|
./bin/ngfuzz coverage --rootdir $$ROOT_PATH
|
||||||
|
|
||||||
|
|
||||||
# Reformat code
|
# Reformat code
|
||||||
fmt:
|
fmt:
|
||||||
|
|
Loading…
Add table
Reference in a new issue