• 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("ScanServiceAbilityFuzzTest") {
21  module_out_path = fuzz_test_output_path
22
23  fuzz_config_file = "${print_path}/test/fuzztest/scanserviceability_fuzzer"
24
25  include_dirs = [
26    "mock",
27    "${print_path}/services/scan_service/include",
28    "${print_path}/frameworks/innerkitsimpl/scan_impl/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  deps = [
40    "${print_path}/frameworks/models/scan_models:scan_models",
41    "${print_path}/frameworks/innerkitsimpl/scan_impl:scan_client",
42    "${print_path}/services/scan_service:scan_service_test",
43  ]
44
45  external_deps = [
46    "ability_base:base",
47    "ability_base:want",
48    "ability_base:zuri",
49    "ability_runtime:ability_manager",
50    "ability_runtime:abilitykit_native",
51    "access_token:libaccesstoken_sdk",
52    "access_token:libnativetoken",
53    "access_token:libtoken_setproc",
54    "backends:sane",
55    "bounds_checking_function:libsec_shared",
56    "bundle_framework:appexecfwk_base",
57    "bundle_framework:appexecfwk_core",
58    "cJSON:cjson",
59    "c_utils:utils",
60    "common_event_service:cesfwk_innerkits",
61    "drivers_interface_usb:libusb_proxy_1.0",
62    "eventhandler:libeventhandler",
63    "hilog:libhilog",
64    "hisysevent:libhisysevent",
65    "init:libbegetutil",
66    "ipc:ipc_core",
67    "jsoncpp:jsoncpp",
68    "libjpeg-turbo:turbojpeg",
69    "napi:ace_napi",
70    "netmanager_ext:mdns_manager_if",
71    "os_account:os_account_innerkits",
72    "safwk:system_ability_fwk",
73    "samgr:samgr_proxy",
74    "selinux_adapter:librestorecon",
75    "usb_manager:usbsrv_client",
76  ]
77
78  if (security_guard_enabled) {
79    external_deps += [
80      "security_guard:libsg_collect_sdk",
81      "time_service:time_client",
82    ]
83  }
84
85  sources = [
86    "scanserviceability_fuzzer.cpp",
87    "scanserviceability_mock.cpp",
88  ]
89}
90
91###############################################################################
92group("fuzztest") {
93  testonly = true
94  deps = []
95  deps += [
96    # deps file
97    ":ScanServiceAbilityFuzzTest",
98  ]
99}
100###############################################################################
101