• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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
14#####################hydra-fuzz###################
15import("//build/config/features.gni")
16import("//build/ohos.gni")
17import("//build/test.gni")
18import("../../../common/config/common.gni")
19module_output_path = "enterprise_device_management/enterprise_device_management"
20
21##############################fuzztest##########################################
22ohos_fuzztest("EnterpriseDeviceMgrAbilityFuzzTest") {
23  module_out_path = module_output_path
24
25  fuzz_config_file = "."
26
27  cflags = [
28    "-g",
29    "-O0",
30    "-Wno-unused-variable",
31    "-fno-omit-frame-pointer",
32  ]
33  sources = [
34    "../common/src/common_fuzzer.cpp",
35    "enterprise_device_mgr_ability_fuzzer.cpp",
36  ]
37
38  include_dirs = [
39    "../common/include",
40    "../../../interfaces/inner_api/common/include",
41  ]
42
43  configs = [ "../../../common/config:coverage_flags" ]
44
45  deps = [
46    "../../../common/external:edm_external_adapters",
47    "../../../common/native:edm_commom",
48    "../../../interfaces/inner_api:edmservice_kits",
49    "../../../interfaces/inner_api/plugin_kits:plugin_kits",
50    "../../unittest/utils:edm_unittest_utils",
51    "../enterprisedevicemgrstubmock_fuzzer:edmservice_fuzz_static",
52  ]
53
54  external_deps = [
55    "ability_base:want",
56    "ability_runtime:app_manager",
57    "access_token:libaccesstoken_sdk",
58    "access_token:libnativetoken",
59    "access_token:libnativetoken_shared",
60    "access_token:libtoken_setproc",
61    "bundle_framework:appexecfwk_base",
62    "bundle_framework:appexecfwk_core",
63    "c_utils:utils",
64    "common_event_service:cesfwk_innerkits",
65    "hilog:libhilog",
66    "init:libbegetutil",
67    "ipc:ipc_core",
68    "relational_store:native_rdb",
69    "safwk:system_ability_fwk",
70    "samgr:samgr_proxy",
71    "jsoncpp:jsoncpp",
72  ]
73
74  if (enterprise_device_management_support_all) {
75    if (wifi_edm_enable) {
76      external_deps += [ "wifi:wifi_sdk" ]
77    }
78    if (netmanager_base_edm_enable && netmanager_ext_edm_enable) {
79      external_deps += [
80        "netmanager_base:net_conn_manager_if",
81        "netmanager_base:net_policy_manager_if",
82        "netmanager_base:netsys_controller",
83        "netmanager_ext:ethernet_manager_if",
84      ]
85    }
86    if (drivers_interface_usb_edm_enable && usb_manager_edm_enable) {
87      external_deps += [ "usb_manager:usbsrv_client" ]
88    }
89    if (drivers_interface_usb_edm_enable && storage_service_edm_enable &&
90        usb_manager_edm_enable) {
91      external_deps += [ "storage_service:storage_manager_sa_proxy" ]
92    }
93    if (bluetooth_edm_enable) {
94      external_deps += [ "bluetooth:btframework" ]
95    }
96  }
97  subsystem_name = "customization"
98  part_name = "enterprise_device_management"
99}
100