mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 11:13:23 -03:00
build: Add cov_fuzz target
This commit is contained in:
parent
fac71e364e
commit
faf7d4fa86
1 changed files with 20 additions and 2 deletions
22
Makefile.am
22
Makefile.am
|
@ -77,7 +77,7 @@ OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
|
||||||
COVERAGE_INFO = baseline.info \
|
COVERAGE_INFO = baseline.info \
|
||||||
test_bitcoin_filtered.info total_coverage.info \
|
test_bitcoin_filtered.info total_coverage.info \
|
||||||
baseline_filtered.info functional_test.info functional_test_filtered.info \
|
baseline_filtered.info functional_test.info functional_test_filtered.info \
|
||||||
test_bitcoin_coverage.info test_bitcoin.info
|
test_bitcoin_coverage.info test_bitcoin.info fuzz.info fuzz_coverage.info
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
|
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
|
||||||
|
@ -208,6 +208,15 @@ baseline_filtered.info: baseline.info
|
||||||
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
|
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
|
||||||
$(LCOV) -a $@ $(LCOV_OPTS) -o $@
|
$(LCOV) -a $@ $(LCOV_OPTS) -o $@
|
||||||
|
|
||||||
|
fuzz.info: baseline_filtered.info
|
||||||
|
@TIMEOUT=15 test/fuzz/test_runner.py qa-assets/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
|
||||||
|
|
||||||
|
fuzz_filtered.info: fuzz.info
|
||||||
|
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
|
||||||
|
$(LCOV) -a $@ $(LCOV_OPTS) -o $@
|
||||||
|
|
||||||
test_bitcoin.info: baseline_filtered.info
|
test_bitcoin.info: baseline_filtered.info
|
||||||
$(MAKE) -C src/ check
|
$(MAKE) -C src/ check
|
||||||
$(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src -t test_bitcoin -o $@
|
$(LCOV) -c $(LCOV_OPTS) -d $(abs_builddir)/src -t test_bitcoin -o $@
|
||||||
|
@ -226,12 +235,19 @@ functional_test_filtered.info: functional_test.info
|
||||||
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
|
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
|
||||||
$(LCOV) -a $@ $(LCOV_OPTS) -o $@
|
$(LCOV) -a $@ $(LCOV_OPTS) -o $@
|
||||||
|
|
||||||
|
fuzz_coverage.info: fuzz_filtered.info
|
||||||
|
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a fuzz_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
|
||||||
|
|
||||||
test_bitcoin_coverage.info: baseline_filtered.info test_bitcoin_filtered.info
|
test_bitcoin_coverage.info: baseline_filtered.info test_bitcoin_filtered.info
|
||||||
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -o $@
|
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -o $@
|
||||||
|
|
||||||
total_coverage.info: test_bitcoin_filtered.info functional_test_filtered.info
|
total_coverage.info: test_bitcoin_filtered.info functional_test_filtered.info
|
||||||
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
|
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
|
||||||
|
|
||||||
|
fuzz.coverage/.dirstamp: fuzz_coverage.info
|
||||||
|
$(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
|
||||||
|
@touch $@
|
||||||
|
|
||||||
test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
|
test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
|
||||||
$(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
|
$(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
|
||||||
@touch $@
|
@touch $@
|
||||||
|
@ -240,6 +256,8 @@ total.coverage/.dirstamp: total_coverage.info
|
||||||
$(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
|
$(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
|
cov_fuzz: fuzz.coverage/.dirstamp
|
||||||
|
|
||||||
cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
|
cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -328,6 +346,6 @@ clean-docs:
|
||||||
rm -rf doc/doxygen
|
rm -rf doc/doxygen
|
||||||
|
|
||||||
clean-local: clean-docs
|
clean-local: clean-docs
|
||||||
rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP)
|
rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ fuzz.coverage/ test/tmp/ cache/ $(OSX_APP)
|
||||||
rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache share/rpcauth/__pycache__
|
rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache share/rpcauth/__pycache__
|
||||||
rm -rf osx_volname dist/ dpi36.background.tiff dpi72.background.tiff
|
rm -rf osx_volname dist/ dpi36.background.tiff dpi72.background.tiff
|
||||||
|
|
Loading…
Add table
Reference in a new issue