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