11cb0ef41Sopenharmony_ci 21cb0ef41Sopenharmony_ci# aminclude_static.am generated automatically by Autoconf 31cb0ef41Sopenharmony_ci# from AX_AM_MACROS_STATIC on Fri Feb 23 08:24:27 CET 2024 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ci# Code coverage 71cb0ef41Sopenharmony_ci# 81cb0ef41Sopenharmony_ci# Optional: 91cb0ef41Sopenharmony_ci# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. 101cb0ef41Sopenharmony_ci# Multiple directories may be specified, separated by whitespace. 111cb0ef41Sopenharmony_ci# (Default: $(top_builddir)) 121cb0ef41Sopenharmony_ci# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated 131cb0ef41Sopenharmony_ci# by lcov for code coverage. (Default: 141cb0ef41Sopenharmony_ci# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) 151cb0ef41Sopenharmony_ci# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage 161cb0ef41Sopenharmony_ci# reports to be created. (Default: 171cb0ef41Sopenharmony_ci# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) 181cb0ef41Sopenharmony_ci# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, 191cb0ef41Sopenharmony_ci# set to 0 to disable it and leave empty to stay with the default. 201cb0ef41Sopenharmony_ci# (Default: empty) 211cb0ef41Sopenharmony_ci# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov 221cb0ef41Sopenharmony_ci# instances. (Default: based on ) 231cb0ef41Sopenharmony_ci# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov 241cb0ef41Sopenharmony_ci# instances. (Default: ) 251cb0ef41Sopenharmony_ci# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov 261cb0ef41Sopenharmony_ci# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the 271cb0ef41Sopenharmony_ci# collecting lcov instance. (Default: ) 281cb0ef41Sopenharmony_ci# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov 291cb0ef41Sopenharmony_ci# instance. (Default: ) 301cb0ef41Sopenharmony_ci# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering 311cb0ef41Sopenharmony_ci# lcov instance. (Default: empty) 321cb0ef41Sopenharmony_ci# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov 331cb0ef41Sopenharmony_ci# instance. (Default: ) 341cb0ef41Sopenharmony_ci# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the 351cb0ef41Sopenharmony_ci# genhtml instance. (Default: based on ) 361cb0ef41Sopenharmony_ci# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml 371cb0ef41Sopenharmony_ci# instance. (Default: ) 381cb0ef41Sopenharmony_ci# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore 391cb0ef41Sopenharmony_ci# 401cb0ef41Sopenharmony_ci# The generated report will be titled using the $(PACKAGE_NAME) and 411cb0ef41Sopenharmony_ci# $(PACKAGE_VERSION). In order to add the current git hash to the title, 421cb0ef41Sopenharmony_ci# use the git-version-gen script, available online. 431cb0ef41Sopenharmony_ci# Optional variables 441cb0ef41Sopenharmony_ci# run only on top dir 451cb0ef41Sopenharmony_ciif CODE_COVERAGE_ENABLED 461cb0ef41Sopenharmony_ci ifeq ($(abs_builddir), $(abs_top_builddir)) 471cb0ef41Sopenharmony_ciCODE_COVERAGE_DIRECTORY ?= $(top_builddir) 481cb0ef41Sopenharmony_ciCODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info 491cb0ef41Sopenharmony_ciCODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage 501cb0ef41Sopenharmony_ci 511cb0ef41Sopenharmony_ciCODE_COVERAGE_BRANCH_COVERAGE ?= 521cb0ef41Sopenharmony_ciCODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) 531cb0ef41Sopenharmony_ciCODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) 541cb0ef41Sopenharmony_ciCODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" 551cb0ef41Sopenharmony_ciCODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) 561cb0ef41Sopenharmony_ciCODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) 571cb0ef41Sopenharmony_ciCODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= 581cb0ef41Sopenharmony_ciCODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) 591cb0ef41Sopenharmony_ciCODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=$(if $(CODE_COVERAGE_BRANCH_COVERAGE),--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) 601cb0ef41Sopenharmony_ciCODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) 611cb0ef41Sopenharmony_ciCODE_COVERAGE_IGNORE_PATTERN ?= 621cb0ef41Sopenharmony_ci 631cb0ef41Sopenharmony_ciGITIGNOREFILES := $(GITIGNOREFILES) $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) 641cb0ef41Sopenharmony_cicode_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) 651cb0ef41Sopenharmony_cicode_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) 661cb0ef41Sopenharmony_cicode_coverage_v_lcov_cap_0 = @echo " LCOV --capture" $(CODE_COVERAGE_OUTPUT_FILE); 671cb0ef41Sopenharmony_cicode_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) 681cb0ef41Sopenharmony_cicode_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) 691cb0ef41Sopenharmony_cicode_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN); 701cb0ef41Sopenharmony_cicode_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) 711cb0ef41Sopenharmony_cicode_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) 721cb0ef41Sopenharmony_cicode_coverage_v_genhtml_0 = @echo " GEN " "$(CODE_COVERAGE_OUTPUT_DIRECTORY)"; 731cb0ef41Sopenharmony_cicode_coverage_quiet = $(code_coverage_quiet_$(V)) 741cb0ef41Sopenharmony_cicode_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) 751cb0ef41Sopenharmony_cicode_coverage_quiet_0 = --quiet 761cb0ef41Sopenharmony_ci 771cb0ef41Sopenharmony_ci# sanitizes the test-name: replaces with underscores: dashes and dots 781cb0ef41Sopenharmony_cicode_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) 791cb0ef41Sopenharmony_ci 801cb0ef41Sopenharmony_ci# Use recursive makes in order to ignore errors during check 811cb0ef41Sopenharmony_cicheck-code-coverage: 821cb0ef41Sopenharmony_ci -$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check 831cb0ef41Sopenharmony_ci $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture 841cb0ef41Sopenharmony_ci 851cb0ef41Sopenharmony_ci# Capture code coverage data 861cb0ef41Sopenharmony_cicode-coverage-capture: code-coverage-capture-hook 871cb0ef41Sopenharmony_ci $(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) 881cb0ef41Sopenharmony_ci $(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) 891cb0ef41Sopenharmony_ci -@rm -f "$(CODE_COVERAGE_OUTPUT_FILE).tmp" 901cb0ef41Sopenharmony_ci $(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) 911cb0ef41Sopenharmony_ci @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" 921cb0ef41Sopenharmony_ci 931cb0ef41Sopenharmony_cicode-coverage-clean: 941cb0ef41Sopenharmony_ci -$(LCOV) --directory $(top_builddir) -z 951cb0ef41Sopenharmony_ci -rm -rf "$(CODE_COVERAGE_OUTPUT_FILE)" "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" 961cb0ef41Sopenharmony_ci -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete 971cb0ef41Sopenharmony_ci 981cb0ef41Sopenharmony_cicode-coverage-dist-clean: 991cb0ef41Sopenharmony_ci 1001cb0ef41Sopenharmony_ciAM_DISTCHECK_CONFIGURE_FLAGS := $(AM_DISTCHECK_CONFIGURE_FLAGS) --disable-code-coverage 1011cb0ef41Sopenharmony_ci else # ifneq ($(abs_builddir), $(abs_top_builddir)) 1021cb0ef41Sopenharmony_cicheck-code-coverage: 1031cb0ef41Sopenharmony_ci 1041cb0ef41Sopenharmony_cicode-coverage-capture: code-coverage-capture-hook 1051cb0ef41Sopenharmony_ci 1061cb0ef41Sopenharmony_cicode-coverage-clean: 1071cb0ef41Sopenharmony_ci 1081cb0ef41Sopenharmony_cicode-coverage-dist-clean: 1091cb0ef41Sopenharmony_ci endif # ifeq ($(abs_builddir), $(abs_top_builddir)) 1101cb0ef41Sopenharmony_cielse #! CODE_COVERAGE_ENABLED 1111cb0ef41Sopenharmony_ci# Use recursive makes in order to ignore errors during check 1121cb0ef41Sopenharmony_cicheck-code-coverage: 1131cb0ef41Sopenharmony_ci @echo "Need to reconfigure with --enable-code-coverage" 1141cb0ef41Sopenharmony_ci# Capture code coverage data 1151cb0ef41Sopenharmony_cicode-coverage-capture: code-coverage-capture-hook 1161cb0ef41Sopenharmony_ci @echo "Need to reconfigure with --enable-code-coverage" 1171cb0ef41Sopenharmony_ci 1181cb0ef41Sopenharmony_cicode-coverage-clean: 1191cb0ef41Sopenharmony_ci 1201cb0ef41Sopenharmony_cicode-coverage-dist-clean: 1211cb0ef41Sopenharmony_ci 1221cb0ef41Sopenharmony_ciendif #CODE_COVERAGE_ENABLED 1231cb0ef41Sopenharmony_ci# Hook rule executed before code-coverage-capture, overridable by the user 1241cb0ef41Sopenharmony_cicode-coverage-capture-hook: 1251cb0ef41Sopenharmony_ci 1261cb0ef41Sopenharmony_ci.PHONY: check-code-coverage code-coverage-capture code-coverage-dist-clean code-coverage-clean code-coverage-capture-hook 127