!375 增加自动化构建覆盖率插桩

Merge pull request !375 from zaki/coverage_generation_branch
This commit is contained in:
openharmony_ci 2022-09-16 08:32:06 +00:00 committed by Gitee
commit 70ab75a553
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
20 changed files with 175 additions and 52 deletions

View File

@ -18,7 +18,7 @@
"SystemCapability.BarrierFree.Accessibility.Hearing", "SystemCapability.BarrierFree.Accessibility.Hearing",
"SystemCapability.BarrierFree.Accessibility.Vision" "SystemCapability.BarrierFree.Accessibility.Vision"
], ],
"features": [], "features": [ "accessibility_feature_coverage = false" ],
"adapted_system_type": [ "adapted_system_type": [
"standard" "standard"
], ],

View File

@ -72,7 +72,10 @@ ohos_shared_library("accessibility_interface") {
sources = accessibility_interface_src sources = accessibility_interface_src
sources += accessibility_data_parcel_src sources += accessibility_data_parcel_src
configs = [ ":accessibility_interface_private_config" ] configs = [
":accessibility_interface_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
public_configs = [ ":accessibility_interface_public_config" ] public_configs = [ ":accessibility_interface_public_config" ]

View File

@ -115,7 +115,10 @@ ohos_unittest("accessible_ability_test") {
] ]
sources += aams_mock_multimodalinput_src sources += aams_mock_multimodalinput_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",

View File

@ -59,7 +59,10 @@ ohos_unittest("ac_unit_test") {
"unittest/accessibility_config_impl_test.cpp", "unittest/accessibility_config_impl_test.cpp",
] ]
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",

View File

@ -106,7 +106,10 @@ ohos_unittest("asac_unit_test") {
"unittest/accessibility_system_ability_client_impl_test.cpp", "unittest/accessibility_system_ability_client_impl_test.cpp",
] ]
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",

View File

@ -42,7 +42,10 @@ ohos_unittest("accessibility_common_test") {
"unittest/accessibility_window_info_test.cpp", "unittest/accessibility_window_info_test.cpp",
] ]
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common", "//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common",

View File

@ -49,7 +49,10 @@ ohos_shared_library("accessibleability") {
configs = [ ":accessibleability_private_config" ] configs = [ ":accessibleability_private_config" ]
public_configs = [ ":accessibleability_public_config" ] public_configs = [
":accessibleability_public_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ "//foundation/barrierfree/accessibility/common/interface:accessibility_interface" ] deps = [ "//foundation/barrierfree/accessibility/common/interface:accessibility_interface" ]

View File

@ -42,7 +42,10 @@ acfwk_src = [
ohos_shared_library("accessibilityconfig") { ohos_shared_library("accessibilityconfig") {
sources = acfwk_src sources = acfwk_src
configs = [ ":accessibilityconfig_private_config" ] configs = [
":accessibilityconfig_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
public_configs = [ ":accessibilityconfig_public_config" ] public_configs = [ ":accessibilityconfig_public_config" ]

View File

@ -41,7 +41,10 @@ asacfwk_src = [
ohos_shared_library("accessibilityclient") { ohos_shared_library("accessibilityclient") {
sources = asacfwk_src sources = asacfwk_src
configs = [ ":accessibilityclient_private_config" ] configs = [
":accessibilityclient_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
public_configs = [ ":accessibilityclient_public_config" ] public_configs = [ ":accessibilityclient_public_config" ]

View File

@ -44,7 +44,10 @@ accessibility_common_src = [
ohos_shared_library("accessibility_common") { ohos_shared_library("accessibility_common") {
sources = accessibility_common_src sources = accessibility_common_src
configs = [ ":accessibility_common_private_config" ] configs = [
":accessibility_common_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
public_configs = [ ":accessibility_common_public_config" ] public_configs = [ ":accessibility_common_public_config" ]

View File

@ -10,7 +10,14 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
config("configs_cc_ld") {
cflags = [
"-g",
"-O0",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
}
group("fuzztest") { group("fuzztest") {
testonly = true testonly = true

View File

@ -20,11 +20,9 @@ ohos_fuzztest("AccessibilityConfigFuzzTest") {
module_out_path = "accessibility/acfwk" module_out_path = "accessibility/acfwk"
fuzz_config_file = "../../fuzztest/accessibilityconfig_fuzzer" fuzz_config_file = "../../fuzztest/accessibilityconfig_fuzzer"
cflags = [ configs = [
"-g", "//foundation/barrierfree/accessibility/interfaces/innerkits/test/fuzztest:configs_cc_ld",
"-O0", "//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
] ]
sources = [ "accessibilityconfig_fuzzer.cpp" ] sources = [ "accessibilityconfig_fuzzer.cpp" ]
deps = [ "//foundation/barrierfree/accessibility/interfaces/innerkits/acfwk:accessibilityconfig" ] deps = [ "//foundation/barrierfree/accessibility/interfaces/innerkits/acfwk:accessibilityconfig" ]

View File

@ -21,11 +21,9 @@ ohos_fuzztest("AccessibilitySystemAbilityClientFuzzTest") {
fuzz_config_file = "../../fuzztest/accessibilitysystemabilityclient_fuzzer" fuzz_config_file = "../../fuzztest/accessibilitysystemabilityclient_fuzzer"
include_dirs = [] include_dirs = []
cflags = [ configs = [
"-g", "//foundation/barrierfree/accessibility/interfaces/innerkits/test/fuzztest:configs_cc_ld",
"-O0", "//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
] ]
sources = [ "accessibilitysystemabilityclient_fuzzer.cpp" ] sources = [ "accessibilitysystemabilityclient_fuzzer.cpp" ]
deps = [ "//foundation/barrierfree/accessibility/interfaces/innerkits/asacfwk:accessibilityclient" ] deps = [ "//foundation/barrierfree/accessibility/interfaces/innerkits/asacfwk:accessibilityclient" ]

View File

@ -21,11 +21,9 @@ ohos_fuzztest("AccessibleAbilityClientFuzzTest") {
fuzz_config_file = "../../fuzztest/accessibleabilityclient_fuzzer" fuzz_config_file = "../../fuzztest/accessibleabilityclient_fuzzer"
include_dirs = [] include_dirs = []
cflags = [ configs = [
"-g", "//foundation/barrierfree/accessibility/interfaces/innerkits/test/fuzztest:configs_cc_ld",
"-O0", "//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
] ]
sources = [ "accessibleabilityclient_fuzzer.cpp" ] sources = [ "accessibleabilityclient_fuzzer.cpp" ]
deps = [ "//foundation/barrierfree/accessibility/interfaces/innerkits/aafwk:accessibleability" ] deps = [ "//foundation/barrierfree/accessibility/interfaces/innerkits/aafwk:accessibleability" ]

View File

@ -34,7 +34,7 @@ ohos_shared_library("accessibility") {
"./src/native_module.cpp", "./src/native_module.cpp",
] ]
configs = [] configs = [ "//foundation/barrierfree/accessibility/resources/config/build:coverage_flags" ]
deps = [ deps = [
"//foundation/barrierfree/accessibility/interfaces/innerkits/acfwk:accessibilityconfig", "//foundation/barrierfree/accessibility/interfaces/innerkits/acfwk:accessibilityconfig",

View File

@ -31,7 +31,7 @@ ohos_shared_library("config_napi") {
"./src/native_module.cpp", "./src/native_module.cpp",
] ]
configs = [] configs = [ "//foundation/barrierfree/accessibility/resources/config/build:coverage_flags" ]
deps = [ deps = [
"//foundation/barrierfree/accessibility/interfaces/innerkits/acfwk:accessibilityconfig", "//foundation/barrierfree/accessibility/interfaces/innerkits/acfwk:accessibilityconfig",

View File

@ -0,0 +1,23 @@
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
declare_args() {
accessibility_feature_coverage = false
}
config("coverage_flags") {
if (accessibility_feature_coverage) {
cflags = [ "--coverage" ]
ldflags = [ "--coverage" ]
}
}

View File

@ -64,7 +64,10 @@ accessibleabilityms_files = [
ohos_shared_library("accessibleabilityms") { ohos_shared_library("accessibleabilityms") {
sources = accessibleabilityms_files sources = accessibleabilityms_files
configs = [ ":aams_service_config" ] configs = [
":aams_service_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",

View File

@ -101,7 +101,10 @@ ohos_unittest("accessibility_account_data_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -142,7 +145,10 @@ ohos_unittest("accessible_ability_manager_service_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -198,7 +204,10 @@ ohos_unittest("accessibility_touch_guider_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common", "//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common",
@ -244,7 +253,10 @@ ohos_unittest("accessibility_common_event_registry_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -306,7 +318,10 @@ ohos_unittest("accessibility_input_interceptor_test") {
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
sources += aams_mock_multimodalinput_src sources += aams_mock_multimodalinput_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -354,7 +369,10 @@ ohos_unittest("accessibility_window_manager_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -411,7 +429,10 @@ ohos_unittest("accessibility_keyevent_filter_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -483,7 +504,10 @@ ohos_unittest("accessible_ability_connection_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -520,7 +544,10 @@ ohos_unittest("accessibility_display_manager_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -568,7 +595,10 @@ ohos_unittest("accessibility_dumper_test") {
] ]
sources += aams_mock_multimodalinput_src sources += aams_mock_multimodalinput_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common", "//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common",
@ -604,7 +634,10 @@ ohos_unittest("accessibility_touchevent_injector_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -655,7 +688,10 @@ ohos_unittest("accessible_ability_channel_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common", "//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common",
@ -695,7 +731,10 @@ ohos_unittest("accessibility_mouse_autoclick_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -724,7 +763,10 @@ ohos_unittest("accessibility_mouse_key_test") {
"unittest/accessibility_mouse_key_test.cpp", "unittest/accessibility_mouse_key_test.cpp",
] ]
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common", "//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common",
@ -758,7 +800,10 @@ ohos_unittest("accessibility_short_key_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -789,7 +834,10 @@ ohos_unittest("accessibility_settings_config_test") {
"unittest/accessibility_settings_config_test.cpp", "unittest/accessibility_settings_config_test.cpp",
] ]
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common", "//foundation/barrierfree/accessibility/interfaces/innerkits/common:accessibility_common",
@ -821,7 +869,10 @@ ohos_unittest("accessibility_zoom_gesture_test") {
] ]
sources += aams_mock_distributeddatamgr_src sources += aams_mock_distributeddatamgr_src
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",

View File

@ -129,7 +129,10 @@ ohos_moduletest("aams_accessibility_touch_guider_test") {
sources += aams_mock_powermanager_src sources += aams_mock_powermanager_src
sources += MockDistributedscheduleSrc sources += MockDistributedscheduleSrc
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -200,7 +203,10 @@ ohos_moduletest("aams_accessibility_touchEvent_injector_test") {
sources += aams_mock_powermanager_src sources += aams_mock_powermanager_src
sources += MockDistributedscheduleSrc sources += MockDistributedscheduleSrc
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -277,7 +283,10 @@ ohos_moduletest("aams_accessible_ability_channel_test") {
sources += aams_mock_powermanager_src sources += aams_mock_powermanager_src
sources += MockDistributedscheduleSrc sources += MockDistributedscheduleSrc
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -351,7 +360,10 @@ ohos_moduletest("aams_server_test") {
sources += aams_mock_powermanager_src sources += aams_mock_powermanager_src
sources += MockDistributedscheduleSrc sources += MockDistributedscheduleSrc
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -419,7 +431,10 @@ ohos_moduletest("aams_accessibility_keyevent_filter_test") {
sources += aams_mock_powermanager_src sources += aams_mock_powermanager_src
sources += MockDistributedscheduleSrc sources += MockDistributedscheduleSrc
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",
@ -494,7 +509,10 @@ ohos_moduletest("aams_common_event_registry_test") {
sources += aams_mock_powermanager_src sources += aams_mock_powermanager_src
sources += MockDistributedscheduleSrc sources += MockDistributedscheduleSrc
configs = [ ":module_private_config" ] configs = [
":module_private_config",
"//foundation/barrierfree/accessibility/resources/config/build:coverage_flags",
]
deps = [ deps = [
"//foundation/barrierfree/accessibility/common/interface:accessibility_interface", "//foundation/barrierfree/accessibility/common/interface:accessibility_interface",