1# Copyright (c) 2022 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/test.gni")
17
18##############################fuzztest##########################################
19ohos_fuzztest("PrintServiceFuzzTest") {
20  module_out_path = fuzz_test_output_path
21
22  fuzz_config_file = "${print_path}/test/fuzztest/printservice_fuzzer"
23
24  include_dirs = [
25    "${print_path}/frameworks/innerkitsimpl/print_impl/include",
26    "${print_path}/frameworks/ohprint/include",
27    "${print_path}/services/print_service/include",
28    "${print_utils_path}/include",
29  ]
30
31  cflags = [
32    "-g",
33    "-O0",
34    "-Wno-unused-variable",
35    "-fno-omit-frame-pointer",
36  ]
37
38  deps = [
39    "${print_path}/frameworks/innerkitsimpl/print_impl:print_client",
40    "${print_path}/services/print_service:print_service",
41  ]
42
43  external_deps = [
44    "ability_base:base",
45    "ability_base:want",
46    "ability_base:zuri",
47    "ability_runtime:ability_manager",
48    "ability_runtime:abilitykit_native",
49    "access_token:libaccesstoken_sdk",
50    "bundle_framework:appexecfwk_base",
51    "bundle_framework:appexecfwk_core",
52    "c_utils:utils",
53    "common_event_service:cesfwk_innerkits",
54    "core_service:tel_core_service_api",
55    "eventhandler:libeventhandler",
56    "hilog:libhilog",
57    "hisysevent:libhisysevent",
58    "hitrace:hitrace_meter",
59    "init:libbegetutil",
60    "ipc:ipc_core",
61    "napi:ace_napi",
62    "netmanager_base:net_conn_manager_if",
63    "os_account:os_account_innerkits",
64    "relational_store:native_rdb",
65    "safwk:system_ability_fwk",
66    "samgr:samgr_proxy",
67  ]
68
69  if (security_guard_enabled) {
70    external_deps += [
71      "security_guard:libsg_collect_sdk",
72      "time_service:time_client",
73    ]
74  }
75
76  sources = [ "printservice_fuzzer.cpp" ]
77}
78
79###############################################################################
80group("fuzztest") {
81  testonly = true
82  deps = []
83  deps += [
84    # deps file
85    ":PrintServiceFuzzTest",
86  ]
87}
88###############################################################################
89