• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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
14#####################hydra-fuzz###################
15import("//build/config/features.gni")
16import("//build/test.gni")
17import("//foundation/multimedia/player_framework/config.gni")
18module_output_path = "player_framework/media_player"
19
20##############################fuzztest##########################################
21ohos_fuzztest("PlayerStubFuzzTest") {
22  module_out_path = module_output_path
23  fuzz_config_file =
24      "../../../../test/fuzztest/player_fuzztest/playerstub_fuzzer"
25
26  include_dirs = [
27    "../../../../services/services/player/ipc",
28    "../../../../services/services/sa_media/ipc",
29    "../../../../test/fuzztest/player_fuzztest",
30    "../../../../interfaces/inner_api/native",
31    "../../../../test/fuzztest/common",
32    "$MEDIA_PLAYER_GRAPHIC/frameworks/surface/include",
33  ]
34  cflags = [
35    "-std=c++17",
36    "-fno-rtti",
37    "-fno-exceptions",
38    "-Wall",
39    "-fno-common",
40    "-fstack-protector-strong",
41    "-Wshadow",
42    "-FPIC",
43    "-FS",
44    "-O2",
45    "-D_FORTIFY_SOURCE=2",
46    "-fvisibility=hidden",
47    "-Wformat=2",
48    "-Wfloat-equal",
49    "-Wdate-time",
50    "-Werror",
51    "-Wextra",
52    "-Wimplicit-fallthrough",
53    "-Wsign-compare",
54    "-Wunused-parameter",
55    "-DBINDER_IPC_32BIT",
56  ]
57  if (multimedia_player_framework_support_player) {
58    sources = [
59      "../../../../test/fuzztest/common/stub_common.cpp",
60      "player_service_proxy_fuzzer.cpp",
61      "playerstub_fuzzer.cpp",
62    ]
63  }
64  deps = [
65    "../../../../services/services:media_service",
66    "../../../../services/utils:media_format",
67  ]
68  external_deps = [
69    "c_utils:utils",
70    "graphic_2d:surface",
71    "hilog:libhilog",
72    "ipc:ipc_single",
73    "player_framework:media_client",
74    "safwk:system_ability_fwk",
75    "samgr:samgr_proxy",
76  ]
77}
78