• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/ohos.gni")
17import("//build/test.gni")
18
19##############################fuzztest##########################################
20ohos_fuzztest("ScanServiceStubFuzzTest") {
21  module_out_path = fuzz_test_output_path
22
23  fuzz_config_file = "${print_path}/test/fuzztest/scanservicestub_fuzzer"
24
25  include_dirs = [
26    "${print_path}/services/scan_service/include",
27    "${print_path}/frameworks/innerkitsimpl/scan_impl/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/helper/scan_helper:scan_helper",
40    "${print_path}/frameworks/innerkitsimpl/scan_impl:scan_client",
41    "${print_path}/services/scan_service:scan_service",
42  ]
43
44  if (sane_enable) {
45    include_dirs += [ "//vendor/open_source/backends/include" ]
46    deps += [ "//vendor/open_source/backends:third_sane" ]
47    cflags_cc = [ "-DSANE_ENABLE" ]
48  }
49
50  external_deps = [
51    "ability_base:base",
52    "ability_base:want",
53    "ability_base:zuri",
54    "ability_runtime:ability_manager",
55    "ability_runtime:abilitykit_native",
56    "access_token:libaccesstoken_sdk",
57    "bundle_framework:appexecfwk_base",
58    "bundle_framework:appexecfwk_core",
59    "c_utils:utils",
60    "common_event_service:cesfwk_innerkits",
61    "core_service:tel_core_service_api",
62    "distributed_notification_service:ans_innerkits",
63    "drivers_interface_usb:libusb_proxy_1.0",
64    "eventhandler:libeventhandler",
65    "hilog:libhilog",
66    "hisysevent:libhisysevent",
67    "hitrace:hitrace_meter",
68    "init:libbegetutil",
69    "ipc:ipc_core",
70    "libjpeg-turbo:turbojpeg",
71    "napi:ace_napi",
72    "netmanager_base:net_conn_manager_if",
73    "netmanager_ext:mdns_manager_if",
74    "os_account:os_account_innerkits",
75    "relational_store:native_rdb",
76    "safwk:system_ability_fwk",
77    "samgr:samgr_proxy",
78    "usb_manager:usbsrv_client",
79  ]
80
81  if (security_guard_enabled) {
82    external_deps += [
83      "security_guard:libsg_collect_sdk",
84      "time_service:time_client",
85    ]
86  }
87
88  sources = [ "scanservicestub_fuzzer.cpp" ]
89}
90
91###############################################################################
92group("fuzztest") {
93  testonly = true
94  deps = []
95  deps += [
96    # deps file
97    ":ScanServiceStubFuzzTest",
98  ]
99}
100###############################################################################
101