• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("../../nfc.gni")
15
16fuzz_include_dirs = [
17  "$NFC_DIR/interfaces/inner_api/cardEmulation",
18  "$NFC_DIR/interfaces/inner_api/common",
19  "$NFC_DIR/interfaces/inner_api/controller",
20  "$NFC_DIR/interfaces/inner_api/tags",
21  "$NFC_DIR/services/include",
22  "$NFC_DIR/services/src/nci_adapter/nci_native_default/include",
23  "$NFC_DIR/services/src",
24  "$NFC_DIR/services/src/external_deps",
25  "$NFC_DIR/services/src/tag",
26]
27
28fuzz_deps = [
29  "$NFC_DIR/interfaces/inner_api/common:nfc_inner_kits_common",
30  "$NFC_DIR/interfaces/inner_api/cardEmulation:libnfc_hce_interface_proxy",
31  "$NFC_DIR/interfaces/inner_api/cardEmulation:libnfc_hce_interface_stub",
32  "$NFC_DIR/interfaces/inner_api/cardEmulation:nfc_inner_kits_card_emulation",
33  "$NFC_DIR/interfaces/inner_api/controller:libnfc_controller_interface_proxy",
34  "$NFC_DIR/interfaces/inner_api/controller:libnfc_controller_interface_stub",
35  "$NFC_DIR/interfaces/inner_api/controller:nfc_inner_kits_controller",
36  "$NFC_DIR/interfaces/inner_api/tags:libnfc_tag_interface_proxy",
37  "$NFC_DIR/interfaces/inner_api/tags:libnfc_tag_interface_stub",
38  "$NFC_DIR/interfaces/inner_api/tags:nfc_inner_kits_tags",
39  "$NFC_DIR/services:nfc_service_static",
40]
41
42fuzz_external_deps = [
43  "ability_base:want",
44  "ability_base:zuri",
45  "ability_runtime:ability_manager",
46  "ability_runtime:app_manager",
47  "ability_runtime:dataobs_manager",
48  "access_token:libaccesstoken_sdk",
49  "bundle_framework:appexecfwk_base",
50  "bundle_framework:appexecfwk_core",
51  "cJSON:cjson_static",
52  "c_utils:utils",
53  "common_event_service:cesfwk_core",
54  "common_event_service:cesfwk_innerkits",
55  "data_share:datashare_consumer",
56  "eventhandler:libeventhandler",
57  "ffrt:libffrt",
58  "hilog:libhilog",
59  "hisysevent:libhisysevent",
60  "init:libbegetutil",
61  "ipc:ipc_core",
62  "miscdevice:vibrator_interface_native",
63  "power_manager:powermgr_client",
64  "preferences:native_preferences",
65  "safwk:system_ability_fwk",
66  "samgr:samgr_proxy",
67  "screenlock_mgr:screenlock_client",
68]
69
70if (nfc_service_feature_ndef_wifi_enabled) {
71  fuzz_external_deps += [ "wifi:wifi_sdk" ]
72}
73
74if (nfc_service_feature_ndef_bt_enabled) {
75  fuzz_external_deps += [ "bluetooth:btframework" ]
76}
77
78fuzz_cflags = [
79  "-g",
80  "-O0",
81  "-Wno-unused-variable",
82  "-fno-omit-frame-pointer",
83]