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
14hdf_fuzztest_path = "./../.."
15hdf_test_path = "./../../.."
16hdf_audio_path = "./../../../.."
17
18import("//build/config/features.gni")
19import("//build/ohos.gni")
20import("//build/test.gni")
21import("$hdf_audio_path/audio.gni")
22
23module_output_path = "drivers_peripheral_audio/drivers_peripheral_audio"
24
25ohos_fuzztest("AudioAdmDispatcherControlCmdidFuzzTest") {
26  module_out_path = module_output_path
27  fuzz_config_file = "../audioadmdispatchercontrolcmdid_fuzzer"
28
29  include_dirs = []
30  cflags = [
31    "-g",
32    "-O0",
33    "-Wno-unused-variable",
34    "-fno-omit-frame-pointer",
35  ]
36
37  sources = [
38    "../../../systemtest/common/adm_common/src/audio_adm_common.cpp",
39    "../../../systemtest/common/hdi_common/src/audio_hdi_common.cpp",
40    "audioadmdispatchercontrolcmdid_fuzzer.cpp",
41  ]
42  include_dirs = [
43    "$hdf_audio_path/interfaces/include",
44    "$hdf_audio_path/hal/hdi_passthrough/include",
45    "./",
46    "$hdf_fuzztest_path/common/include",
47    "$hdf_test_path/systemtest/common/hdi_common/include",
48    "$hdf_test_path/systemtest/common/adm_common/include",
49  ]
50  external_deps = [ "hdf_core:libhdf_utils" ]
51  if (defined(ohos_lite)) {
52    external_deps += [ "hilog_lite:hilog_share" ]
53  } else {
54    external_deps += [ "hilog:libhilog" ]
55  }
56  if (enable_c_utils) {
57    external_deps += [ "c_utils:utils" ]
58  }
59  external_deps += [
60    "bounds_checking_function:libsec_shared",
61    "googletest:gtest",
62  ]
63  defines = []
64  if (enable_audio_adm_passthrough) {
65    defines += [ "AUDIO_ADM_SO" ]
66  }
67  if (enable_audio_adm_service) {
68    defines += [ "AUDIO_ADM_SERVICE" ]
69  }
70}
71