Skip to content

Commit

Permalink
build: use DIR_FUZZ_SEED_CORPUS if specified for cov_fuzz target
Browse files Browse the repository at this point in the history
This commit allows the user to specify the location of the
fuzz_seed_corpus directory on their machine when running the cov_fuzz
target. If DIR_FUZZ_SEED_CORPUS is specified, then this will be used.
Otherwise, qa-assets/fuzz_seed_corpus is assumed to be in the bitcoin
directory.
  • Loading branch information
Crypt-iQ committed Sep 8, 2020
1 parent 4bb0ddb commit 6be835c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ LCOV_FILTER_PATTERN = \
-p "src/secp256k1" \
-p "depends"

DIR_FUZZ_SEED_CORPUS ?= qa-assets/fuzz_seed_corpus

$(COV_TOOL_WRAPPER):
@echo 'exec $(COV_TOOL) "$$@"' > $(COV_TOOL_WRAPPER)
@chmod +x $(COV_TOOL_WRAPPER)
Expand All @@ -205,7 +207,7 @@ baseline_filtered.info: baseline.info
$(LCOV) -a $@ $(LCOV_OPTS) -o $@

fuzz.info: baseline_filtered.info
@TIMEOUT=15 test/fuzz/test_runner.py qa-assets/fuzz_seed_corpus -l DEBUG
@TIMEOUT=15 test/fuzz/test_runner.py $(DIR_FUZZ_SEED_CORPUS) -l DEBUG
$(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src --t fuzz-tests -o $@
$(LCOV) -z $(LCOV_OPTS) -d $(abs_builddir)/src

Expand Down

0 comments on commit 6be835c

Please sign in to comment.