• 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("//build/config/features.gni")
15import("//build/test.gni")
16import("./../../../multimedia_camera_framework.gni")
17
18ohos_fuzztest("CommandServerFuzzTest") {
19  module_out_path = "camera_framework/camera_framework"
20  fuzz_config_file = "../commandserver_fuzzer"
21
22  include_dirs = [
23    "${multimedia_camera_framework_path}/services/camera_service/include",
24    "${multimedia_camera_framework_path}/services/camera_service/binder/base/include",
25    "${multimedia_camera_framework_path}/services/camera_service/binder/client/include",
26    "${multimedia_camera_framework_path}/services/camera_service/binder/server/include",
27    "${multimedia_camera_framework_path}/interfaces/inner_api/native/camera/include",
28    "${multimedia_camera_framework_path}/interfaces/inner_api/native/camera/include/output/",
29    "${multimedia_camera_framework_path}/services/deferred_processing_service/include/base/command_server",
30    "${multimedia_camera_framework_path}/services/deferred_processing_service/include/base/task_manager",
31  ]
32
33  cflags = [
34    "-g",
35    "-O0",
36    "-Wno-unused-variable",
37    "-fno-omit-frame-pointer",
38    "-fno-access-control",
39  ]
40
41  sources = [ "command_server_fuzzer.cpp" ]
42
43  deps = [
44    "${multimedia_camera_framework_path}/common:camera_utils",
45    "${multimedia_camera_framework_path}/frameworks/native/camera/base:camera_framework",
46    "${multimedia_camera_framework_path}/services/deferred_processing_service:deferred_processing_service_test_only",
47  ]
48
49  external_deps = [
50    "ability_base:want",
51    "access_token:libaccesstoken_sdk",
52    "access_token:libnativetoken",
53    "access_token:libprivacy_sdk",
54    "access_token:libtoken_setproc",
55    "bundle_framework:appexecfwk_base",
56    "bundle_framework:appexecfwk_core",
57    "c_utils:utils",
58    "drivers_interface_camera:libbuffer_handle_sequenceable_1.0",
59    "drivers_interface_camera:libcamera_proxy_1.0",
60    "drivers_interface_camera:libcamera_proxy_1.1",
61    "drivers_interface_camera:libmap_data_sequenceable_1.0",
62    "drivers_interface_camera:metadata",
63    "graphic_2d:librender_service_client",
64    "graphic_surface:surface",
65    "hdf_core:libhdi",
66    "hicollie:libhicollie",
67    "hilog:libhilog",
68    "hisysevent:libhisysevent",
69    "hitrace:hitrace_meter",
70    "ipc:ipc_core",
71    "ipc:ipc_single",
72    "safwk:system_ability_fwk",
73    "samgr:samgr_proxy",
74    "window_manager:libdm",
75  ]
76}
77
78group("fuzztest") {
79  testonly = true
80  deps = [ ":CommandServerFuzzTest" ]
81}
82