• 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
14import("//base/print/print_fwk/print.gni")
15import("//build/config/features.gni")
16import("//build/ohos.gni")
17import("//build/test.gni")
18
19##############################fuzztest##########################################
20ohos_fuzztest("VendorManagerFuzzTest") {
21  module_out_path = fuzz_test_output_path
22
23  fuzz_config_file = "${print_path}/test/fuzztest/vendormanager_fuzzer"
24
25  include_dirs = [
26    "mock",
27    "${print_path}/frameworks/innerkitsimpl/print_impl/include",
28    "${print_path}/frameworks/ohprint/include",
29    "${print_utils_path}/include",
30  ]
31
32  cflags = [
33    "-g",
34    "-O0",
35    "-Wno-unused-variable",
36    "-fno-omit-frame-pointer",
37  ]
38
39  cflags_cc = []
40
41  deps = [
42    "${print_path}/etc/init:printservice.rc",
43    "${print_path}/frameworks/innerkitsimpl/print_impl:print_client",
44    "${print_path}/frameworks/kits/extension:print_extension_framework",
45    "${print_path}/frameworks/kits/extension:print_extension_module",
46    "${print_path}/frameworks/models/print_models:print_models",
47    "${print_path}/interfaces/kits/jsnapi/print_extension:printextensionability_napi",
48    "${print_path}/interfaces/kits/jsnapi/print_extensionctx:printextensioncontext_napi",
49    "${print_path}/interfaces/kits/napi/print_napi:print_napi",
50    "${print_path}/profile:print_sa_profiles",
51    "${print_path}/services/print_service:print_service_test",
52  ]
53
54  sources = [
55    "printserviceability_mock_permission.cpp",
56    "vendormanager_fuzzer.cpp",
57  ]
58
59  external_deps = [
60    "ability_base:base",
61    "ability_base:want",
62    "ability_base:zuri",
63    "ability_runtime:ability_manager",
64    "ability_runtime:abilitykit_native",
65    "access_token:libaccesstoken_sdk",
66    "access_token:libaccesstoken_sdk",
67    "access_token:libnativetoken",
68    "access_token:libtoken_setproc",
69    "bounds_checking_function:libsec_shared",
70    "bundle_framework:appexecfwk_base",
71    "bundle_framework:appexecfwk_core",
72    "c_utils:utils",
73    "common_event_service:cesfwk_innerkits",
74    "drivers_interface_usb:libusb_proxy_1.0",
75    "eventhandler:libeventhandler",
76    "hilog:libhilog",
77    "hisysevent:libhisysevent",
78    "init:libbegetutil",
79    "ipc:ipc_core",
80    "napi:ace_napi",
81    "os_account:os_account_innerkits",
82    "safwk:system_ability_fwk",
83    "samgr:samgr_proxy",
84    "selinux_adapter:librestorecon",
85    "usb_manager:usbsrv_client",
86    "wifi:wifi_sdk",
87  ]
88
89  if (cups_enable) {
90    cflags_cc += [ "-DCUPS_ENABLE" ]
91    external_deps += [
92      "cJSON:cjson",
93      "cups:cups",
94      "cups-filters:cupsfilters",
95    ]
96  }
97
98  if (security_guard_enabled) {
99    external_deps += [
100      "security_guard:libsg_collect_sdk",
101      "time_service:time_client",
102    ]
103  }
104}
105
106###############################################################################
107group("fuzztest") {
108  testonly = true
109  deps = []
110  deps += [
111    # deps file
112    ":VendorManagerFuzzTest",
113  ]
114}
115###############################################################################
116