Moves Codecov Ignore to LCOV
Rely on ax_code_coverage to exclude test directories. - Removes broken codecov ignore - Places ignore section in ax_code_coverage - Forwards users from codecov to LCOV for ignores Reviewed-by: Prakash Surya <prakash.surya@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Laager <rlaager@wiktel.com> Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl> Closes #9726
This commit is contained in:
parent
e8b199faec
commit
3035f14d82
3
.github/codecov.yml
vendored
3
.github/codecov.yml
vendored
@ -22,5 +22,4 @@ comment:
|
|||||||
behavior: once # update if exists; post new; skip if deleted
|
behavior: once # update if exists; post new; skip if deleted
|
||||||
require_changes: yes # only post when coverage changes
|
require_changes: yes # only post when coverage changes
|
||||||
|
|
||||||
ignore:
|
# ignore: Please place any ignores in config/ax_code_coverage.m4 instead
|
||||||
- "tests/**/*" # Don't need Tests to cover themselves
|
|
||||||
|
@ -142,7 +142,7 @@ AC_DEFUN([AX_CODE_COVERAGE],[
|
|||||||
']
|
']
|
||||||
[CODE_COVERAGE_RULES_CAPTURE='
|
[CODE_COVERAGE_RULES_CAPTURE='
|
||||||
$(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS)
|
$(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS)
|
||||||
$(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS)
|
$(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS)
|
||||||
-@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
|
-@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
|
||||||
$(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
|
$(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
|
||||||
@echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
|
@echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
|
||||||
@ -219,7 +219,10 @@ CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\
|
|||||||
$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
|
$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
|
||||||
--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
|
--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
|
||||||
CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
|
CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
|
||||||
CODE_COVERAGE_IGNORE_PATTERN ?=
|
|
||||||
|
# Add any folders you want to ignore here
|
||||||
|
# Ignore tmp and tests themselves
|
||||||
|
CODE_COVERAGE_IGNORE_PATTERN ?= "/tmp/*" "*/tests/*"
|
||||||
|
|
||||||
GITIGNOREFILES ?=
|
GITIGNOREFILES ?=
|
||||||
GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
|
GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
|
||||||
|
Loading…
Reference in New Issue
Block a user