• 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
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("InstallLocalEnterpriseAppEnabledPluginFuzzTest") {
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    "install_local_enterprise_app_enabled_plugin_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    "hilog:libhilog",
65    "init:libbegetutil",
66    "ipc:ipc_core",
67    "relational_store:native_rdb",
68    "safwk:system_ability_fwk",
69    "samgr:samgr_proxy",
70  ]
71
72  if (enterprise_device_management_support_all) {
73    if (wifi_edm_enable) {
74      external_deps += [ "wifi:wifi_sdk" ]
75    }
76    if (netmanager_base_edm_enable && netmanager_ext_edm_enable) {
77      external_deps += [
78        "netmanager_base:net_conn_manager_if",
79        "netmanager_base:net_policy_manager_if",
80        "netmanager_base:netsys_controller",
81        "netmanager_ext:ethernet_manager_if",
82      ]
83    }
84    if (drivers_interface_usb_edm_enable && usb_manager_edm_enable) {
85      external_deps += [ "usb_manager:usbsrv_client" ]
86    }
87    if (drivers_interface_usb_edm_enable && storage_service_edm_enable &&
88        usb_manager_edm_enable) {
89      external_deps += [ "storage_service:storage_manager_sa_proxy" ]
90    }
91    if (bluetooth_edm_enable) {
92      external_deps += [ "bluetooth:btframework" ]
93    }
94  }
95
96  subsystem_name = "customization"
97  part_name = "enterprise_device_management"
98}